From 074d330cc77fe59a8b143e6e33e6eff452228584 Mon Sep 17 00:00:00 2001 From: huangzhimou Date: Wed, 22 Apr 2026 11:17:17 +0800 Subject: [PATCH] fix(filesystem): fix move_file outputSchema to return array (#3093) --- .changeset/fix-move-file-output-schema.md | 5 +++++ src/filesystem/index.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/fix-move-file-output-schema.md diff --git a/.changeset/fix-move-file-output-schema.md b/.changeset/fix-move-file-output-schema.md new file mode 100644 index 0000000000..cdb957cc6a --- /dev/null +++ b/.changeset/fix-move-file-output-schema.md @@ -0,0 +1,5 @@ +--- +"@modelcontextprotocol/server-filesystem": patch +--- + +Fix move_file outputSchema to return array of content objects instead of string. Closes #3093 diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index 7b67e63e58..1aab466f46 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -607,7 +607,7 @@ server.registerTool( source: z.string(), destination: z.string() }, - outputSchema: { content: z.string() }, + outputSchema: { content: z.array(z.object({ type: z.enum(["text"]), text: z.string() })) }, annotations: { readOnlyHint: false, idempotentHint: false, destructiveHint: true } }, async (args: z.infer) => { @@ -618,7 +618,7 @@ server.registerTool( const contentBlock = { type: "text" as const, text }; return { content: [contentBlock], - structuredContent: { content: text } + structuredContent: { content: [contentBlock] } }; } );