-
Notifications
You must be signed in to change notification settings - Fork 621
Open
Labels
Description
Describe the bug
I'm playing with tools attempting to return different ResultContent from an MCP server.
This works:
ImageContentBlock imgResult = new ImageContentBlock() { Data = base64, MimeType = mimeType };
result.Content[0] = imgResult;
return result;
This do not work (mimetype is "application/pdf")
BlobResourceContents resContent = new BlobResourceContents() { Blob = base64, MimeType = "application/pdf", Uri = $"file:///mypdf.pdf" };
EmbeddedResourceBlock resResult = new EmbeddedResourceBlock() { Resource = resContent };
result.Content[0] = resResult;
return result;
To Reproduce
Steps to reproduce the behavior:
- Create an MCP server in c# with a tool that return a contentresult
- Setup Claude Desktop as a client
Expected behavior
The resource file should be available in LLM context
Observed result
Claude claims that the tool returned a BAD IMAGE with a wrong mimetype
Claude is basically interpreting the result as an image instead of the suggested mimetype
I do not know if this is a problem of SDK or possibly some wrong implementation in Claude Desktop.
Reactions are currently unavailable