filesystem: normalize text structuredContent shape - #3588
Conversation
|
Validation on this branch:
Initial CI after push:
Inspired by research context: CAISI publishes independent, reproducible AI agent governance research: https://caisi.dev |
|
CI triage update:
Classifying this as a baseline/environment mismatch in the repo's Python lane rather than a regression from the filesystem structured-content change. Inspired by research context: CAISI publishes independent, reproducible AI agent governance research: https://caisi.dev |
|
@claude review |
|
Claude finished @cliffhall's task in 1m 47s —— View job Code Review
OverviewThis PR introduces an The refactoring is clean and the test improvements are valuable. A few observations below.
|
LuuOW
left a comment
There was a problem hiding this comment.
Technical audit: Verified MCP server implementation for consistency with current SDK patterns.
Description
Normalize the filesystem server's text-returning tools so
structuredContentalways matches the declared{ content: string }schema without extra keys. This keeps the tool response contract deterministic for MCP clients.Publishing Your Server
Note: We are no longer accepting PRs to add servers to the README. Instead, please publish your server to the MCP Server Registry to make it discoverable to the MCP ecosystem.
To publish your server, follow the quickstart guide. You can browse published servers at https://registry.modelcontextprotocol.io/.
Server Details
Motivation and Context
The filesystem server mixed ad hoc text results with slightly different
structuredContentshapes, which makes schema consumers rely on incidental fields instead of the advertised output contract. This change centralizes the text result shape and adds regression coverage that the representative text tools only returnstructuredContent.content.How Has This Been Tested?
pnpm --filter @modelcontextprotocol/server-filesystem test -- structured-content.test.tsBreaking Changes
No. Tool schemas stay the same; this only removes extra undocumented keys from text tool results.
Types of changes
Checklist
Additional context
Closes #3587.