DET-196 · agent · confidence High
Guarding Tool Descriptions from Silent Edits
Hash every MCP tool description and schema, and alert when the text the model reads changes.
The model decides how to use a tool by reading its name, description and schema. If a server changes that text after you approved it, the tool can start steering the agent with hidden instructions, a so-called rug pull, with no code change on your side.
Capture the full tools/list response, server instructions and prompt templates at approval time and every session start. Hash and diff them. Review any change in wording, added parameters, new examples, or text addressed to the model. Also catch two servers exposing tools with the same name, which can shadow the trusted one.
- Data sources
- MCP gateway logsMCP server logsAgent session start logsConfiguration repo history
- Platforms
- AI Platform
Logic
At each connect: h = sha256(canonical_json(tools_list)). Compare with approved_hash[server]. On mismatch, diff the description fields and flag additions matching (?i)(always|before using|do not mention|send|read ~/|also call). Also alert on duplicate tool names across servers in the same session.
False positives
Legit vendor updates change descriptions. Route diffs to an owner for approval, then update the baseline.