Skip to main content
Glama

Scan content for prompt injection

check_prompt_injection
Read-only

Scan HTML or text you already have (an email, a document, a tool result, a page fetched elsewhere) for prompt injection before it reaches your prompt. To fetch a URL, use read_url instead; for MCP tool definitions or skill files, use audit_mcp_server or audit_agent_skill. Returns risk (0-1), level (low/medium/high), findings (type, snippet, position, confidence), clean_text and wrapped_text, which marks the rest as untrusted data. Costs US$0.002 in USDC on Base or Solana (x402). Max 256 KB.

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": {
      "content": "<content>"
    },
    "name": "check_prompt_injection"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoWhere the content came from (optional); used to resolve relative links in HTML
formatNoHow to parse content: html (default) also strips hidden elements, comments and styles; use text for plain text such as an email body
contentYesThe HTML or text to scan (max 256 KB)
return_textNoInclude clean_text and wrapped_text (default true); false returns only the report, which is smaller

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / content / description
      Previous value: -"The HTML or text to scan"New value: +"The HTML or text to scan (max 256 KB)"
    • addedInput schema / properties / format / description
      Added value: +"How to parse content: html (default) also strips hidden elements, comments and styles; use text for plain text such as an email body"
    • changedInput schema / properties / return_text / description
      Previous value: -"Include the cleaned text (default true)"New value: +"Include clean_text and wrapped_text (default true); false returns only the report, which is smaller"
    • changedInput schema / properties / url / description
      Previous value: -"Where the content came from (optional)"New value: +"Where the content came from (optional); used to resolve relative links in HTML"
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations by disclosing the return payload (risk score, level, findings with type/snippet/position/confidence, clean_text and wrapped_text), the untrusted-data framing of wrapped_text, the price (US$0.002 USDC on Base or Solana via x402) and the 256 KB cap. Cost and size limits are the kind of operational context annotations cannot carry.

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?

Three tight sentences: capability first, sibling routing second, return shape and cost last. No filler, and the most decision-relevant facts are front-loaded.

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?

No output schema exists, so the description carries the burden of explaining return values — and it does, enumerating the report fields and both text outputs. Combined with pricing, size limit and alternative-tool routing, an agent has everything needed to invoke it correctly.

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%, so url, format, content and return_text are already fully documented. The description adds only the 256 KB limit and the default-output behavior (clean_text/wrapped_text), which the schema also covers. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

States a specific verb and resource ('scan HTML or text you already have ... for prompt injection') plus the scope constraint 'before it reaches your prompt'. It also names the sibling tools that handle the cases this tool does not cover, so an agent can distinguish it 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?

Explicit routing: use this for content you already hold (email, document, tool result, fetched page), use read_url to fetch a URL, and use audit_mcp_server or audit_agent_skill for tool definitions or skill files. Both when-to-use and when-not-to-use are stated with named alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources