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

Aperta
#1,415 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@gocamille ci sta già lavorando.

Dal 30/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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?

Lingua principale
Rust
Stelle
4.1k
Fork
680
Merge medio
3g 19h
PR unite (30g)
40

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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.

Altre issue di modelcontextprotocol/rust-sdk

Tutte le issue di modelcontextprotocol/rust-sdk

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.