Skip to main content
Glama

Scan text for prompt injection (paid)

scan_text
Read-onlyIdempotent

Prompt-injection pre-check for text your agent is about to read (tool output, web page, email, document, token names/metadata). Deterministic rules, no LLM: instruction override (EN/DE/FR/ES/IT/PT/PL/RU), role hijack, jailbreaks, system-prompt extraction, fake chat delimiters, text addressed to the AI, concealment, data exfiltration (markdown-image beacons, secrets to URLs), tool/fund hijack (shell pipes, transfers, unlimited approvals, skip-confirmation), crypto lures (seed-phrase requests, claim/airdrop links), hidden text (zero-width, Unicode tag and variation-selector smuggling, bidi, homoglyphs, CSS-hidden HTML, ANSI) and encoded payloads (base64/hex/percent decoded and re-scanned). Returns verdict safe/suspicious/malicious, action allow/treat_as_untrusted_data/block, 0-100 score, findings with character spans, risky links, decoded payloads and a sanitized copy. Batch up to 100 texts per call. Costs $0.002 USDC per call via x402 (charged only on success). Without an x402 wallet you get the payment terms and the paid HTTP URL instead.

Input Schema

NameRequiredDescriptionDefault
textNoText to scan, up to 100000 characters. Use either text or items.
itemsNoBatch: up to 100 texts (e.g. token names, search results, emails), 200000 characters in total, one price.
sourceNoWhere the text comes from; tunes a few rules (token_metadata flags any URL in a token name).
sanitizeNoReturn `sanitized`: the text with invisible characters removed and injected instructions replaced by a marker. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, and the description still adds substantial behavioral context beyond them: deterministic rules with no LLM, batch ceiling of 100 texts, cost of $0.002 USDC per call charged only on success, and what happens without an x402 wallet. It also discloses the full return payload (verdict, action, score, findings with spans, decoded payloads, sanitized copy), which is a lot of load-bearing detail for a no-output-schema tool.

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?

The lead clause front-loads the purpose and the use context, and the remaining length is spent on concrete detection categories rather than filler. The long enumeration of threat classes is dense but each item carries information; it could be broken into a list for readability but nothing is genuinely wasteful.

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?

With no output schema, the description takes on responsibility for describing returns, and it does so thoroughly — verdict values, action values, score range, findings with character spans, risky links, decoded payloads, sanitized copy. Combined with the pricing and wallet fallback behavior, an agent has everything needed to decide whether to call and how to interpret the result.

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 `text`, `items`, `source`, and `sanitize` are all already documented, and the enum tuning note lives in the schema itself. The description adds only the batch ceiling ('up to 100 texts per call'), which is already in the schema as maxItems, so it stays at the baseline 3 rather than earning more.

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 states a precise verb and resource (scan text for prompt injection) and enumerates the exact threat classes covered, so an agent knows exactly what the tool does. It does not explicitly contrast itself with the sibling `preview_scan_text`, so the only thing separating free preview from this paid call is the cost sentence, which requires inference.

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?

It gives a clear trigger condition — text your agent is about to read — with concrete examples (tool output, web page, email, document, token metadata). It never names an alternative tool such as `preview_scan_text` or `list_rules`, and offers no when-not-to-use guidance, so the alternative-selection half of the dimension is missing.

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