Output Schema: say how a server can change a tool's `outputSchema` without breaking clients that cached it
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 79/100
- Issue-Typ
- Dokumentation
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- api, documentation
Rechercherichtung
Finde den Abschnitt Output Schema in der MCP-Spezifikation und lies die bestehenden Anforderungen an Serverergebnisse und die Client-Validierung. Füge einen nicht normativen Hinweis hinzu, der erklärt, wie Server Ausgabeschemas weiterentwickeln können, während Clients möglicherweise zwischengespeicherte Kopien haben, und verwende dabei die vorgeschlagene Formulierung als Ausgangspunkt. Prüfe den Stil der umgebenden Spezifikation und stelle sicher, dass der Hinweis die Kompatibilität behandelt; die Frage, ob der Client die Daten erneut abrufen soll, ist noch offen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The Output Schema section says servers MUST return structured results that conform to the schema, and clients SHOULD validate them against it. It doesn't say which schema applies when the two sides hold different versions. Clients cache tool lists, so after a server changes a tool, a client can validate a new result against the old schema.
What happened to us: our server removed two fields that a tool's outputSchema had marked required. A Claude Code session and ChatGPT both still held the old schema, and both rejected every result from that tool until they reconnected. The results were valid against the current schema the whole time. ChatGPT also kept the old tool list until the user pressed "Refresh tools" in its settings.
notifications/tools/list_changed doesn't close the gap. It only helps clients that listen for it, and a call can still arrive before the refresh.
Proposed non-normative note under Output Schema:
Clients may hold a cached copy of a tool's
outputSchema. To change it without breaking them, servers SHOULD only add optional properties. Removing, renaming or narrowing a property, or making one required, can cause clients holding the earlier schema to reject valid results. To replace a property, add the new one and keep the old one until clients have refreshed.
Open question: should a client refetch tools/list before treating a result that fails validation as a server error?
I'm happy to open a docs PR with this wording. Write-up: https://github.com/shawnbaako/production-agent-experiments/tree/main/studies/06-tool-search-results (Pitfalls).
AI disclosure: An AI coding agent (Claude Code) drafted this issue at my direction from our production logs and the linked write-up. I reviewed it and stand behind the facts.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 9.8k
- Forks
- 1.9k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 73
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus modelcontextprotocol/modelcontextprotocol
-
docs: add Gravitee Access Management to the Enterprise-Managed Authorization implementation tableOffenbug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
modelcontextprotocol/modelcontextprotocol#3583 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
modelcontextprotocol/modelcontextprotocol#3581 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
modelcontextprotocol/modelcontextprotocol#3571 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Sampling with tools: two small correctionsEvtl. wieder frei @AbarnaaSree hat das vor 19 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
modelcontextprotocol/modelcontextprotocol#3490 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
modelcontextprotocol/modelcontextprotocol#3489 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in modelcontextprotocol/modelcontextprotocol
Ähnliche Issues
-
bug
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 62/100
garethgeorge/backrest#1451 ·
Maintainer antworten meist innerhalb von 1 Tag
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument orderEvtl. vergeben @ManyaS-Git hat das vor 1 Tag übernommen. Offenstatus:in-linear
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
n8n-io/n8n#45027 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 13 Tagen
-
bug
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 68/100
navikt/skjemabygging-formio#2399 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
lidofinance/validator-ejector#233 ·
Maintainer antworten meist innerhalb von 1 Tag