Skip to main content
Glama

afr_audit_mcp_tools

Read-onlyIdempotent

Audit MCP tool listings to detect hidden Unicode smuggling and indirect prompt-injection in tool metadata before an agent trusts them.

Instructions

Detect hidden Unicode smuggling and indirect prompt-injection inside MCP tool metadata.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tools": "<tools>"
    },
    "name": "afr_audit_mcp_tools"
  }
}

Input Schema

NameRequiredDescriptionDefault
toolsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the threat model it inspects for, but says nothing about what it returns (findings, severities, clean/flag result) or any limits on input size or depth of scanning, which matters for an audit tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One front-loaded sentence with no filler; the threat targets and the scope arrive immediately. Nothing could be trimmed without losing substance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter, read-only detector with annotations covering safety and no output schema, the description conveys what is scanned and where. The main remaining gap is the shape of the result, which the absence of an output schema leaves undocumented.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the schema only says the single parameter is an array of generic objects. The description partially compensates by establishing that these objects are MCP tool metadata, which is real added meaning, but it does not specify the expected shape (name/description/inputSchema fields) or whether nested descriptions are inspected.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb ("Detect") and two named threat classes (hidden Unicode smuggling, indirect prompt-injection) scoped to "MCP tool metadata." That is far more informative than the tool name alone and is plainly distinct from siblings like afr_scrub_opsec or afr_replay_diff, though it never explicitly contrasts itself with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance, no prerequisites (e.g. pass the full tool list before trusting any tool metadata), and no mention of how this differs from the sibling scanning/sanitizing tools. Only the vaguest usage context can be inferred from the purpose sentence.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.