Skip to content

Commit 074d330

Browse files
author
huangzhimou
committed
fix(filesystem): fix move_file outputSchema to return array (#3093)
1 parent 4503e2d commit 074d330

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/server-filesystem": patch
3+
---
4+
5+
Fix move_file outputSchema to return array of content objects instead of string. Closes #3093

src/filesystem/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ server.registerTool(
607607
source: z.string(),
608608
destination: z.string()
609609
},
610-
outputSchema: { content: z.string() },
610+
outputSchema: { content: z.array(z.object({ type: z.enum(["text"]), text: z.string() })) },
611611
annotations: { readOnlyHint: false, idempotentHint: false, destructiveHint: true }
612612
},
613613
async (args: z.infer<typeof MoveFileArgsSchema>) => {
@@ -618,7 +618,7 @@ server.registerTool(
618618
const contentBlock = { type: "text" as const, text };
619619
return {
620620
content: [contentBlock],
621-
structuredContent: { content: text }
621+
structuredContent: { content: [contentBlock] }
622622
};
623623
}
624624
);

0 commit comments

Comments
 (0)