Skip to main content
Glama

Static-scan MCP tool definitions for injection and exfil

static_scan_tools
Read-onlyIdempotent

Scans advertised MCP tool fields for injection, credential, and hidden-Unicode risks, returning findings, a 0–1 gate score, and ruleset digest.

Instructions

Run only the static-scan gate (signatures with context guards, text folded first) over every advertised tool field: name, description, input schema, title, output schema, annotations and extension metadata. Returns findings, a 0..1 gate score, and the published ruleset digest. Use list_scan_rules for the current rule table and identity.

When to use: you have a tools/list dump and want injection / credential / hidden-Unicode hits without origin, pinning, or the threat feed. Cheaper and narrower than vet_mcp_server.

When NOT to use: you need the full host decision (vet_mcp_server); you want operator glob classification (classify_sensitive_tools); you want the published rule table itself (list_scan_rules).

Behaviour: local regex+guard evaluation, no network, no mutation. Advisory-tier hits are reported with advisory=true and do not reduce the score. Does not launch servers or send tool output to a model.

Returns structured JSON matching outputSchema. Example: static_scan_tools({ tools: [{ name: "add", description: "Add two integers.", inputSchema: { type: "object" } }] }).

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": "static_scan_tools"
  }
}

Input Schema

NameRequiredDescriptionDefault
toolsYestools/list items to scan (1..256). Same shape as vet_mcp_server.tools.

Output Schema

NameRequiredDescriptionDefault
scoreYesstatic-scan gate contribution: 1 minus the penalty for the worst non-advisory severity. Advisory hits do not change this number.
rulesetYes
findingsYesHits from the 36-rule table, including advisory-only codes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.24.0
    • changedOutput schema / properties / ruleset / properties / version / description
      Previous value: -"Monotonic static-scan ruleset version (currently \"12\")."New value: +"Monotonic static-scan ruleset version. Use list_scan_rules for the current version and digest."
  2. Changed1 schema field changedv0.18.0
    • changedOutput schema / properties / findings / description
      Previous value: -"Hits from the 25-rule table, including advisory-only codes."New value: +"Hits from the 36-rule table, including advisory-only codes."
  3. Changed5 schema fields changedv0.16.0
    • changedInput schema / properties / tools / items / additionalProperties
      Previous value: -falseNew value: +true
    • addedInput schema / properties / tools / items / properties / annotations
      Added value: +{
      +  "description": "Advertised hints; untrusted metadata, never authorization.",
      +  "type": "object"
      +}
    • addedInput schema / properties / tools / items / properties / outputSchema
      Added value: +{
      +  "description": "Unmodified output schema, including nested descriptions; scanned and pinned.",
      +  "type": "object"
      +}
    • addedInput schema / properties / tools / items / properties / title
      Added value: +{
      +  "description": "Unmodified advertised tool title; scanned and pinned.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / ruleset / properties / version / description
      Previous value: -"Monotonic static-scan ruleset version (currently \"4\")."New value: +"Monotonic static-scan ruleset version (currently \"12\")."
  4. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish readOnly/idempotent/non-destructive/closed-world, and the description adds material context beyond them: local regex+guard evaluation with no network and no mutation, advisory-tier hits flagged advisory=true and excluded from the score, and an explicit note that it does not launch servers or send tool output to a model. That is exactly the behavioral disclosure an agent needs for a scanner whose score semantics are non-obvious.

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?

It is well front-loaded and cleanly partitioned into When to use / When NOT to use / Behaviour / Returns, so a skimming agent still lands on the routing logic first. The trailing example call is mildly redundant against a 100%-documented schema, which keeps it just short of full marks.

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

Completeness5/5

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

For a single-parameter scanner with a rich schema, full annotations, and an output schema that the description explicitly defers to ('Returns structured JSON matching outputSchema'), nothing an agent needs to invoke it correctly is missing. Cost profile, safety profile, scoring semantics, and sibling routing are all covered.

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 the single 'tools' array is thoroughly documented in the schema itself (length limits, pass-through warnings, per-field meanings), so the schema carries the semantic burden. The description confirms the same shape as vet_mcp_server.tools and supplies an example invocation, but adds no field-level meaning beyond what is already structured; baseline 3 applies.

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

Purpose5/5

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

The description opens with a specific verb and scope: 'Run only the static-scan gate ... over every advertised tool field: name, description, input schema, title, output schema, annotations and extension metadata.' That enumerates the exact surface scanned, and it returns named artifacts (findings, 0..1 gate score, ruleset digest), so an agent can distinguish it from vet_mcp_server and list_scan_rules without opening a schema.

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

Usage Guidelines5/5

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

It gives explicit 'When to use' (a tools/list dump, injection/credential/hidden-Unicode hits, no origin/pinning/threat feed, cheaper than vet_mcp_server) and explicit 'When NOT to use' routing to three named siblings for their specific jobs. The alternatives are named alongside the condition that selects each.

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