Skip to main content
Glama

Check several texts for prompt injection

check_texts
Read-only

Checks batches of untrusted texts for prompt injections before an agent acts on them, returning one result per text and the number flagged.

Instructions

Check a batch of untrusted texts (for example every email in an inbox or every search result) for prompt injections. Returns one result per text, in the same order, plus how many were flagged.

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": {
      "texts": "<texts>"
    },
    "name": "check_texts"
  }
}

Input Schema

NameRequiredDescriptionDefault
textsYesTexts to check.
thresholdNoDecision threshold for INJECTION (0.5 default; 0.99 is stricter, fewer false alarms).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already establish that this is a read-only, non-open-world operation, lowering the bar. The description usefully adds that results come back one per input in the same order plus a flagged count, but says nothing about scoring, latency on large batches, or input-size limits, which matters for a batch 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, no filler. The purpose is front-loaded and the return contract follows immediately, which is exactly the information order an agent needs.

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?

With no output schema, the description takes on responsibility for explaining the return value and does so at a high level (one result per text, same order, plus a flagged count). The internal shape of each per-text result (label vs. score) is not stated, but annotations already cover the safety profile and the schema covers inputs, so the gaps are minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters are documented in the schema, including the threshold's default and the tradeoff at 0.99. The description adds the batch framing that maps directly to the texts array (multiple inputs, ordered output), giving slightly more than the schema alone.

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 a batch of untrusted texts ... for prompt injections') and scopes it to batches, which distinguishes it from the singular sibling check_text. The second sentence even declares the return shape, so an agent can select it without opening any schema.

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?

Concrete usage examples ('every email in an inbox or every search result') make the intended context clear, and the batch framing signals that this is the multi-item choice over check_text. It stops short of an explicit when-to-use/when-not statement or naming the alternative, so it is clear context rather than 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