servers/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ola Hungerford 968acc2ec9
fix(filesystem): return string in structuredContent to match outputSchema (#3113)
* fix(filesystem): return string in structuredContent to match outputSchema

The directory_tree, move_file, and list_directory_with_sizes tools were
returning an array in structuredContent.content, but outputSchema declares
content as z.string(). This caused MCP error -32602 validation failures.

Changed structuredContent from { content: [contentBlock] } to { content: text }
to match the declared outputSchema and be consistent with other filesystem
tools like list_directory and search_files.

Fixes #3110, #3106, #3093

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(filesystem): add integration tests for structuredContent schema compliance

Adds tests to verify that directory_tree, list_directory_with_sizes, and
move_file tools return structuredContent.content as a string (matching
outputSchema) rather than an array.

These tests prevent regression of issues #3110, #3106, #3093.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: adam jones <domdomegg+git@gmail.com>
2025-12-11 13:50:27 +00:00
..
everything chore(deps): bump @modelcontextprotocol/sdk 2025-12-02 17:40:23 +00:00
fetch Add mcpName and repository fields for MCP registry (#3068) 2025-11-26 14:29:36 +00:00
filesystem fix(filesystem): return string in structuredContent to match outputSchema (#3113) 2025-12-11 13:50:27 +00:00
git Fix test_git_diff to use dynamic branch name 2025-12-10 10:11:46 +11:00
memory chore(deps): bump @modelcontextprotocol/sdk 2025-12-02 17:40:23 +00:00
sequentialthinking chore(deps): bump @modelcontextprotocol/sdk 2025-12-02 17:40:23 +00:00
time Add mcpName and repository fields for MCP registry (#3068) 2025-11-26 14:29:36 +00:00