Skip to main content
Glama
sunglasses-dev

Sunglasses

scan_text

Scan text to detect prompt injection, data exfiltration, credential leaks, and other AI agent security threats, returning allow/block/quarantine decisions with severity and findings.

Instructions

Scan text for prompt injection attacks, data exfiltration attempts, credential leaks, and other AI agent security threats. Returns a decision (allow/block/quarantine), severity, and detailed findings.

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
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden. It discloses the return contract ('allow/block/quarantine', severity, detailed findings) and implies a read-only scanning operation. It stops short of covering error behavior or permissions, but for a scanning tool this is a meaningful and mostly sufficient 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?

Two sentences with no wasted words. The first sentence front-loads purpose and scope, and the second crisply summarizes the return value, making the definition easy to parse quickly.

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 simple two-parameter tool with no annotations and no output schema, the description gives enough to call it correctly: input scope, threat categories, and return shape. It omits exact findings structure and failure modes, but these are non-critical given the schema already documents the channel and its fail-closed behavior.

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 the schema already documents both parameters well. The description adds no parameter-specific meaning beyond the high-level 'text content to scan,' so the baseline score of 3 is appropriate.

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?

The description uses a specific verb ('Scan') and resource ('text'), names concrete threat categories (prompt injection, data exfiltration, credential leaks), and states the output (decision, severity, findings). This clearly distinguishes it from scan_file and scanner_info.

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?

The description makes the intended input type obvious by repeatedly grounding the tool in 'text' and specifying the kinds of security threats it catches. It does not explicitly tell the agent to choose scan_file for files or scanner_info for info, but the context is clear enough that the agent can route correctly.

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