Tool annotations (readOnlyHint, destructiveHint, openWorldHint) are set
Why it matters
MCP tool annotations (readOnlyHint, destructiveHint, openWorldHint) are the mechanism by which clients decide whether to auto-approve a tool call or prompt the user for confirmation. Without annotations, the MCP spec defaults destructiveHint to true and readOnlyHint to true — meaning a tool that permanently deletes files could be treated as read-only and auto-approved, bypassing any confirmation dialog. Clients that implement safe-by-default behavior rely entirely on these fields to gate destructive operations.
Severity rationale
Low because missing annotations degrade client safety UX but do not themselves cause data loss — the risk depends on how aggressively the client auto-approves unannotated tools.
Remediation
Set annotations on every tool that modifies state, deletes data, or calls external services. Read-only tools should explicitly mark readOnlyHint: true.
// src/tools/delete.ts
server.tool(
'delete_file',
{
description: 'Permanently delete a file from disk',
annotations: {
readOnlyHint: false,
destructiveHint: true,
openWorldHint: false,
},
},
{ path: z.string() },
async ({ path }) => { /* handler */ }
)
For pure read tools like search_files, set readOnlyHint: true, destructiveHint: false so clients can auto-approve them without a confirmation dialog.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the MCP Server Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- external · mcp-spec-tool-annotations — MCP Specification — Tool annotations (readOnlyHint, destructiveHint, openWorldHint)
Taxons
History
- 2026-04-18·v1.0.0·Initial import from mcp-server·automated