Typed client calls drop the parse error when a reply misses a required field

Offen
#1,415 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@gocamille arbeitet bereits daran.

Seit 30.10.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

enhancement P2 ready for work T-core T-service

When a server leaves out a required field, like inputSchema on a tool in tools/list, the reply falls through the untagged ServerResult to CustomResult (same thing as #1242), and list_tools only returns UnexpectedResponse. The handshake has the same problem, ExpectedInitResult just carries a Debug dump of the reply. So a client can't tell its user what's wrong with the server.

The typed calls could parse a CustomResult again as the type they expect and keep serde's error, e.g. tools[1]: missing field `inputSchema` . Would you take a PR for this?

Vorherrschende Sprache
Rust
Sterne
4.1k
Forks
694
Ø Merge
4 T. 4 Std.
Gemergte PRs (30 T.)
42

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus modelcontextprotocol/rust-sdk

Alle Issues in modelcontextprotocol/rust-sdk

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.