Skip to content

No way to set isError=True for arbitrary tool result content #348

@ezyang

Description

@ezyang

There appears to be no way to manually toggle isError=True for non-text content. For example, you can't return an image with isError=True. I noticed this when implementing a proxy using mcp.tool that recursively dispatches to call_tool. Returning content is fine, but there's no good way to make use of isError, unless you have a single string in which case you can raise an Exception and get isError toggled that way.

Metadata

Metadata

Assignees

Labels

P3Nice to haves, rare edge casesfeature requestRequest for a new feature that's not currently supportedgood first issueGood for newcomersready for workEnough information for someone to start working on

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions