Skip to content

fix(filesystem): reject non-media read_media_file inputs#4163

Open
Lubrsy706 wants to merge 1 commit into
modelcontextprotocol:mainfrom
Lubrsy706:fix/filesystem-media-content-type
Open

fix(filesystem): reject non-media read_media_file inputs#4163
Lubrsy706 wants to merge 1 commit into
modelcontextprotocol:mainfrom
Lubrsy706:fix/filesystem-media-content-type

Conversation

@Lubrsy706
Copy link
Copy Markdown

Summary

  • remove the invalid blob content type from the filesystem read_media_file output schema
  • reject unsupported extensions before reading and encoding the file
  • add integration coverage for valid image output and non-media rejection

Fixes #4029.

Tests

  • npm test -- structured-content
  • npm test
  • npm run build

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: read_media_file returns invalid 'blob' content type, violating MCP spec

1 participant