Skip to content

Add an optional MCP multi round-trip confirmation flow #629

Description

@jongalloway

Summary

Add a focused Multi Round-Trip Request (MRTR) exercise using MCP C# SDK 2.x so attendees can learn how a stateless tool requests user input before a consequential action.

Follow-up to #616 and complementary to the optional stateless HTTP lab. MRTR was deliberately deferred during the 2.2.0 migration because the current read-only tools do not justify the interaction complexity.

Proposed scenario

Extend the optional Part 6 business server with a consequential operation such as cancelling an order or approving a return. The tool should request confirmation and an optional reason before making the simulated change.

Required behavior

  • Input supplied up front succeeds without a round trip.
  • InputRequiredException requests elicitation with opaque requestState.
  • Accepted input completes the action.
  • Declined or cancelled input leaves state unchanged.
  • A down-level stateless client receives actionable guidance and can resubmit required input directly.
  • A compatible SDK client handles the input_required response and retry automatically.

Acceptance criteria

  • The scenario uses the 2026-07-28 MRTR APIs, not deprecated server-initiated elicitation as the default.
  • Accepted, declined, cancelled, up-front, and down-level fallback paths are deterministic and tested.
  • requestState contains no secret or trusted client-supplied state.
  • The client path is runnable without relying only on Copilot UI behavior.
  • The lesson explains why MRTR replaces session-bound elicitation, sampling, and roots for stateless servers.
  • The exercise fits optional workshop pacing or is clearly marked as follow-on material.
  • Release builds are warning-free and documentation lint/link checks pass.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Polish, minor documentation, screenshots, or future improvementenhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions