MCPA Certification Curriculum

Multi Round-Trip Requests and Elicitation

A server that needs the user's confirmation mid call does not hold a connection open and wait. It ends the call, hands the client a receipt, and lets a brand new request pick up where the first one left off. Explain why Multi Round-Trip Requests (MRTR) replaced server-initiated requests such as elicitation, sampling, and roots, and what that trade buys a horizontally scaled server. Read an InputRequiredResult and its retry as ordinary JSON-RPC messages: inputRequests, inputResponses, and a requestState that must be echoed exactly. Distinguish form mode elicitation from URL mode elicitation and know which one a server must use for sensitive data. Protect requestState with hmac and hashlib from the standard library so it survives an untrusted client without becoming a forgeable capability. Tell a tampered, expired, or misbound requestState apart from a working one, and explain why a server must reject each one. A deploy tool is about to replace the running release of a service. Before it does, it needs the user to say yes. That single requirement used to be expensive to build correctly. The old pattern had the server hold the original request open, on a stream, while it sent a separate request of its own, such as elicitation/create, down that same connection. The client answered on a second request, and the server had to…

Multi Round-Trip Requests and Elicitation: A server that needs the user's confirmation mid call does not hold a connection open and wait. It ends the call,…

This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.

Browse the complete course catalog or open this lesson on GitHub.