modelcontextprotocol / modelcontextprotocol/python-sdk

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

Open
#348 6 comments 0 reactions 1 assignee View on GitHub

@Kludex is already working on this.

Since Oct 3, 2025.

enhancement good first issue P3 ready for work
Dominant language
Python
Stars
24.3k
Forks
4k
Avg merge
1d 1h
Merged PRs (30d)
31

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.