multi_round_trip

command
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command multi_round_trip demonstrates the multi round-trip request pattern introduced in MCP protocol version 2026-07-28 (SEP-2322).

A tool that needs something from the user mid-call cannot send the client a request on a stateless protocol, so it returns the requests it needs answered instead. The client fulfils them and retries the original call with the answers attached, and an opaque request state echoed back so the handler can resume where it left off.

The handler below is written once and serves clients of either protocol era: against a client predating this revision, mcp-go issues the elicitation/create that client understands and re-invokes the handler with the answer.

Run it with:

go run ./examples/multi_round_trip

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL