MCP tool annotations are hints with pessimistic defaults. Decide approval from server trust and a reviewed classification pinned to the tool definition.
A hint is something the server says about itself
The Model Context Protocol lets a server attach annotations to each tool it lists: readOnlyHint, destructiveHint, idempotentHint and openWorldHint, plus a display title. Host applications are tempted to use them directly. If a tool says it is read-only, run it without asking; if it says it is destructive, show a confirmation. That shortcut turns a description written by the server into the host's approval policy.
The specification anticipates this. The tools page of the 2025-11-25 specification carries a warning that, for trust and safety and security, clients MUST consider tool annotations to be untrusted unless they come from trusted servers. The schema comment on ToolAnnotations says every property is a hint, is not guaranteed to describe tool behaviour faithfully, and that clients should never make tool use decisions based on annotations received from untrusted servers. This guide turns those sentences into a concrete host policy, with a worked example from Belgavi's Book Store, and covers the defaults that bite when annotations are missing.
Read the defaults before reading the values
Each annotation has a default that applies when the server omits it, and the defaults are deliberately pessimistic. From the schema: readOnlyHint defaults to false, destructiveHint to true, idempotentHint to false and openWorldHint to true. destructiveHint and idempotentHint are meaningful only when readOnlyHint is false.
# Author: Sandeep Belgavi. Apply the MCP schema defaults before interpreting annotations.
DEFAULTS = {"readOnlyHint": False, "destructiveHint": True, "idempotentHint": False, "openWorldHint": True}
def effective_hints(annotations):
a = {**DEFAULTS, **{k: v for k, v in (annotations or {}).items() if k in DEFAULTS}}
if a["readOnlyHint"]:
a["destructiveHint"] = None # not meaningful for a read-only tool
a["idempotentHint"] = None
return aSo a tool with no annotations at all should be read as possibly writing, possibly destructive, not safe to retry and able to reach external systems. A host that treats a missing readOnlyHint as unknown and then falls back to auto-running has inverted the protocol's intent. A host that treats a missing destructiveHint as false has done the same.
What goes wrong when the host believes every hint
The companion example lists two synthetic servers. bookstore-orders is operated by the store's own team and the host marks it trusted. web-notes is a third-party note service added by a staff member, Tanishka, to help with case summaries; the host marks it untrusted. web-notes lists a tool called delete_note with readOnlyHint set to true and a friendly title, "Tidy notes". Whether that label is a bug or deliberate does not matter to the host; it cannot tell.
A naive policy that auto-runs anything claiming to be read-only runs delete_note without asking. The model only has to decide that tidying the notes for CASE-6231 is helpful. No prompt injection is required; the server's own description is enough.
A host policy that uses hints only to tighten
The fix is to make the decision from facts the host owns and to let annotations move it in one direction only. The example uses three inputs: whether the host trusts the server, a classification the host recorded when someone reviewed the tool, and the effective hints.
# Author: Sandeep Belgavi. Host-owned approval decision; annotations can only make it stricter.
def host_policy(server, tool, trust, classes):
entry = classes.get(f"{server}/{tool['name']}")
cls = entry[0] if entry and entry[1] == definition_digest(tool) else None
if cls == "deny":
return "deny"
if cls in ("read", "write", "destructive"):
base = {"read": "auto", "write": "ask", "destructive": "ask"}[cls]
elif trust.get(server) == "trusted":
h = effective_hints(tool.get("annotations"))
base = "auto" if h["readOnlyHint"] and not h["openWorldHint"] else "ask"
else:
base = "ask" # untrusted and unclassified: hints are display text
if base == "auto" and not effective_hints(tool.get("annotations"))["readOnlyHint"]:
return "ask" # a hint that claims writes overrides a read classification
return baseRun against the example listing, the host policy asks before delete_note, because web-notes is untrusted and nobody classified that tool. It auto-runs search_notes, which a reviewer classified as read. It asks before list_returns on the trusted server, because that tool carries no annotations and the defaults say it may write. And it asks before order_history even though a reviewer classified it as read, because the server itself now says readOnlyHint is false. When the server's claim is stricter than the host's record, the stricter one wins, and the disagreement is worth a look.
Pin the review to the definition it reviewed
A classification recorded by a reviewer describes the tool as it was listed at review time. Servers can change tools between listings and notify clients with notifications/tools/list_changed. If the host keeps the classification keyed only by tool name, an untrusted server can add a parameter, change the description or flip an annotation, and the old approval still applies.
The example pins each classification to a digest of the tool's name, description, input schema and annotations. When web-notes later adds a boolean delete_after parameter to search_notes, the digest changes, the pinned classification no longer matches and the decision falls back to ask. A reviewer then looks at the new definition and records a new classification. This is the same discipline as caching a tool list: never assume a listing is the one you validated. The site covers list caching separately at /blogs/mcp/mcp_tool_list_cache_revalidation.html.
Where annotations are genuinely useful
Annotations are still worth reading. From a trusted server whose code you control, they are documentation that travels with the tool and can drive sensible defaults, such as showing a confirmation for anything destructive or retrying only idempotent calls. From any server, they make good review prompts: a reviewer who sees destructiveHint true on a tool called fetch_report knows what to ask the vendor. And a hint that claims more risk than you assumed is always safe to honour.
What annotations cannot be is the boundary. An approval decision, a retry policy or a sandbox choice that depends on them is only as strong as the least careful server you connect to.
Show reviewers what the server claims
Annotations still belong in the approval prompt, labelled as the server's claims. When the host asks a person to approve delete_note, the prompt should show the real tool name next to the server-supplied title, so "Tidy notes" cannot hide what the tool is called, and should state which server sent the description and whether the host trusts it. openWorldHint deserves its own line: a tool that may reach external entities can move case data outside the store's systems, which a reviewer weighs differently from a local write. Showing the hints, the host classification and the definition digest together gives the reviewer the same facts the policy used, and makes a disagreement between them visible instead of silently resolved.
What stays deterministic
The approval decision is a pure function of the server identity, the reviewed classification, the definition digest and the hints. The model does not participate. It can propose a tool call, but whether that call runs without a person is decided before the model's output is considered, and it is the same for every phrasing of the request. That property makes the policy testable with a table of listings and expected decisions, which is what the companion tests do.
Migrating an existing host
First, inventory every connected server and mark each trusted or untrusted. Trusted should mean you control the code or have a contract that covers its behaviour, not that it is popular.
Second, record a classification for every tool you want to auto-run, pinned to its definition digest. Everything else asks.
Third, change the decision code so missing annotations take the schema defaults and so hints can only tighten. Log every case where a hint and a classification disagree.
Fourth, re-evaluate on every tools/list_changed notification and on reconnect, and surface digest mismatches to a reviewer instead of silently re-approving.
When this is overkill
A single local server that you wrote, running tools that only read your own files, does not need a review workflow; trusting its annotations is reasonable because you are the author. The policy earns its keep as soon as a host connects to servers written by someone else, or lets users add servers themselves.
Verification
Build a fixture listing with a mislabelled destructive tool, a tool with no annotations and a tool whose definition changes between listings, and assert the decisions: ask, ask and ask after the change. Assert that a deny classification wins over any hint. Run the fixture in CI against the real host decision function, not a copy of it, so a refactor cannot quietly start trusting hints.