# Tool rules

What an agent is shown of a tool can instruct the model: "ignore previous instructions", "you must always call this tool first", "do not tell the user". The tool rules read every tool's description, title and schema wording before the agent is shown it or calls it. They are plain rules, the same file in both SDKs (`tool-rules.json`), so every machine gives the same answer. No model reads the tool and no text leaves your machine: a record keeps only what was found, as codes, and the tool's [fingerprints](/docs/fingerprints).

## What they look for

| rule | finds |
|---|---|
| `override-instructions` | text that tells the model to ignore or replace its instructions |
| `role-claim` | text that pretends to be a system, developer or assistant message |
| `fake-tool-result` | a fake tool result or message block |
| `model-address` | text addressed to the model |
| `call-coercion` | text that tells the model to always call this tool, or how to call others |
| `secrecy` | text that tells the model to keep something from the user |
| `exfiltration` | requests for secrets, or for data to be sent elsewhere |
| `zero-width`, `bidi-control`, `tag-characters` | invisible characters, and characters that reorder the text shown |
| `mixed-scripts` | a word that mixes Latin letters with look-alike letters of other scripts |
| `hidden-markup`, `whitespace-padding` | comments, hidden markup, and padding that pushes text out of view |
| `encoded-blob` | a long base64 blob |
| `web-address`, `email-address` | a web or email address |
| `long-description`, `repeated-text` | a description over 4,000 characters, or the same text many times |
| `added-instruction` | a sentence that instructs the model, added since this machine approved the tool |

Each rule has cases it must flag and cases it must not, and a set of ordinary tool descriptions that no rule may flag; both SDKs run them in their tests.

## A flagged tool

A finding blocks in enforce mode: a protected tool is withheld from the agent's tool list at the gateway and its calls are refused. The error names each rule and its reason. In the console, Tools, Held calls, Flagged tools lists them by code; read the definition on your own machine. Approve this definition publishes it as reviewed in the rule set, and the tool is shown and called again. Any change to its description or schema flags it again until a person reviews the new one.
