CSE Roadmap

Common tier · about 6 hours · 14 parts

Part 9 of 14 · 1 min read

Answering sampling and elicitation questions in an interview

Interview angle

"How does a server ask the user something in the middle of a tool call?" A strong answer names the mechanism and its history: in the earlier revisions the server sent a request on the open connection; in the current one the call returns input_required with the questions and an opaque requestState, and the client retries the same call with the answers. Then give the consequences: the tool body runs again, so side effects go after the last question. The state passes through the client, so it must be signed, bound to the user and request, and expire, and one-time actions need a server-side record. The change makes servers stateless and balancer-friendly.

Follow-up: "What can go wrong with URL elicitation?" The wrong person opens the link. The server must check that the user who completes the flow is the user who started it. And "Is a confirmation prompt from the server a security control?" No. The server decides whether to ask. The control is a host-side approval and least privilege. This connects to the level's second question, on securing an MCP server that exposes internal data, which module 5 answers in full. A weak answer says "MCP lets servers prompt users" and stops, or describes sampling as current without saying it is deprecated.

Check yourself

A tool asks the person "Delete the project? yes/no" halfway through, after it has already archived the files. What is wrong with the order?

Show answer

The tool body runs again on retry, so everything before the last question must be harmless to repeat. Ask first, act after the last answer.