Skip to main content
Glama
topaisaas-dev

Universal Native MCP Server Hub

topai_prompt_shield

Read-onlyIdempotent

Audits prompts and untrusted text before LLM inference, detecting prompt injections, jailbreaks, toxic payloads, and PII leakage to return a safety verdict and threat score.

Instructions

Scans user prompts or untrusted external text in <1ms to detect adversarial prompt injections, jailbreak attempts, toxic payloads, and PII leakage. Use as a pre-inference security guardrail before passing untrusted user input or scraped web content to an LLM. Do not use for compressing safe prompts (use topai_token_slimmer instead). Stateless, read-only, idempotent security evaluation returning a boolean safety verdict and threat score (0.0 to 1.0).

Input Schema

NameRequiredDescriptionDefault
promptYesRaw user input, system prompt fragment, or untrusted external document text to audit for injection and PII risks.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds meaningful context beyond them: sub-millisecond latency, statelessness, and the return shape (boolean verdict plus 0.0-1.0 threat score). It does partially restate the read-only/idempotent traits that annotations already carry, which keeps it from a 5, but the added latency and return-format detail is genuinely useful.

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?

Four tight sentences, front-loaded with the core action and threat list, then usage, then the anti-pattern with the alternative, then the behavioral/return summary. Every sentence earns its place with no filler.

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?

Although there is no output schema, the description explicitly states what is returned (boolean safety verdict and a 0.0-1.0 threat score), and annotations cover the safety profile. An agent has everything needed to call this correctly.

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% and there is a single required parameter, so the schema fully documents the input. The description's mention of prompt/system-fragment/external-document text mirrors the schema description 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?

The description states a specific verb (scans) and resource (user prompts / untrusted external text) and enumerates the exact threats detected (prompt injections, jailbreaks, toxic payloads, PII leakage). It explicitly distinguishes itself from the sibling topai_token_slimmer, so an agent can route correctly without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use (pre-inference guardrail before passing untrusted input or scraped content to an LLM), when-not-to-use (compressing safe prompts), and names the alternative tool by name. Nothing is left to inference.

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