Skip to content

fix(everything): label blob resources as application/octet-stream - #4767

Open
simpleqt wants to merge 1 commit into
modelcontextprotocol:mainfrom
simpleqt:fix/blob-resource-mime
Open

fix(everything): label blob resources as application/octet-stream#4767
simpleqt wants to merge 1 commit into
modelcontextprotocol:mainfrom
simpleqt:fix/blob-resource-mime

Conversation

@simpleqt

@simpleqt simpleqt commented Sep 6, 2026

Copy link
Copy Markdown

Summary

blobResource() in src/everything/resources/templates.ts returned mimeType: "text/plain" — a copy-paste from textResource() — while carrying base64 content, and while the registered blob resource template (line 195) declares application/octet-stream. Downstream, get-resource-links.ts described every blob resource_link as a "plaintext resource" for the same reason.

Changed the mime type to application/octet-stream and collapsed the now-always-false conditional in the link description.

Testing

__tests__/tools.test.ts pins the odd/even blob-text naming split but does not assert mimeType, so no test changes are needed; vitest should stay green.

blobResource() returned mimeType text/plain (copy-paste from
textResource), so every generated blob resource_link was described as
a 'plaintext resource' while carrying base64 content; the registered
template already declares application/octet-stream (line 195). The
now-redundant conditional in get-resource-links was collapsed
accordingly.
Copilot AI balanced review requested due to automatic review settings September 6, 2026 17:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants