Skip to content

fix(filesystem): fix move_file outputSchema to return array of content objects#4003

Open
Jim1874 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Jim1874:fix/issue-3093-move-file-output-schema
Open

fix(filesystem): fix move_file outputSchema to return array of content objects#4003
Jim1874 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Jim1874:fix/issue-3093-move-file-output-schema

Conversation

@Jim1874
Copy link
Copy Markdown

@Jim1874 Jim1874 commented Apr 22, 2026

Summary

move_file outputSchema was incorrectly returning a raw string instead of
an array of content objects [{type:'text', text:'...'}].

This caused MCP protocol -32602 validation errors in automated callers.

Closes #3093

The move_file tool was returning raw string instead of array of content objects,
causing MCP protocol -32602 validation errors.

Closes modelcontextprotocol#3093
@Jim1874
Copy link
Copy Markdown
Author

Jim1874 commented Apr 22, 2026

Note: Test failure is a pre-existing issue in main

The Test filesystem failure for structuredContent in move_file is not caused by this PR. I verified:

  1. Ran the same test against origin/main — it also fails with the same error: expected undefined to be defined
  2. The structuredContent field is not being returned by move_file in the MCP SDK client response — this is a pre-existing bug in the codebase, not introduced by this PR

This PR only fixes the outputSchema declaration from { content: z.string() } to { content: z.array(...) } to match the actual content return value. The structuredContent test issue should be addressed separately.

Files changed: src/filesystem/index.ts — only the outputSchema field was modified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filesystem MCP: move_file tool returns array instead of string (Error -32602)

1 participant