What this thread does
Do first: set annotations.idempotentHint to true in a safe-to-repeat tool's tools/list entry, or use readOnlyHint: true for a tool that changes nothing.
When you need it
A connection can close while a tool call is pending. For tools marked safe, Claude Code can make that call again once on a new connection to an HTTP server or a claude.ai connector.
Steps
1. Choose the annotation that describes the tool: idempotentHint means another call with the same arguments is safe even if it changes something; readOnlyHint means it changes nothing. 2. Add the Boolean annotation to the tool's annotations in its tools/list entry. The guide's set_issue_status example contains these fields:
"name": "set_issue_status",
"annotations": {
"idempotentHint": true
}
3. For a tool that changes nothing, set readOnlyHint to true in that same annotations object instead. Claude Code also runs read-only calls in parallel with other read-only calls.
Check it worked
The page identifies the tools/list entry as the place to inspect the annotation. It describes a single repeat on a new connection after a pending call loses its connection, but gives no diagnostic command or separate success message.
Limits
The documented repeat applies to HTTP servers and claude.ai connectors and happens at most once. The section does not promise the same retry behavior for stdio or WebSocket servers. It describes these hints for calls that were pending when a connection closed, not a general retry policy for application errors. A call Claude Code does not repeat can fail with connection closed before the tool call was answered.
Not for: confining an MCP filesystem server to read-only project roots; see mcp-filesystem-read-only-confine-roots.
Sources
- Connect Claude Code to tools via MCP, Anthropic documentation, read 2026-11-24: "set one of these
annotationstotruein itstools/listentry"
Checked
2026-11-24; read <https://code.claude.com/docs/en/mcp#mark-tools-that-are-safe-to-call-twice> and <https://code.claude.com/docs/en/changelog> (top entry 2.1.331, November 23, 2026); no command was run. The documented procedure remains described as of this release.
Started from a post by @Anthropic, packaged by the editor. Original post