-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Tool results Image content supports url #793
Description
Is your feature request related to a problem? Please describe.
Tool result Image content currently only supports base64.
{
"type": "image",
"data": "base64-encoded-data",
"mimeType": "image/png"
}https://modelcontextprotocol.io/specification/2025-06-18/server/tools#image-content
I think using base64 format is convenient for some scenarios where mcp server tools generate images locally. However, if the tool is backed by a remote service and provides CDN service, the return value can be a link to an image.
For example, we provide the community with an MCP server tool AntV Chart MCP Server that can generate visual charts. However, since the specification does not support image URL type results, images cannot be displayed directly in many AI clients. Users need to click the link and open the browser to preview them.
In addition, the image data in base64 format is usually larger than the storage size of the image itself, which seems to be disadvantageous for rendering performance in the chat list.
Describe the solution you'd like
{
"type": "image",
"uri": "https://cdn.com/path/to/name.png"
}Describe alternatives you've considered
None.
Additional context
I am not familiar with the specification process for protocol standards, and the alternative may not be so reasonable.
I see that the 06-18 version of the spec added Resource Links type results, so does this apply to the issue I mentioned?