Skip to main content
Glama

Redact text

redact

Replace PII, PHI, and secrets in text with tokens so sensitive values stay in a server-side vault while models work with safe placeholders.

Instructions

Replace PII/PHI/secrets in text with tokens. Returns redacted_text and a session_id; the original values stay in the server vault.

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

Input Schema

NameRequiredDescriptionDefault
modeNoReplacement mode: one of placeholder, synthetic, hash, mask, label. Default: server setting.
textYesText to scrub
policyNoPolicy pack(s), e.g. 'hipaa', 'dpdp,secrets', 'all,-URL'. Default: server setting.
session_idNoReuse an existing session for consistent tokens. Omit to start a new one.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already indicate the tool is not read-only, not destructive, not open-world, and not idempotent. The description adds useful behavioral context beyond that by stating it returns redacted_text and a session_id and that original values remain in the server vault, which is important for understanding privacy and session behavior.

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?

The description is two sentences, front-loaded with the core action and followed by the key return/security behavior. It contains no redundant or wasted wording.

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?

The tool has a complete input schema, an output schema, and annotations covering safety characteristics. The description adequately explains purpose and vault persistence, though it does not address sibling selection or session reuse semantics, which are partly covered by the schema.

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 description coverage is 100%, and the schema already documents mode, text, policy, and session_id in detail. The description adds no parameter-specific meaning beyond naming session_id in the return context, so the baseline score of 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 and resource: "Replace PII/PHI/secrets in text with tokens." It clearly establishes that this operates on text rather than files or JSON, which helps distinguish it from redact_file and redact_json.

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?

The description gives no explicit guidance on when to use this instead of scan, redact_file, redact_json, or other siblings. The intended use is inferable from the verb, but there are no alternatives, exclusions, or prerequisites.

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