Skip to main content
Glama
jakobautomation

agentsvc-mcp

prompt_injection_check

Check untrusted text for prompt injection before your AI agent reads it. Returns safe, suspicious, or malicious verdicts, risk score, detected techniques with evidence, and advice.

Instructions

Prompt Injection Detection — Prompt injection detection for AI agents: check untrusted text (a web page, email, tool result or user message) before your agent reads it. Returns a verdict safe, suspicious or malicious, a 0 to 100 risk score, the techniques found (instruction override, role hijack, system prompt extraction, requests to move funds or reveal secrets, fake chat-template tags, hidden unicode, command execution) with exact quotes as evidence, and advice. Combines fixed pattern checks, which can only raise the verdict, with a Claude Haiku 5.5 classifier, so text that tries to talk the classifier into "safe" still gets flagged. Quoted examples in articles about prompt injection are not counted as attacks. Up to 20,000 characters; optional context (what your agent is doing). Cost: $0.004 USDC per call. Latency p99: 8000ms.

Input Schema

NameRequiredDescriptionDefault
textYesUntrusted text to check, max 20,000 chars
contextNoOptional: what the agent is doing, max 300 chars

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/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 behavioral burden and does so richly: it discloses the verdict scale (safe/suspicious/malicious), the 0-100 risk score, the detection techniques, the dual pattern+classifier architecture and its adversarial resistance, the quoted-example exclusion, the 20,000-char limit, per-call cost ($0.004 USDC), and p99 latency (8000ms). This is exactly the operational context an agent needs before invoking.

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?

Dense but front-loaded: the core purpose leads, then return shape, then internals, then limits/cost/latency. The parenthetical technique list is long but each item adds discriminative value. Minor density cost, no filler sentences.

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?

There is no output schema, so the description must describe returns — and it does precisely (verdict, risk score, techniques with quotes, advice). Combined with cost, latency, and input constraints, an agent has everything needed to call and interpret the result.

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 'text' and 'context' including the max lengths. The description restates the character limit and characterizes 'context' as 'what your agent is doing', matching the schema rather than adding new semantics. Baseline 3 applies.

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 and resource ('check untrusted text... for prompt injection') with the exact scope of inputs (web page, email, tool result, user message). It is clearly distinguishable from nearby siblings like scam_message_check, text_classify, or pii_redact because it names the threat class and the agent-facing use case.

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?

Explicitly says when to use it ('before your agent reads it') and enumerates the untrusted sources that qualify. It does not name alternative tools or state when NOT to use it (e.g., versus scam_message_check or pii_redact), so it stops short of full 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