Skip to main content
Glama

Agent Guard Prompt Injection & PII Firewall (x402)

agent_guard_sanitize

Hybrid Edge AI firewall (@cf/meta/llama-guard-3-8b + multi-language regex + Base64 decoder) that detects prompt injection and masks corporate PII/secrets (0.008 USDC via x402 on Base).

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": "agent_guard_sanitize"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesUntrusted external input (scraped HTML, email, support ticket, webhook) to inspect and sanitize
maskPiiNoRedact emails, credit cards, CPFs, CNPJs, API tokens, and private keys (default: true)
deepScanNoRun Cloudflare Workers AI (@cf/meta/llama-guard-3-8b) semantic classifier (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It usefully discloses the paid x402/Base settlement (0.008 USDC), which an agent must know before calling, plus the underlying classifiers. However, it never says what happens when injection is detected (blocked, flagged, or passed through) or what the response contains, which are the traits that matter most for a security gate.

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?

A single dense sentence with no filler; the model stack and payment terms are front-loaded. The parenthetical stack listing is somewhat marketing-flavored but each element does convey detection capability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a security tool with no annotations and no output schema, the description should explain what the caller receives (sanitized text vs. verdict vs. both) and how detected injections are reported. Neither is covered, leaving the agent unable to predict the result shape or act on a detection.

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 `text`, `maskPii`, and `deepScan` are already fully documented with defaults in the schema. The description adds no per-parameter meaning (e.g., what disabling deepScan costs in detection quality), so the 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 the two concrete functions (detect prompt injection, mask PII/secrets) and the mechanisms behind them (llama-guard-3-8b, regex, Base64 decoder), so an agent can tell what the tool does. It is phrased as a product blurb rather than a verb-first statement, and there are no siblings to differentiate from, but the purpose is unambiguous.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance in the description. The intended input classes (scraped HTML, email, support ticket, webhook) live in the schema's `text` parameter description rather than in the tool description, and no alternatives or exclusion conditions are stated.

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.