Defining Tool Call Replay
Tool call replay is the reuse, resubmission, or manipulation of a previously issued tool call within an AI agent system to trigger an action without fresh authorization. It is a mechanism-level risk rather than an abstract one: it depends on how a specific tool call is structured, authenticated, and executed, not on the broader security posture of the agent. In agent frameworks and Model Context Protocol (MCP) implementations, a tool call is a discrete request, typically structured as a JSON-RPC message identifying a tool name and its parameters. If that call, once valid, can be captured and resubmitted and the receiving system cannot distinguish the replay from the original, the call executes again. This is distinct from an attacker forging new, unauthorized content; replay depends on reusing something that was already legitimate at the time it was issued.
How Tool Calls Are Structured, and Why Replay Is Possible
MCP defines a client-host-server architecture in which a host, acting on behalf of an agent, invokes tools on a server through structured JSON-RPC requests. Each request carries a tool identifier and parameters, and for HTTP-based transports, MCP's authorization specification layers OAuth 2.1 token issuance and scoping on top of these calls. What the base specification does not mandate is per-call replay resistance, such as nonces or timestamp validation, at the tool-invocation layer itself. Authorization in this model governs who can call a tool and with what scope, but it does not inherently verify that a given call instance has not already been executed. This separation between session-level authentication and call-level uniqueness is the structural condition that makes replay a distinct risk from authentication failure alone.
Conditions That Make a Captured Tool Call Exploitable
A valid tool call becomes replayable when specific safeguards are absent. Missing nonces mean the server has no way to reject a call it has already processed. Absent timestamp validation allows a call issued minutes or hours earlier to still be accepted as current. Lack of idempotency keys means the server cannot recognize a resubmission of the same logical request and will instead treat it as a new one, repeating any side effects such as a financial transaction or a data write. Weak session binding compounds this: if a captured call remains valid outside the session or context in which it was originally issued, it can be replayed even while the underlying token or credential has not expired. None of these conditions require the token itself to be compromised, which is why replay is a separate exposure from credential theft.
Tool Call Replay vs. Adjacent Agent Risks
The questions below distinguish tool call replay from related, but separate, concerns in agent tool-calling architectures.
Is tool call replay the same as a traditional web API replay attack?
It applies the same underlying principle, captured requests being resubmitted, but occurs within agent tool-invocation structures like MCP, where the call identifies a tool and parameters rather than a conventional API endpoint.
Does MCP prevent replay by default?
No. MCP's base specification does not mandate per-call