Files
servers/src
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
..