Skip to main content
Glama
privacyscrubber-mcp

privacyscrubber-mcp

reveal_text

Read-onlyIdempotent

Restore original private data from RAM-only session placeholders in final AI responses before display, supporting both batch and streaming output.

Instructions

STEP 3: Call this last. You MUST pass your final generated response through this tool to restore tokens (e.g., [EMAIL_1]) back with the original private data from the local volatile RAM-only session map before showing it to the user. Supports both standard batch mode and real-time streaming mode (stream: true).

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

Input Schema

NameRequiredDescriptionDefault
textYesThe AI generated response (or streaming chunk) containing placeholders to restore.
flushNoOptional. When true in streaming mode, flushes any remaining buffered text at EOF.
streamNoOptional. When true, uses the sliding-window StreamingDetokenizer to prevent token splitting across chunk boundaries.
session_idNoOptional session ID matching the sanitize_text call for multi-agent isolation. Defaults to 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.0.3
    • addedInput schema / properties / flush
      Added value: +{
      +  "description": "Optional. When true in streaming mode, flushes any remaining buffered text at EOF.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Optional session ID matching the sanitize_text call for multi-agent isolation. Defaults to 'default'.",
      +  "type": "string"
      +}
    • addedInput schema / properties / stream
      Added value: +{
      +  "description": "Optional. When true, uses the sliding-window StreamingDetokenizer to prevent token splitting across chunk boundaries.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / text / description
      Previous value: -"The AI generated response containing placeholders to restore."New value: +"The AI generated response (or streaming chunk) containing placeholders to restore."
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "text": {
      -      "description": "The detokenized text with original values restored.",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "text"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Changed1 schema field changedv1.0.2
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "text": {
      +      "description": "The detokenized text with original values restored.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "text"
      +  ],
      +  "type": "object"
      +}
  3. First observedv1.0.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and openWorldHint=false, so the safety profile is covered. The description still adds real context beyond them: the data source is a 'local volatile RAM-only' session map (ephemeral, in-process, never persisted) and the streaming mode uses a sliding window to avoid token splitting across chunks.

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?

The ordering instruction and the restore mechanism are front-loaded in the first clause, so an agent can act on the first sentence alone. It is mostly tight, though the streaming sentence partly duplicates what the schema already says about the stream parameter.

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?

For a mutation-free, no-output-schema tool with full schema coverage and rich annotations, the description covers purpose, call ordering, data source and streaming behavior. It leaves edge cases unaddressed — e.g., what happens when the session map is empty or a placeholder has no match — which keeps it from 5.

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%, so all four parameters (text, flush, stream, session_id) are already documented in the schema. The description reinforces 'stream: true' and the placeholder-bearing input, but adds no new semantics and never mentions session_id or how it must match the sanitize_text call.

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 states a specific verb+resource: it 'restores tokens (e.g., [EMAIL_1]) back with the original private data' from the session map, which is a concrete inverse of sanitize_text. It falls short of 5 because it does not distinguish itself from the sibling stream_reveal_text, which its streaming-mode sentence appears to overlap with.

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?

It gives explicit ordering and obligation: 'STEP 3: Call this last' and 'You MUST pass your final generated response through this tool ... before showing it to the user'. What is missing is routing guidance — the agent is not told when to prefer this over the sibling stream_reveal_text for streaming cases.

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