Skip to main content
Glama
privacyscrubber-mcp

privacyscrubber-mcp

guard_git_diff

Read-onlyIdempotent

Inspects staged or unstaged git diffs locally and masks newly added credentials, tokens, or PII in RAM, returning a sanitized diff for AI commit generation or code review.

Instructions

Zero-Trust Agentic Guard: Inspects unstaged or staged git diffs locally, sanitizes any newly added or modified credentials, tokens, or PII in RAM, and returns safe diff for AI commit generation or code review.

Input Schema

NameRequiredDescriptionDefault
cwdNoOptional repository directory. Defaults to current workspace root.
sectorNoOptional alias for 'profile'. The industry sector or compliance vertical to apply (e.g. 'medical', 'finance', 'legal', 'dev', 'hr', 'accounting', 'security', 'compliance', 'underwriting', 'telecom').
stagedNoIf true, runs 'git diff --cached'. If false, runs 'git diff'. Defaults to false.
profileNoDetection profile. Available: 'Dev' (default), 'General', or any of the 30 specialized industry profiles. Defaults to 'Dev'.
session_idNoOptional session ID for multi-agent isolation. Defaults to 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.3

TDQS

A4.1/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 closed-world, so the safety profile is covered. The description adds genuinely new context beyond them: sanitization happens in RAM and the returned diff is 'safe', implying the working tree/index is not mutated. It stops short of saying how secrets are masked (placeholder scheme) or whether the redaction is reversible via reveal_text.

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?

A single front-loaded sentence that leads with the guard identity and then the operation, with no filler. The compound clause structure is dense but every element (local inspection, in-RAM sanitization, safe output, downstream use) carries information.

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?

There is no output schema, and the description does state the return value's nature ('safe diff'), which is the main thing an agent needs. Remaining gaps are minor: what the diff looks like when nothing is found, how masked values appear, and the relationship to reveal_text for unmasking. Given zero required parameters and full schema coverage, this is close to complete.

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 cwd, sector, staged, profile, and session_id are already documented in the schema, including defaults and the staged-vs-cached switch. The description adds nothing parameter-specific, so the baseline 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?

States a specific verb and resource ('inspects unstaged or staged git diffs'), plus the transformation applied ('sanitizes newly added or modified credentials, tokens, or PII') and the intended consumer ('AI commit generation or code review'). This distinguishes it clearly from siblings like sanitize_text, sanitize_file, and guard_read_file, which operate on supplied content rather than a repo diff.

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?

The description establishes clear context of use: run it before AI-driven commit message generation or code review so secrets never reach the model. It does not name explicit alternatives or exclusions (e.g., use sanitize_text for arbitrary strings, or reveal_text to recover masked values), so routing between similar siblings is left partly to inference.

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