Skip to content

History: drive MRTR manually to keep pending-request UX on modern connections #1704

Description

@cliffhall

Follow-up to #1627 (SDK V2 + New Spec stack). #1627 delivers the History/Protocol rendering of the modern vocabulary (MRTR conversation grouping, resultType, requestState linking, server/discover / subscriptions/listen / notifications/subscriptions/acknowledged / subscriptionId frames, era labeling) by correlating the rounds the transport already captures.

This issue covers the deferred, deeper half: driving MRTR manually so the Inspector keeps its pending-request UX and full visibility on modern connections instead of letting the SDK auto-fulfill the retry loop.

Scope

  • Pass inputRequired: { autoFulfill: false } to the SDK Client and drive the retry loop with withInputRequired() / allowInputRequired: true in InspectorClient's tool-call (and prompts/get, resources/read) path.
  • On a modern input_required result, surface the embedded inputRequests through the existing pending-request UX (usePendingClientRequests + InlineElicitationRequest / InlineSamplingRequest), gather the user's answers, then retry the original request with a new id echoing requestState + inputResponses.
  • Make the semantics shown accurate per era: legacy = "server sent a request"; modern = "server returned input_required; your answer goes back as a retry."
  • Applies across all three clients (web/cli/tui) since the tool-call path lives in core/mcp/inspectorClient.ts.

Key files

core/mcp/inspectorClient.ts (client construction + callTool/request path), core/mcp/samplingCreateMessage.ts / elicitationCreateMessage.ts (pending wrappers), pending-request panels + hook, plus per-client wiring.

Acceptance

Ref: specification/v2_new_spec_impact.md §7.3, §8.2 (MRTR auto-fulfilment), §9.2.

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions