MCP Shipyard
← Guides

MCP tool annotations explained

What readOnlyHint, destructiveHint, idempotentHint and openWorldHint mean in the MCP spec, what the defaults are, and how Claude and ChatGPT reviewers use them.

annotationsreadOnlyHintdestructiveHintopenWorldHintreviewmcp

Tool annotations are four optional booleans and a title on each tool in your tools/list response. They are small, and they are the most common reason a connector fails automated review. Both the Claude directory and the ChatGPT directory check them, and the defaults in the spec are not what most authors assume.

Sources: the MCP schema reference for the definitions, the tools spec, Claude's review criteria, and OpenAI's plugin guidelines and MCP server guide.

The four hints and their defaults

From the schema:

AnnotationMeaning when trueDefault if omitted
readOnlyHintThe tool does not modify its environmentfalse
destructiveHintThe tool may perform destructive updates. false means additive updates only. Meaningful only when readOnlyHint is falsetrue
idempotentHintCalling repeatedly with the same arguments has no additional effect. Meaningful only when readOnlyHint is falsefalse
openWorldHintThe tool may interact with an open world of external entities. false means a closed domaintrue

Read the defaults twice. A tool with no annotations is, to a client, a tool that writes, may destroy things, is not safe to retry, and reaches the open internet. That is the most alarming reading available, and it is what a client assumes when you say nothing. Anything you can honestly narrow, narrow.

There is also a title, a human-readable name for the tool used in UIs. The schema's display precedence is the top-level title, then annotations.title, then name.

The spec says these are hints

The schema is blunt: all properties in ToolAnnotations are hints, not guaranteed descriptions of behavior, and clients should never make tool-use decisions based on annotations from untrusted servers. The tools spec repeats that clients must consider annotations untrusted unless they come from trusted servers.

OpenAI's docs add the other half: annotations "do not grant permission or replace authentication, authorization, scope checks, input validation, or human confirmation for irreversible operations". Set them honestly, then enforce the real rules on your server.

How Claude uses them

Claude's review criteria require every tool to have a title and the applicable hint: readOnlyHint: true for read-only tools and destructiveHint: true for tools that modify or delete data. The stated use: Claude can use the hints to decide when to ask the user for confirmation. Read-only tools can run without per-call confirmation and destructive tools can require it, depending on user, organization and conversation permission settings.

You see this in the submission portal as well. The Tools step syncs your tools and groups them by whether their annotations declare them read-only or write, and it flags tools missing titles or annotations. Fix those on your server before submitting.

Two rules next to the annotations matter just as much for review:

  • A tool that accepts both safe and unsafe HTTP methods is rejected, however well you annotate it. Split it.
  • Annotating a tool readOnlyHint: true while it writes is the kind of mismatch a Verified reviewer finds, because that review runs every tool.

How ChatGPT uses them

OpenAI is stricter about completeness. The guidelines require readOnlyHint, destructiveHint and openWorldHint to be explicit true or false on every tool, set to match actual behavior. The submission scan reports annotations_required if any of the three is missing or inaccurate. OpenAI's docs do not describe idempotentHint, so set it where it is true, but do not expect it to be checked.

OpenAI's definitions:

  • readOnlyHint: true for retrieval, computation or previews. false for external state changes, persisted artifacts, stateful jobs, queued work, or outbound writes like posting, emailing and uploading.
  • destructiveHint: true for deletion, overwriting, cancellation, access revocation, and irreversible sends or transactions. false only for additive writes. The guidelines say reversibility alone does not justify false, which means an "archive" tool you consider reversible still counts if it overwrites.
  • openWorldHint: true for public or open-ended entities such as web search or arbitrary destinations. false for a bounded private account, workspace or catalog, even if it is hosted externally. Connectivity alone does not decide it.

The guidelines page says justifications for annotations are no longer required, but the errors page still lists a justification_required error. If the portal asks, write one sentence per annotation.

A decision table for your tools

Tool doesreadOnlydestructiveidempotentopenWorld
Fetch a record from your own databasetruefalsen/afalse
Search the public web or an arbitrary URLtruefalsen/atrue
Create a record, new one each callfalsefalsefalsefalse
Create or update by a client-supplied keyfalsefalsetruefalse
Update fields on a recordfalsetrue*truefalse
Delete, cancel, revokefalsetruetruefalse
Send an email or post a messagefalsetruefalsetrue

*An update that overwrites previous values is destructive under OpenAI's rule. An update that only fills empty fields is additive.

For read-only tools set destructiveHint: false explicitly. The spec says destructive is only meaningful when read-only is false, but OpenAI wants all three explicit, and an explicit false is cheaper than a failed scan.

Setting them

Raw tools/list output:

{
  "name": "cancel_order",
  "title": "Cancel order",
  "description": "Use this when the user asks to cancel an order that has not shipped. Cancels the order and issues a refund. Cannot be undone.",
  "inputSchema": {
    "type": "object",
    "properties": { "order_id": { "type": "string", "description": "Order ID, for example ord_1042" } },
    "required": ["order_id"]
  },
  "annotations": {
    "title": "Cancel order",
    "readOnlyHint": false,
    "destructiveHint": true,
    "idempotentHint": true,
    "openWorldHint": false
  }
}

With the TypeScript SDK, pass them when you register the tool:

server.registerTool(
  "cancel_order",
  {
    title: "Cancel order",
    description: "Use this when the user asks to cancel an order that has not shipped. Cancels the order and issues a refund. Cannot be undone.",
    inputSchema: { order_id: z.string() },
    annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
  },
  handler,
);

Then fetch the live tools/list and check what the server actually sends. A stale build or a proxy that rewrites responses can make the wire differ from the source.

Mistakes we see

  1. One block copied to every tool. All tools readOnlyHint: true, including the write ones. Reviewers read the tool names; create_ and delete_ tools marked read-only fail.
  2. Read tools with no hints. The default says they write. A client treats them as writes and asks for confirmation on every call.
  3. Write tools marked read-only to avoid prompts. It makes a Verified or ChatGPT review fail, and it removes a safety net your users rely on.
  4. openWorldHint guessed. The question is whether the target set is bounded, not whether you call the network. A query over your own customer's data is closed. A fetch of any URL the model supplies is open.
  5. Descriptions that contradict the hints. A tool described as "permanently deletes" with destructiveHint: false.
  6. Annotations present in code, absent at runtime. Always check the wire.
  7. Catch-all tools. A single execute or api_request tool cannot be annotated honestly, because one hint set cannot describe both its safe and unsafe uses.

What a scan checks

Our scan reports missing annotations, missing titles, non-explicit ChatGPT hints, read-named tools not marked read-only, delete-named tools not marked destructive, write tools marked read-only, contradictory hints, undeclared idempotency on write tools, and identical annotations across all tools. Those are heuristics built from the rules above. They flag likely problems, and the reviewer decides.

Check your server

Run the free scan at /scan to see the annotations your server sends today and which tools would be flagged.

Check your server against these rules

Scan runs the checks from this guide against a live URL and lists each failing rule with its fix.

Scan a server