Blog / How to optimise your MCP tools by knowing how agents call them

Your “read-only” hints can make agents spend money: getting MCP tool annotations right

Annotations look like documentation. To some agent apps they're policy: they decide whether a call needs the user's approval. Get them wrong and the app waves through the calls you most wanted it to stop.

Leonid Bugaev · Published 21 Oct 2026

What the hints mean

HintMeansSet it when
readOnlyHint: trueDoesn't change anythingPure reads inside your system
destructiveHint: trueMay cause changes the user should approveSpends, starts, sends, deletes, overwrites
idempotentHint: trueCalling twice is harmless, safe to retrySame call, same effect, no extra cost
openWorldHint: trueReaches outside systemsWeb fetches, third-party APIs, messages

What we found

We read the annotations of a 99-tool production MCP server (43 marked read-only, 44 marked destructive) and compared them with the tools' own descriptions.

Check your annotations against what tools really do.

We compare every tool's hints with its behaviour and test how the agent apps your users run treat them.

Test your MCP

How apps use them

In a live check, Codex exec with approval policy “never” refused every tool on that server marked destructive, unless the tool was approved by name. That's a real guard, and it keys off your hint. A spend tool marked non-destructive skips it.

Other apps differ and change between versions; some ask before any MCP call, some auto-approve by setting. Don't rely on any one behaviour: make the hints true.

How to annotate

// spends credits or starts work
"annotations": {"readOnlyHint": false, "destructiveHint": true,
                "idempotentHint": false, "openWorldHint": true}

// pure read inside your system
"annotations": {"readOnlyHint": true, "openWorldHint": false}

Go deeper: Agent refusal states, How to optimise your MCP tools, MCP scorecard.

How to check yours

  1. List every tool with its four hints.
  2. Grep descriptions for spend, credit, charge, send, start, launch, delete.
  3. Flag any match that's non-destructive or idempotent.
  4. Run the MCP scorecard: it flags write-like names marked safe.

Back to how to optimise your MCP tools.

How we measured

FAQ

How do MCP tool annotations affect agents?

They're hints the agent app may use to decide what needs the user's approval or what's safe to retry. In our tests Codex exec refused tools marked destructiveHint: true unless they were approved by name, so the hint changed behaviour.

Should a tool that spends credits be destructive?

Yes. Mark anything that spends money or credits, starts work, sends messages or writes data as destructiveHint: true and idempotentHint: false, even if the amount is small.

What does idempotentHint mean?

That calling the tool twice with the same arguments has no extra effect, so retrying is safe. A tool that starts a search or charges per call isn't idempotent.

Is readOnlyHint enough to keep testing safe?

No. It's a hint, it can be wrong, and read-only tools can still reach the outside web. For safe testing, enforce an allowlist outside the agent.

Check your annotations against what tools really do.

We compare every tool's hints with its behaviour and test how the agent apps your users run treat them.

Test your MCP