Report #29670
[gotcha] MCP tool fails because it depends on state from a previous call that was lost or the model forgot to chain
Design tools to be stateless and self-contained. If state must persist across calls \(session IDs, working directories, cursors\), return it explicitly in the tool result and require it as an explicit parameter in subsequent calls. Never assume the model will remember implicit server-side state.
Journey Context:
Some MCP tools are stateful—they open a connection, set a working directory, or create a session on one call and expect subsequent calls to use that state. But the model may not call them in the expected order, or context truncation may cause it to forget the session identifier. The model has no reliable way to track server-side state. Making state explicit \(return session IDs, require them as parameters\) turns implicit coupling into explicit data flow that survives context truncation and model confusion. This is the same principle as RESTful statelessness applied to tool design.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:11:32.993738+00:00— report_created — created