A vending machine, and a contractor
Every server in the first four projects was a vending machine. Coins in, crisps out. Whatever it costs you, you knew the price when you pressed the button.
Sampling is a contractor you gave your account number to. They are doing work for you, genuinely, and when they need something they charge it to your account and carry on. The work might be excellent. The bill is still yours, and you did not see it before it happened.
A tool call — the vending machine
You call tools/call. The server runs its code on its machine and returns text.
It costs you one HTTP request. The server pays for whatever it did.
A sampling request — the contractor
The server answers input_required: “run this model call for me.”
It costs you real tokens on your key, at a size the server chose.
What actually happens on the wire
Read steps 7 and 8 again. The server is not returning anything at that point. It is asking, and the thing it is asking for is your money.
Why anyone would want this
It is easy to read the above as a mistake in the protocol. It isn't, and the kitchen server is a fair example of why.
The kitchen can read the pantry's whole event log. It knows exactly which jars moved, when, and by how much. What it cannot do is write a paragraph of English summarising the week — that needs a language model, and the kitchen has no reason to have one. Buying an API key so a small MCP server can summarise its own logs is absurd.
So instead it asks the thing that definitely has a model — the host that just called it — to do the language part. The data never leaves the server's control. The intelligence is borrowed.
The line that makes it optional
One consequence worth knowing before you copy anybody's MCP client.
This danger is opt-in. The host declares its capabilities on every request:
capabilities: { sampling: {} }Delete that one line and every sampling request from every server fails
immediately with -32021, before anything is estimated or spent.
And now the part that surprised everybody, including the person who wrote the server: the way every tutorial tells you to implement this does not work here.