modelcontextprotocol / modelcontextprotocol/python-sdk

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

Aperta
#348 6 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@Kludex ci sta già lavorando.

Dal 3/10/2025.

enhancement good first issue P3 ready for work
Lingua principale
Python
Stelle
24.3k
Fork
4k
Merge medio
1g 1h
PR unite (30g)
31

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.