Skip to main content
Glama

Scan text for prompt injection

scan_text
Read-onlyIdempotent

Scans untrusted text for prompt injection before your agent reads or acts on it: web page text, emails, documents, tool results or another agent's message. Flags instruction overrides, jailbreak personas, system-prompt extraction, fake delimiters, exfiltration URLs, tool hijacking, hidden Unicode and encoded payloads (deterministic rules). Use scan_url when you only have a link (it also checks hidden HTML) and scan_tools for MCP tool definitions. Text up to 100000 characters. Free: 30 calls/day per IP shared by scan_text, scan_url and scan_tools, with full results (max 10/min; invalid input is not counted). After that the tool returns an error with the x402 pay URL ($0.003 USDC on Base, Polygon, Arbitrum One or Solana per call at https://api.youraitools.co/injectscan/v1/scan) or prepaid credits. Returns risk_score (0-100), verdict (safe | suspicious | malicious), flagged, categories[] {category, score, description}, findings[] {rule, category, start, end, text} and free_tier usage. Read-only safety signal, not a guarantee.

Input Schema

NameRequiredDescriptionDefault
textYesThe untrusted text to scan, as one plain string (1-100000 characters; longer text is truncated and flagged). Offsets in findings refer to this string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / text / description
      Previous value: -"Text to scan (up to 100000 characters)"New value: +"The untrusted text to scan, as one plain string (1-100000 characters; longer text is truncated and flagged). Offsets in findings refer to this string."
  2. Changed1 schema field changed
    • changedInput schema / properties / text / description
      Previous value: -"Text to scan (up to 2000 characters on the free tier)"New value: +"Text to scan (up to 100000 characters)"
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the safety profile, but the description adds substantial context beyond them: what it detects, free-tier limits (30/day per IP shared across all three tools, 10/min, invalid input not counted), and exactly what happens on quota exhaustion (error with x402 pay URL, price, chains). It also candidly scopes the result as a 'safety signal, not a guarantee.'

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?

Front-loaded with purpose and alternative routing before limits and pricing. It is dense and somewhat long, but nearly every clause (detection categories, rate limits, return fields) carries information an agent needs; minor trimming of the pricing detail was possible.

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 tool with no output schema, the description enumerates the return shape (risk_score, verdict, flagged, categories, findings, free_tier usage) and clarifies truncation semantics. An agent has everything needed to call it and interpret the result.

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

Parameters4/5

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

Schema coverage is 100% and the schema already explains the character range, truncation behavior, and offset semantics. The description reinforces the 100000-character limit but adds little the schema doesn't already say, so it sits at the baseline for a fully documented single-parameter schema.

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 ('scans untrusted text for prompt injection') and enumerates the exact content classes it covers. It explicitly distinguishes itself from both siblings, telling the agent to use scan_url for links and scan_tools for MCP definitions.

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?

Gives explicit when-to-use guidance ('before your agent reads or acts on it') and names both alternatives with the condition that selects each: scan_url when you only have a link, scan_tools for tool definitions. Nothing is left to inference.

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