Skip to main content
Glama
sunglasses-dev

Sunglasses

scan_text

Scan text for prompt injection, data exfiltration, credential leaks, and other AI agent security threats. Returns findings, severity, and a decision to allow, block, quarantine, or redact.

Instructions

Scan text for prompt injection, data exfiltration, credential leaks and other AI agent security threats. Returns findings, a severity, a decision (allow, block, quarantine or allow_redacted) and inspection_complete. The decision is reported to the caller and is not enforced. This tool blocks nothing and returns the matched text of each finding in full, allow_redacted included. isError false means the scan ran, not that the input is clean. Read is_clean and inspection_complete in the result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text content to scan for security threats.
channelNoThe input channel type. Affects which patterns are checked. Unknown channels are rejected (fail closed).message

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.9

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it declares the tool blocks nothing, that the decision is advisory only, that it always returns full matched text including for allow_redacted, and that isError=false means the scan ran rather than that input is clean. These are exactly the non-obvious traits an agent must know to interpret results correctly.

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, then immediately the return shape and caveats; every sentence is functional. It is on the dense side with some overlap between 'not enforced' and 'blocks nothing', but nothing is wasted.

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 2-parameter tool with no annotations and no output schema, the description fully compensates by documenting the return fields (findings, severity, decision, inspection_complete, is_clean) and the interpretive pitfalls. Nothing an agent needs to call or interpret the tool 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?

Schema coverage is 100% and both parameters (text, channel) are fully documented in the schema, including the fail-closed enum behavior, so the baseline is 3. The description adds no parameter-specific detail beyond what the schema already supplies.

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 (scan) and resource (text) plus the exact threat categories covered (prompt injection, data exfiltration, credential leaks). The 'text' scope implicitly separates it from scan_file and scanner_info, so an agent can route correctly.

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?

Usage is implied by the threat list and the 'text' scope, but there is no explicit when-to-use/when-not guidance or any naming of the alternatives (scan_file, scanner_info). The statement that the decision 'is not enforced' is useful, though it is behavioral rather than routing guidance.

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