Skip to main content
Glama

scan_prompt

Detects prompt injection, jailbreaks, and role hijacking in user input, returning a risk score and identified threats to support secure AI interactions.

Instructions

Scan a prompt or user input for injection attacks (jailbreaks, prompt injection, role hijacking). Returns risk score and detected threats.

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": {
      "content": "<content>"
    },
    "name": "scan_prompt"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesThe prompt or user input text to scan for injection attacks
agent_idNoOptional agent ID for tracking

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose what is detected and what comes back (risk score and detected threats). It says nothing about side effects, whether scanned content is logged or retained, latency, or how agent_id affects tracking behavior, which leaves real gaps for a security-sensitive tool.

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, front-loaded with the action and target, followed by what is returned. No hedging or redundant phrasing; every clause adds information.

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 utility with no output schema, the description covers what it does, what threat categories it catches, and the shape of results. An agent has enough to call it correctly, with only side-effect and storage behavior left unstated.

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 the content and agent_id parameters are already documented in the schema. The description reinforces that content is the text being scanned but adds no format, size-limit, or tracking semantics beyond what the schema states; 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 names a specific verb (scan) and target (prompt or user input), plus enumerates the threat classes (jailbreaks, prompt injection, role hijacking). This implicitly distinguishes it from siblings like scan_output or scan_memory by naming the input target, though it never explicitly contrasts with them.

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 target ('prompt or user input') implies when to reach for this versus output or memory scanners, but there is no explicit when/when-not guidance, no mention of the alternatives, and no stated prerequisites. Usage is inferable rather than directed.

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