Skip to main content
Glama
privacyscrubber-mcp

privacyscrubber-mcp

guard_apply_patch

DestructiveIdempotent

Reverses token placeholders in AI-generated code or text, restores real secrets from local RAM, and writes the de-anonymized content directly to a target file without exposing secrets to the remote LLM.

Instructions

Zero-Trust Agentic Guard: Reverses token placeholders ([API_KEY_1], [SECRET_1]) in AI-generated code or text, restores authentic values from local volatile RAM, and writes real content directly to target file on disk. Remote LLM never learns actual secrets.

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": {
      "file_path": "<file_path>",
      "content": "<content>"
    },
    "name": "guard_apply_patch"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesCode or text content containing token placeholders to de-anonymize locally before write.
file_pathYesAbsolute path to the destination file to create or update.
session_idNoOptional session ID for multi-agent isolation. Defaults to 'default'.
create_backupNoWhether to create a .bak backup if target file already exists. Defaults to true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.3

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=true, so the write/overwrite risk is covered structurally. The description adds genuinely useful context the annotations do not carry: secrets live only in volatile local RAM and are never exposed to the remote LLM, which tells an agent the operation requires an active local session. It omits the default backup behavior and what happens when a placeholder cannot be resolved.

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?

One dense sentence, front-loaded with the mechanism and ending on the security guarantee, with no filler. It is a run-on that packs three operations together, but every clause carries signal.

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?

For a destructive file-writing tool with no output schema, the description covers the core flow and the local-only secret handling, but leaves out the outcome on unresolvable placeholders, the backup default already listed in the schema, and what the tool returns after writing. An agent can call it correctly but cannot predict edge-case behavior.

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 all four parameters are already documented, and the description adds only marginal meaning by explaining that content contains placeholders to be de-anonymized before write. session_id and create_backup get no additional treatment beyond the schema, which is the correct baseline when the schema does the work.

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?

States specific verbs (reverses placeholders, restores values, writes content) against a specific resource (target file on disk), and names the concrete placeholder syntax ([API_KEY_1], [SECRET_1]). The write-to-disk framing distinguishes it from sibling text tools like reveal_text or sanitize_text, which do not persist to a file.

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

Usage Guidelines3/5

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

The 'Zero-Trust Agentic Guard' framing implies this is the final step after sanitize_text, and the RAM-restore detail implies a live session is required, but the description never states when to use this versus reveal_text or guard_unmask_args, nor what to do if no session exists. Usage is inferable rather than stated.

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