rust-sdk/crates
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Filinto Duran 00bcf13800
fix(model): decode metadata-bearing input-required results affecting mrtr (#1097)
* fix(model): decode metadata-bearing input-required results

  The draft permits every Result, including InputRequiredResult, to carry
  _meta and recommends that servers include
  io.modelcontextprotocol/serverInfo on every response. It also requires
  an InputRequiredResult to contain inputRequests or requestState so the
  client knows what to provide or how to resume the request.

  ServerResult uses untagged deserialization and attempts CallToolResult
  before InputRequiredResult. Because CallToolResult accepts _meta and
  defaults missing content to an empty list, it consumed valid
  input_required results carrying metadata. Unknown inputRequests and
  requestState fields were then discarded, leaving clients without the
  information needed to continue.

  Reject resultType input_required when deserializing CallToolResult so
  Serde proceeds to the InputRequiredResult variant. Add regression
  coverage proving that inputRequests, requestState, and serverInfo
  metadata are preserved.

  Spec:
  41d9e938e9/schema/draft/schema.ts (L137-L151)
  41d9e938e9/schema/draft/schema.ts (L198-L224)
  41d9e938e9/schema/draft/schema.ts (L541-L565)

Signed-off-by: Filinto Duran <1373693+filintod@users.noreply.github.com>

* incorporate feedback - close gap in inputrequired not properly checking that at least one of inputRequest or requestState is present

Signed-off-by: Filinto Duran <1373693+filintod@users.noreply.github.com>

---------

Signed-off-by: Filinto Duran <1373693+filintod@users.noreply.github.com>
2026-07-31 09:23:56 -04:00
..
rmcp fix(model): decode metadata-bearing input-required results affecting mrtr (#1097) 2026-07-31 09:23:56 -04:00
rmcp-macros chore: release v3.0.0 (#1077) 2026-07-28 18:44:03 -04:00