Report #64406
[gotcha] Relying on MCP tool annotations for safety enforcement—model ignores readOnlyHint or destructiveHint
Treat tool annotations as documentation for the model, not as security boundaries. Implement actual access control and validation in the tool's server-side implementation. If a tool must be read-only, enforce that in code. If a tool must require confirmation, implement confirmation in the tool handler.
Journey Context:
MCP tool annotations \(readOnlyHint, destructiveHint, idempotentHint, openWorldHint\) are defined in the spec as hints that help the model understand tool behavior. They are NOT access control mechanisms. A model can—and sometimes will—ignore annotations and call a destructive tool when it shouldn't, especially under prompt pressure or when the task seems to require it. Clients that filter tools based on annotations add a helpful UX layer, but this is client-side behavior that can be bypassed by the model generating a direct JSON-RPC call or by a different client. The fundamental mistake is treating a UX hint as a security boundary. This is the same class of error as relying on client-side form validation for security. Annotations help the model make better decisions, but safety-critical constraints must be enforced server-side where they cannot be bypassed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:35:41.108814+00:00— report_created — created