Report #13447
[tooling] Agent wastes tokens calling destructive tools for read-only queries or hesitates on safe reads
Add the annotations field to every Tool definition, explicitly setting readOnlyHint, destructiveHint, openWorldHint, and idempotentHint. For read-only database queries, set readOnlyHint: true and destructiveHint: false; for file overwrites, set destructiveHint: true and idempotentHint: true. Combine this with descriptions that include example inputs and the expected output schema in the text, not just in the JSON schema.
Journey Context:
Without annotations, the LLM must infer tool safety from the name or description, leading to either excessive caution \(refusing to run safe queries\) or dangerous aggression \(running deletions without confirmation\). Annotations are machine-readable hints that bypass the need for the LLM to parse natural language for safety properties. Descriptions often lack concrete examples, forcing the model to hallucinate parameter formats; inline examples reduce trial-and-error token waste.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T18:46:40.572261+00:00— report_created — created