Report #57040
[gotcha] Agent performs destructive operation when a read-only one was intended — tool annotations were ignored
Never rely on MCP tool annotations for safety enforcement. Implement server-side validation, confirmation gates, and permission checks for destructive operations. Use tool names that make mutability explicit \(e.g., \`delete\_file\` not \`remove\`\). Add server-side dry-run or preview modes for destructive tools.
Journey Context:
The MCP spec defines ToolAnnotations with hints like \`readOnlyHint\`, \`destructiveHint\`, \`idempotentHint\`. However, these are explicitly hints — the spec says clients 'SHOULD' respect them but compliance is optional and varies widely. Many MCP clients don't check annotations at all, so a tool marked \`readOnlyHint: true\` might still be called in a destructive context by the LLM. Safety must be enforced server-side: the MCP server itself must reject or gate destructive operations, because client-side annotation checking is unreliable and the LLM has no intrinsic understanding of these hints.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:13:50.853509+00:00— report_created — created