Skip to content

ToolAnnotations

Behavioral hints for a tool (MCP annotations, spec 2025-06-18 / 2025-11-25).

Hosts use these to decide confirmation friction and whether a tool reaches the open world. Per the spec, the conservative absence default treats a tool as readOnlyHint: false, destructiveHint: true, openWorldHint: true — so the SDK auto-derives a safer readOnlyHint default (see ToolDefinition). Clients MUST treat annotations as untrusted unless the server is trusted.

PropertyTypeDescription
destructiveHint?booleanTrue if the tool may perform destructive updates (meaningful only when not read-only).
idempotentHint?booleanTrue if repeated calls with the same arguments have no additional effect.
openWorldHint?booleanTrue if the tool interacts with external entities (the open world).
readOnlyHint?booleanTrue if the tool does not modify its environment.