Skip to main content
Glama

AI Code Security Gate

Prompt Security & PII Gate

prompt_gate

Redact PII/secrets from a prompt and block prompt-injection phrases. Costs 1¢ per check. Returns sanitized_text, blocked, matched_phrase.

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

Input Schema

NameRequiredDescriptionDefault
textYes
api_keyNo

Output Schema

NameRequiredDescriptionDefault
resultYes

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?

The description adds genuinely useful context beyond the annotations: a per-call cost of 1¢ and the fact that a check can both redact and block. The annotations already declare readOnlyHint=false, destructiveHint=false and non-idempotency, and nothing here contradicts them. However, it does not explain what happens on a block (is the prompt rejected, or returned with blocked=true alongside sanitized_text?) or whether api_key is needed for billing, which is the main behavioral unknown for a paid gate.

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 short sentences, front-loaded with the capability and followed by cost and return fields. Every clause carries information; there is no filler.

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

Completeness3/5

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

An output schema exists, so listing sanitized_text, blocked and matched_phrase is somewhat redundant, and the cost disclosure partially compensates. Still missing for a paid, mutating-account tool with 0% parameter documentation: what categories count as PII/secret, what a block does to the caller's flow, and the role of api_key.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the full burden and largely fails it. The 'text' parameter is only obliquely implied by 'from a prompt', and the optional 'api_key' parameter is never mentioned at all, leaving an agent to guess whether it is required for the paid check or is an override for authentication.

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 two specific operations on a specific resource: redacting PII/secrets from a prompt and blocking prompt-injection phrases. That is a clear verb+resource statement an agent can act on. It stops short of 5 because it draws no boundary against siblings such as shadow_scan or media_check, which an agent might reasonably confuse with a security-scanning tool.

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 when-to-use or when-not-to-use guidance, no statement of prerequisites, and no reference to any alternative tool. The agent learns what the tool does but not under what conditions it should be selected over the other scanning/check tools in the catalog.

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.