Skip to main content
Glama

Check a text for prompt injection

check_text_for_injection
Read-onlyIdempotent

Does this text look like an instruction written for an AI? Returns verdict (clean, suspicious or blocked), a score, the reasons and what the firewall would do with it. Use it on text you got from somewhere Spaces does not screen, such as a web page or a file. Logs nothing and changes nothing.

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": {
      "text": "<text>"
    },
    "name": "check_text_for_injection"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile is largely covered; the description nonetheless adds that it logs nothing, changes nothing, and returns a verdict, score, reasons, and the firewall's intended action. That is genuine return-shape disclosure for a tool with no output schema, though it doesn't say what distinguishes 'suspicious' from 'blocked' or whether the result is advisory only.

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?

Three tight sentences: the leading question states the purpose, the second lists the outputs, the third gives usage and the safety guarantee. No filler and nothing buried at the end.

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 one-parameter, read-only detector with no output schema, the description covers purpose, outputs, usage, and side-effect profile. The only meaningful gap is the absent length limit and the practical meaning of the middle 'suspicious' verdict.

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 0%, so the single 'text' parameter carries no documentation at all; the description partially compensates by scoping it to unscreened text from web pages or files. It omits the 20,000-character cap and any guidance on how much context to pass, so the schema's constraints go unexplained.

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?

Names the operation concretely (detect whether text is an instruction aimed at an AI) and enumerates the verdict values returned (clean, suspicious, blocked), which no sibling tool covers. An agent can tell instantly what this does and that it is a detector, not a screener or a logger.

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?

"Use it on text you got from somewhere Spaces does not screen, such as a web page or a file" gives an explicit trigger condition plus concrete examples. It does not name an alternative tool for already-screened text, but the context makes the boundary implicit and no sibling in the catalog overlaps.

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