Skip to main content
Glama

scan_tool

Scans API tool definitions for security risks such as SSRF, data exfiltration, and privilege escalation before an AI agent is allowed to use them.

Instructions

Scan an API tool definition for security risks before allowing an AI agent to use it. Checks for SSRF, data exfiltration, privilege escalation, etc.

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": {
      "name": "<name>",
      "endpoint_url": "<endpoint_url>"
    },
    "name": "scan_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesTool name (e.g., 'send_email')
methodNoHTTP method (GET, POST, PUT, DELETE)GET
headersNoHeaders the tool sends
parametersNoJSON schema of tool parameters
descriptionNoHuman-readable description of the tool
endpoint_urlYesThe API endpoint URL this tool calls

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden and does add substance by naming the risk classes checked (SSRF, data exfiltration, privilege escalation). It omits the safety profile that matters most here: whether the scanner actually contacts endpoint_url, whether it is side-effect free, and what form the findings take. The trailing 'etc.' also leaves the detection coverage open-ended.

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

Conciseness4/5

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

Two sentences, front-loaded with the action and immediately followed by what is checked. No filler or restatement of the tool name, though the vague 'etc.' slightly weakens the precision of the second sentence.

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

Completeness3/5

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

For a six-parameter tool with nested objects, no annotations, and no output schema, the definition covers invocation adequately but not consumption. An agent has no idea whether the call yields a verdict, a findings list, or a risk score, which is a meaningful gap for a security-gate tool whose result drives a decision.

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 description coverage is 100% and every parameter carries its own description (including method defaulting to GET and headers/parameters shapes), so the schema does the heavy lifting. The description adds no parameter-level meaning beyond that, which is the expected baseline.

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?

States a specific verb and resource: 'Scan an API tool definition'. The object being scanned ('API tool definition') implicitly separates it from sibling scanners like scan_prompt, scan_memory, scan_pii, and scan_mcp_server, so an agent can route correctly. It stops short of naming any sibling explicitly, which keeps it from a 5.

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

Usage Guidelines4/5

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

'...before allowing an AI agent to use it' supplies a clear timing and intent cue: pre-admission vetting of a tool definition. There are no explicit when-not conditions or named alternatives, so it lands at clear-context-without-exclusions rather than full routing guidance.

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