The WSDL comparison is useful because the hard lesson was never only description syntax. For agents, versioning, identity, least privilege, and reliable error semantics need to be first-class in the contract, otherwise tool discovery scales faster than safe interoperability.
Agree on the list. Where I’d split it is between what the contract describes and what the runtime enforces.
Versioning and error semantics belong in the contract. A caller needs to know which version of a tool it’s calling and whether a failure is safe to retry, and MCP already moves that way with schemas, structured errors and tool annotations like idempotent and destructive hints.
Identity and least privilege are different. A contract can declare that a tool is destructive, but it can’t stop someone calling it. Enforcement has to come from something the caller doesn’t control: platform identity, deny-by-default policy per tool, and credentials that never reach the agent. WS-Security tried to carry that in the message, and that’s where the stack got heavy.
So: the contract declares, the runtime enforces. You’re right that discovery is scaling faster than safe interoperability. The registry is past approx 39,000 servers, and nearly all were published with no enforcement.
Building persistent memory for AI agents at Mnemoverse.
I write about the unglamorous half: forgetting, contradiction, and the moment an agent confidently repeats a fact you retracted.
The refund case is where the two halves of the post meet. If the process running the step dies after the refund lands but before its result is written, the runtime retries the step, which is the at-least-once guarantee Dapr documents for activities. So what prevents a second refund is a key the refund tool itself recognizes, and when it is the agent that crashed, the harder question is where that key can come from once its context is gone.
The 2026-07-28 revision narrows where it can live. With the session gone, a server that needs continuity gets it back, in your words, as an ordinary argument on the next call, and even idempotentHint is worded as calling the tool repeatedly with the same arguments. So with an unchanged client, the only thing that can say which refund a call is, across a restart, is what the model puts in the arguments.
That sorts the candidates. A refund handle from the first call, or an instance id minted inside the agent process, lived at most in the context the crash erased. What survives is what the task carries: the order id and the amount the restarted agent reads again from its task. Keyed on those, the second call lands on the first refund. Keyed on anything the run produced, it cannot.
Your Spring AI crash recovery quickstart makes the same move with a caller-owned instance id. On the proxy path, where the client is unchanged and sends plain tools/call requests, what does the proxy match the second refund against?
The agent loop itself runs as a durable workflow. This is the quickstart path. The model’s decision and the arguments it chose are recorded as history. On restart the agent doesn’t ask the model again. It replays the recorded call with the same arguments and the same step identity. The key doesn’t need to survive in the context, because it lives in the runtime’s history. The at-least-once window you describe still exists, so yes, the step ID has to go to the refund tool as an idempotency key, or the tool has to dedupe on its own business key.
An unchanged client, a non-durable agent and plain tools/call through a proxy. Here the answer is that the proxy has nothing reliable to match against. Matching on arguments would block a legitimate second refund of the same amount, and the proxy can’t invent an identity the client never sent. The only safe key is the one you name: business identity the task carries, like the order ID, enforced by the refund system itself. The proxy can enforce policy and record the call, but cannot make the call idempotent.
So “unchanged client” holds for identity and policy, but not for crash recovery. Recovery needs the agent to be durable or the tool to own its idempotency.
GMT strategy and custom B2B outreach lists on request: people and companies by ICP, domain, profile URL, email or name. 1B+ profiles. Claude Code plugins, API, MCP. kevin@outricher.com
The refund question has a cheap answer on metered tools if you key the result instead of the call. Ours skips anyone already delivered in an earlier run and never charges for them again, so an agent that crashes after the pull and restarts can run the same call safely. Statelessness is fine when the idempotency key is in the arguments.
This is similar to the point made by Edward above ^^.
Keying the result rather than the call is the cleaner way to say it. If the tool can recognize “this outcome already happened,” a crash and restart becomes harmless, and the protocol never needs to know.
Its harder when the same arguments can legitimately mean two different actions. Two partial refunds of the same amount on the same order. The outcome alone can’t tell a retry from a second intent, so something has to carry which attempt this is. If the agent’s run is durable, the recorded step can carry that identity across the crash. If not, it has to be in the arguments the task supplies.
So yes, stateless works when the idempotency key is in the arguments. The work is making sure the key captures intent, not just the outcome.
"Keep the protocol thin and put identity, retries and recovery in the runtime" is the load-bearing line, and it's the right lesson from SOA. The sharp edge underneath it: once recovery lives in the runtime, the runtime — not the model — has to own operation identity, because a retried tool call that re-plans with reformatted arguments will defeat any dedup keyed on the request. The thin protocol can't save you there; the durable identity has to be minted above the model and survive the whole call path. I worked that exact boundary out in detail here: dev.to/rudratosh/your-ai-agent-ret...
Staff Software Engineer @ Navan, ML Flow & Cypress Ambassador, Docker Captain and creator of agent-inspect, writing about production AI agents, TypeScript, observability, testing, and developer tools.
Your split between a thin MCP contract and a durable runtime is especially clear in the refund example. A separate failure mode is a tool whose schema or description changes between discovery and replay: the recorded arguments are identical, but their meaning may have changed. Would you pin the tool definition version alongside the durable step and refuse replay when it drifts? That seems useful for both debugging and tool-poisoning audits.
WSDL was read once, when a developer wired the service. An MCP server's tool list goes back into the model's context on every request, so each tool you expose is paid on every call.
True, that’s a real difference, and a one to add. WSDL was paid for at build time. An MCP tool list is paid for at runtime, in tokens and in the model on every call.
The protocol should stay small, and so should each server. Don’t turn every API endpoint into its own tool. Design tools around the tasks an agent actually does. It’s also another reason per-tool policy belongs in the runtime. If a caller can only use 5 of a server’s 40 tools, it should only see those 5. Least privilege and a small context turn are the same IMO.
We're a place where coders share, stay up-to-date and grow their careers.
The WSDL comparison is useful because the hard lesson was never only description syntax. For agents, versioning, identity, least privilege, and reliable error semantics need to be first-class in the contract, otherwise tool discovery scales faster than safe interoperability.
Agree on the list. Where I’d split it is between what the contract describes and what the runtime enforces.
Versioning and error semantics belong in the contract. A caller needs to know which version of a tool it’s calling and whether a failure is safe to retry, and MCP already moves that way with schemas, structured errors and tool annotations like idempotent and destructive hints.
Identity and least privilege are different. A contract can declare that a tool is destructive, but it can’t stop someone calling it. Enforcement has to come from something the caller doesn’t control: platform identity, deny-by-default policy per tool, and credentials that never reach the agent. WS-Security tried to carry that in the message, and that’s where the stack got heavy.
So: the contract declares, the runtime enforces. You’re right that discovery is scaling faster than safe interoperability. The registry is past approx 39,000 servers, and nearly all were published with no enforcement.
The refund case is where the two halves of the post meet. If the process running the step dies after the refund lands but before its result is written, the runtime retries the step, which is the at-least-once guarantee Dapr documents for activities. So what prevents a second refund is a key the refund tool itself recognizes, and when it is the agent that crashed, the harder question is where that key can come from once its context is gone.
The 2026-07-28 revision narrows where it can live. With the session gone, a server that needs continuity gets it back, in your words, as an ordinary argument on the next call, and even idempotentHint is worded as calling the tool repeatedly with the same arguments. So with an unchanged client, the only thing that can say which refund a call is, across a restart, is what the model puts in the arguments.
That sorts the candidates. A refund handle from the first call, or an instance id minted inside the agent process, lived at most in the context the crash erased. What survives is what the task carries: the order id and the amount the restarted agent reads again from its task. Keyed on those, the second call lands on the first refund. Keyed on anything the run produced, it cannot.
Your Spring AI crash recovery quickstart makes the same move with a caller-owned instance id. On the proxy path, where the client is unchanged and sends plain tools/call requests, what does the proxy match the second refund against?
Umm, yes and I agree with this.
There are two different cases.
The agent loop itself runs as a durable workflow. This is the quickstart path. The model’s decision and the arguments it chose are recorded as history. On restart the agent doesn’t ask the model again. It replays the recorded call with the same arguments and the same step identity. The key doesn’t need to survive in the context, because it lives in the runtime’s history. The at-least-once window you describe still exists, so yes, the step ID has to go to the refund tool as an idempotency key, or the tool has to dedupe on its own business key.
An unchanged client, a non-durable agent and plain tools/call through a proxy. Here the answer is that the proxy has nothing reliable to match against. Matching on arguments would block a legitimate second refund of the same amount, and the proxy can’t invent an identity the client never sent. The only safe key is the one you name: business identity the task carries, like the order ID, enforced by the refund system itself. The proxy can enforce policy and record the call, but cannot make the call idempotent.
So “unchanged client” holds for identity and policy, but not for crash recovery. Recovery needs the agent to be durable or the tool to own its idempotency.
The refund question has a cheap answer on metered tools if you key the result instead of the call. Ours skips anyone already delivered in an earlier run and never charges for them again, so an agent that crashes after the pull and restarts can run the same call safely. Statelessness is fine when the idempotency key is in the arguments.
This is similar to the point made by Edward above ^^.
Keying the result rather than the call is the cleaner way to say it. If the tool can recognize “this outcome already happened,” a crash and restart becomes harmless, and the protocol never needs to know.
Its harder when the same arguments can legitimately mean two different actions. Two partial refunds of the same amount on the same order. The outcome alone can’t tell a retry from a second intent, so something has to carry which attempt this is. If the agent’s run is durable, the recorded step can carry that identity across the crash. If not, it has to be in the arguments the task supplies.
So yes, stateless works when the idempotency key is in the arguments. The work is making sure the key captures intent, not just the outcome.
"Keep the protocol thin and put identity, retries and recovery in the runtime" is the load-bearing line, and it's the right lesson from SOA. The sharp edge underneath it: once recovery lives in the runtime, the runtime — not the model — has to own operation identity, because a retried tool call that re-plans with reformatted arguments will defeat any dedup keyed on the request. The thin protocol can't save you there; the durable identity has to be minted above the model and survive the whole call path. I worked that exact boundary out in detail here: dev.to/rudratosh/your-ai-agent-ret...
Your split between a thin MCP contract and a durable runtime is especially clear in the refund example. A separate failure mode is a tool whose schema or description changes between discovery and replay: the recorded arguments are identical, but their meaning may have changed. Would you pin the tool definition version alongside the durable step and refuse replay when it drifts? That seems useful for both debugging and tool-poisoning audits.
@mfussell Filtering the list before the model sees it fixes the context cost and the permissions in one move.
WSDL was read once, when a developer wired the service. An MCP server's tool list goes back into the model's context on every request, so each tool you expose is paid on every call.
True, that’s a real difference, and a one to add. WSDL was paid for at build time. An MCP tool list is paid for at runtime, in tokens and in the model on every call.
The protocol should stay small, and so should each server. Don’t turn every API endpoint into its own tool. Design tools around the tasks an agent actually does. It’s also another reason per-tool policy belongs in the runtime. If a caller can only use 5 of a server’s 40 tools, it should only see those 5. Least privilege and a small context turn are the same IMO.