Bug
read_media_file returns type: "blob" in the content array, which is not a valid MCP content type. The MCP 2025-11-25 specification defines only five valid content types: text, image, audio, resource_link, and resource.
Reproduction
# Start the filesystem server
npx @modelcontextprotocol/server-filesystem /tmp
# Create a text file
echo "hello" > /tmp/test.txt
# Call read_media_file on a non-media file via MCP
# The server returns type: "blob" which causes:
# MCP error -32602: Invalid tools/call result
The MCP client rejects the response at the transport layer because "blob" doesn't match any valid content type union variant (text, image, audio, resource_link, resource).
Expected behavior
Either:
- Return
isError: true with a message like "not a media file" when the file is not an image/audio type
- Return
type: "image" with mimeType: "application/octet-stream" and the base64 data (if the intent is to support arbitrary binary files)
Environment
@modelcontextprotocol/server-filesystem (latest via npx)
- MCP protocol version: 2025-11-05
- Client: mcp-assert (deterministic MCP server testing tool)
Found while writing a comprehensive assertion suite for all 14 filesystem server tools.
Bug
read_media_filereturnstype: "blob"in the content array, which is not a valid MCP content type. The MCP 2025-11-25 specification defines only five valid content types:text,image,audio,resource_link, andresource.Reproduction
The MCP client rejects the response at the transport layer because
"blob"doesn't match any valid content type union variant (text,image,audio,resource_link,resource).Expected behavior
Either:
isError: truewith a message like "not a media file" when the file is not an image/audio typetype: "image"withmimeType: "application/octet-stream"and the base64 data (if the intent is to support arbitrary binary files)Environment
@modelcontextprotocol/server-filesystem(latest via npx)Found while writing a comprehensive assertion suite for all 14 filesystem server tools.