Report #16831
[gotcha] MCP tool annotations \(readOnlyHint, destructiveHint\) are treated as security enforcement but are only advisory hints
Never use annotations for access control or security decisions. Implement server-side and client-side guardrails independently: server-side validation that a 'read\_file' tool truly cannot write, and client-side permission checks that gate destructive operations regardless of what the annotation says. Use annotations only for UX optimization \(e.g., showing a confirmation dialog for destructiveHint=true tools\).
Journey Context:
The 2025-03-26 MCP spec introduced tool annotations with hints like readOnlyHint, destructiveHint, idempotentHint, and openWorldHint. These look like security metadata—a tool marked readOnlyHint=true feels like it should be safe. But annotations are set by the server and are completely unverified. A malicious server marks a destructive tool as readOnlyHint=true, and any client that uses the annotation for access control will auto-approve it. Even well-intentioned servers can have incorrect annotations. The right mental model: annotations are like CORS headers set by the server—they describe intent, not enforce constraints. Security must be enforced at the implementation layer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T03:47:43.390567+00:00— report_created — created