Skip to main content
Glama

Scan text for threats

promptguard_scan_text
Read-only

Scan text for security threats including prompt injection, jailbreaks, PII leakage, and toxic content. Returns a decision (allow/block), confidence score, threat type, and reason. Each call counts as one Request on your PromptGuard plan. When to use: When reviewing user-facing prompts, testing LLM inputs for safety, or verifying that content is free of injection attacks before sending to an LLM.

Input Schema

NameRequiredDescriptionDefault
textYesThe text content to scan for security threats
content_typeNoWhether the text is a prompt sent to a model or a model's responseprompt

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered structurally; the description's real addition is the cost disclosure that 'each call counts as one Request on your PromptGuard plan', which no annotation conveys. The rest of the behavioral content (decision, confidence, threat type, reason) restates what the existing output schema already returns, so the net value beyond structured fields is modest.

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?

Two sentences, front-loaded with the purpose, followed by a clearly labelled usage clause — no filler. The enumeration of return fields is mildly redundant given the output schema exists, but it is short and reads as a useful summary rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with full schema coverage, annotations, and an output schema, the description covers purpose, quota cost, and usage context, which is most of what an agent needs. It stops short of noting any input-size limits or how to act on a 'block' decision, which would be the remaining gaps.

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%, including the content_type enum explaining prompt vs. response, so the schema carries the parameter semantics on its own. The description adds no guidance about how content_type affects scanning or about text size/format expectations, so baseline 3 applies.

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 gives a specific verb and resource ('Scan text') and enumerates the threat classes it detects (prompt injection, jailbreaks, PII leakage, toxic content), which is far more concrete than a generic 'check text'. It never names its near sibling promptguard_scan_code or promptguard_redact, so the agent must infer the boundary from those tools' own names rather than from this description.

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?

An explicit 'When to use' clause lists three concrete scenarios: reviewing user-facing prompts, testing LLM inputs, and pre-flight checking content before sending to a model. What is missing is any exclusion or routing rule, e.g. when to prefer promptguard_scan_code for code payloads or promptguard_redact when PII should be removed rather than flagged.

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