Skip to main content
Glama
pii-filter

pii-filter

by bratislava

redact_file

Reads local logs, JSON, or text files, redacts PII and secrets, and returns the content after human approval in a review UI.

Instructions

Read a local file (log, .gz log, JSON, text document), redact PII/secrets and return the content after the user approves it in the review UI. Use this instead of Read for logs and official documents.

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": {
      "path": "<path>"
    },
    "name": "redact_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 load, and it does disclose the most important trait: output is gated on human approval in the review UI. However, it omits what happens on rejection, whether the original file is left untouched (a read, not an in-place rewrite), any size or gzip-specific limits, and how redaction categories are chosen.

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?

Two tight sentences with the core action front-loaded and the routing hint second — nothing is wasted. The phrase "official documents" is slightly vague, but overall the structure is efficient rather than padded.

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 one-parameter tool with an output schema present and no annotations, the description covers input formats, the approval gate, and the primary alternative. The main residual gap is the failure/rejection path in the review UI, which an agent would need to know to handle a declined approval.

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 0% for the single 'path' parameter, so the description must compensate; it partially does by indicating the kinds of files the path may point to (log, .gz log, JSON, text document). It still says nothing about path form (absolute vs relative), allowed roots, or whether directories are accepted.

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 a specific compound action (read a local file, redact PII/secrets, return approved content) and enumerates supported inputs (log, .gz log, JSON, text document). It clearly distinguishes itself from the generic Read tool, but does not distinguish itself from sibling tools like redact_text or scan_pii, leaving the redaction-vs-scan boundary implicit.

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?

"Use this instead of Read for logs and official documents" gives an explicit alternative and the condition that selects it, which is more than most definitions offer. It stops short of stating when NOT to use it (e.g., non-sensitive files) or how to choose between it and redact_text/scan_pii.

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

Deploy Server

Other Tools