Skip to content

fix(filesystem): reject non-media read_media_file outputs#4379

Open
go165 wants to merge 1 commit into
modelcontextprotocol:mainfrom
go165:go165/filesystem-read-media-spec-compliance
Open

fix(filesystem): reject non-media read_media_file outputs#4379
go165 wants to merge 1 commit into
modelcontextprotocol:mainfrom
go165:go165/filesystem-read-media-spec-compliance

Conversation

@go165

@go165 go165 commented Jun 15, 2026

Copy link
Copy Markdown

Summary

  • remove the invalid blob content type from read_media_file output schema
  • return a tool error for non-image/audio files instead of emitting a non-spec content block
  • add integration coverage for image success and non-media rejection

Fixes #4029

Validation

  • npm exec --workspace src/filesystem -- tsc --noEmit
  • npm run --workspace src/filesystem build
  • npm exec --workspace src/filesystem -- vitest run __tests__/structured-content.test.ts --coverage=false
  • git diff --check

Note: validation used temporary symlinks to the existing local node_modules directories from the main checkout; no new install was run.

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