Skip to main content
Glama

scan_prompt_text

Read-onlyIdempotent

Inspect untrusted external text for hidden Unicode, Bidi overrides, prompt-injection directives, and credential leaks before passing it into an AI prompt.

Instructions

Scan untrusted external text (web excerpts, emails, PR comments, tool outputs) for invisible Unicode smuggling (U+E00xx), Bidi Trojan-Source overrides, prompt-injection directives, and accidental credential leaks.

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": {
      "text": "<text>"
    },
    "name": "scan_prompt_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesUntrusted text payload to inspect before passing into an AI prompt.
source_labelNoOptional short label identifying the input origin (default: external_text).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the safety profile is covered; the description's added value is the concrete threat taxonomy being checked. What it does not disclose is what a scan returns (findings list, severity, pass/fail), whether it redacts or only reports, or how it behaves on clean input — material for a security gate with no output schema. Useful context, but incomplete behavioral disclosure.

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?

A single sentence, front-loaded with the verb and resource, then a tight enumerations of detection classes. No filler and nothing repetitive; every clause adds a distinct detection category.

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?

With only two simple parameters and full schema coverage, the input side is complete. The gap is the output side: there is no output schema and the description never says what comes back or what an agent should do with a positive finding, which matters for a pre-prompt security check. Adequate but not sufficient for the tool's actual role.

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 coverage is 100%, so both `text` and `source_label` are already documented in the schema, including the default for source_label. The description adds no meaning beyond that — it never references source_label or explains whether the label affects severity or is purely for reporting. Baseline 3 is appropriate when the schema carries the burden.

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 ('Scan'), a specific resource ('untrusted external text'), and enumerates exactly what it detects (invisible Unicode U+E00xx, Bidi Trojan-Source overrides, prompt-injection directives, credential leaks). That makes the purpose unambiguous. It stops short of a 5 because it does not distinguish itself from the sibling scan_web_snippet, which on name alone could plausibly accept the 'web excerpts' cited here.

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

Usage Guidelines3/5

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

The phrase 'before passing into an AI prompt' gives an implied timing and the parenthetical input examples (web excerpts, emails, PR comments, tool outputs) help an agent recognize applicable payloads. But there is no explicit when-not guidance and no routing between this and scan_web_snippet for the overlapping 'web excerpt' case, so selection 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.