Skip to main content
Glama

Scan text for prompt injection

scan_text
Read-onlyIdempotent

Scans text an agent is about to read for prompt injection before acting, returning a 0–100 risk score, verdict, categories, and exact matching spans; runs locally on up to 100,000 characters.

Instructions

Check text your agent is about to read (a web page, email, document, tool result or another agent's message) for prompt injection before acting on it. Returns risk_score 0-100, verdict (safe | suspicious | malicious), categories and the exact matching spans. Runs locally, up to 100,000 characters.

Input Schema

NameRequiredDescriptionDefault
textYesText to scan (up to 100,000 characters)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish this as a safe, idempotent, closed-world read. The description adds genuinely new behavioral facts: it runs locally (no data exfiltration) and accepts up to 100,000 characters. It also outlines the response shape (risk_score, verdict, categories, spans), though it says nothing about latency or cost.

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 dense sentences with no filler: what to scan, when, what comes back, and where it executes. The usage condition is front-loaded ahead of the return-value details.

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 correctly compensates by naming the return fields, and it covers execution locality and the size cap. Nothing essential for correct invocation is missing.

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?

There is one parameter and schema coverage is 100%; the description only repeats the 100,000-character limit already stated in the schema. It adds no guidance on encoding, truncation behavior, or what happens with oversized input.

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 (check/scan) and resource (text the agent is about to read) and enumerates the input sources it covers: web page, email, document, tool result, or another agent's message. The purpose cannot be confused with any other operation.

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?

Timing is explicit: run it 'before acting on' untrusted content. There are no sibling tools to route between, so no alternatives need naming, but the description does not say when a scan can be skipped (e.g., trusted internal text).

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

Deploy Server

Other Tools