Commit 7284905
committed
fix(filesystem): correct outputSchema for directory_tree and move_file
Why this change was needed:
Both tools declared outputSchema as { content: z.string() } but their
handlers return { content: [{ type: "text", text: "..." }] } - an array
of content blocks. This mismatch caused MCP validation error -32602.
What changed:
- Updated directory_tree outputSchema to declare content as array of
text content blocks
- Updated move_file outputSchema with the same fix
- Schema now matches the actual return type of both handlers
Problem solved:
Clients using structured content validation no longer receive -32602
errors when calling directory_tree or move_file tools.
Fixes #3093, Fixes #31061 parent dcb47d2 commit 7284905
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
522 | 527 | | |
523 | 528 | | |
524 | 529 | | |
| |||
588 | 593 | | |
589 | 594 | | |
590 | 595 | | |
591 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
592 | 602 | | |
593 | 603 | | |
594 | 604 | | |
| |||
0 commit comments