-
Notifications
You must be signed in to change notification settings - Fork 82
Description
I'm working with MCP Servers for game engines right now (Cocos Creator, Unity) and your project looks very promising for improving functionality of agents in this field, thank you for you work!
Although, sometimes I need to pass preview as an image to MCP tool result. Looking at MCP Communication protocol I can see that tool result is processed as an object/value if it has "text" type, otherwise - passed as it is.
So, when I'm passing "image" type in response content, I will get an object that looks like this:
{
type: "image",
data: BASE64_IMAGE_DATA,
mimeType: "image/jpeg",
}
The problem is call_tool_chain tool, as I see here, always perform JSON.stringify on the result and returns "text" type as MCP tool response.
Can you please handle different result types at this point and add it to resulting content as it is?