Skip to main content
Glama

ReleaseGuard

CI PyPI npm License: Apache 2.0 Python 3.10+

Scan a dataset or model directory for PII and secrets with Presidio, redact what you find, and generate a public-release bundle, a Hugging Face dataset/model card plus an EU AI Act Art. 53(1)(d) training-data summary, in one command.

ReleaseGuard is not a PII detector. It's the glue between "I have a dataset I want to publish" and "I have a sanitized bundle with the paperwork already drafted." Detection is entirely Presidio's, an actively maintained open-source project with 10,000+ GitHub stars. ReleaseGuard chains Presidio's scan straight into redaction and into the two documents almost every public dataset/model release actually needs, instead of you writing a script to do it yourself.

Install

pip install releaseguard-cli
python -m spacy download en_core_web_sm   # Presidio's default NLP model (~13 MB, one-time)

# npm launcher (thin wrapper around the PyPI package, see "Why two registries" in FAQ)
npx releaseguard-cli --help

en_core_web_sm is spaCy's small English model and Presidio's own quickstart default. For higher-accuracy detection, install the larger model instead and pass --spacy-model:

python -m spacy download en_core_web_lg   # ~400 MB, Presidio's recommendation for production
releaseguard scan ./data --spacy-model en_core_web_lg

Related MCP server: scan-your-ai-toolkit

Quickstart

This is a real, unedited run against a two-row sample CSV, not a mockup:

$ releaseguard scan dataset --score-threshold 0.4
Scanned 1 file(s) under dataset
Total findings: 7

entity type                 count
URL                         3
PERSON                      2
EMAIL_ADDRESS               2

That URL: 3 line is a real Presidio quirk worth calling out rather than hiding: its regex-based URL recognizer also fires on the domain portion of an email address (example.com inside alice.rivera@example.com), so email-heavy text double-counts as both EMAIL_ADDRESS and URL. This is Presidio's own recognizer behavior, unmodified, and it's worth noting entity counts can shift slightly between Presidio/spaCy versions since detection is NLP-based, not a fixed lookup table (this run used presidio-analyzer 2.2.364 with en_core_web_sm 3.8.0). Filter it out with --entities if you only care about email addresses:

releaseguard scan dataset --entities EMAIL_ADDRESS,PERSON,PHONE_NUMBER

ReleaseGuard scan filtered to specific entity types with --entities and --json for structured output

Redact, then package a release bundle in one command:

$ releaseguard package dataset --output bundle --score-threshold 0.4
Release bundle written to bundle
  dataset card: bundle/README-dataset-card.md
  EU AI Act Art. 53(1)(d) summary: bundle/eu-ai-act-training-summary.md
  redacted source: bundle-redacted-source

bundle/eu-ai-act-training-summary.md opens like this, real scan counts filled in, everything else left as an explicit placeholder for a human to complete:

# Training Data Summary (EU AI Act Art. 53(1)(d))

_Draft generated by ReleaseGuard... Based on the European Commission's
training-data-summary template, published 2025-07-24. This covers the
narrow, currently-binding categorical-summary requirement only -- it is
not a claim of full training-data disclosure._

## 4. Personal Data and PII Handling (from ReleaseGuard scan)

A Presidio-backed scan (detector: `presidio`) covered 1 file(s) under `dataset`.

| PII/secret category detected | Occurrences |
| --- | --- |
| `EMAIL_ADDRESS` | 2 |
| `PERSON` | 2 |
| `URL` | 3 |

--json on every command switches to machine-readable output for scripts and agents.

Quick summary

  • Use it for: turning a Presidio scan into a redacted copy plus a dataset/model card and an EU AI Act Art. 53(1)(d) training-data summary, from one command instead of three separate tools and a hand-written template

  • What it's not: a PII detector of its own, or a claim of "total transparency"/full training-data disclosure compliance. See What ReleaseGuard is not

  • Runs entirely local. No dataset content, scan results, or redacted output is ever sent to a remote service.

CLI reference

ReleaseGuard --help output listing the scan, redact, package, and mcp subcommands

$ releaseguard --help
Usage: releaseguard [OPTIONS] COMMAND [ARGS]...

  Scan, redact, and package a dataset/model directory for public release.

  ReleaseGuard is a packaging layer on top of Presidio (originally a Microsoft
  project, now maintained by data-privacy-stack) -- it does not detect PII
  independently of Presidio. See the README's "What ReleaseGuard is not"
  section.

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  mcp      Start an MCP server exposing scan/redact/package as agent tools.
  package  Scan PATH, optionally redact it, and generate a release bundle...
  redact   Scan PATH and write a redacted copy to --output.
  scan     Scan PATH (a file or directory) for PII and secrets using...

Command

Purpose

scan PATH

Scans a file or directory (CSV, JSON/JSONL, plain text) with Presidio. --entities, --score-threshold, --spacy-model, --json.

redact PATH --output DIR

Scans, then writes a redacted copy to DIR. Never touches PATH. --strategy mask|hash|remove, --overwrite.

package PATH --output DIR

Scans (and by default redacts first), then writes a Hugging Face dataset/model card plus the EU AI Act Art. 53(1)(d) summary to DIR. --kind dataset|model|both, --redact-first/--no-redact-first.

mcp

Starts an MCP server (stdio) exposing scan_directory_tool, redact_directory_tool, package_release_tool. Requires pip install "releaseguard-cli[mcp]" on Python 3.10+.

Every command supports --json. Full flag reference: releaseguard <command> --help.

Library API

from releaseguard.detectors import get_detector
from releaseguard.scanner import scan_directory
from releaseguard.redactor import redact_directory
from releaseguard.packager import build_release_bundle
from releaseguard.types import RedactionStrategy

detector = get_detector("presidio", score_threshold=0.4)
scan_result = scan_directory("dataset/", detector)

redaction_result = redact_directory(
    scan_result, "dataset-redacted/", strategy=RedactionStrategy.MASK
)

bundle = build_release_bundle(
    scan_result, "bundle/", redaction_result=redaction_result, source_kind="dataset"
)
print(bundle.eu_ai_act_summary_path)

PIIDetector (releaseguard.detectors.base) and FileReader (releaseguard.readers.base) are the two extension points. Presidio is currently the only detector shipped; CSV, JSON/JSONL, and plain text are currently the three readers shipped. Both are registries, not hardcoded calls, specifically so a new format or a second detection backend is a scoped addition later. See CONTRIBUTING.md.

MCP Server

ReleaseGuard ships a Model Context Protocol server so an AI agent (Claude, Cursor, or any MCP-compatible client) can scan, redact, and package a dataset or model directory directly, without a human invoking the CLI by hand.

Install the extra:

pip install "releaseguard-cli[mcp]"

Start it directly with the mcp subcommand:

releaseguard mcp

Add it to your MCP client's config (for Claude Desktop, claude_desktop_config.json). The server is started via a subcommand of the published releaseguard console script, not a separate console script of its own:

{
  "mcpServers": {
    "releaseguard": {
      "command": "uvx",
      "args": ["--from", "releaseguard-cli", "releaseguard", "mcp"]
    }
  }
}

Transport is stdio, so there is nothing to host: the MCP client spawns the server as a local subprocess. Source: src/releaseguard/mcp_server.py.

The server exposes three tools, each returning the same JSON shape as the matching CLI --json output:

Tool

Purpose

scan_directory_tool(path, spacy_model=None, score_threshold=0.35)

Scan a directory for PII and secrets with Presidio.

redact_directory_tool(path, output, strategy="mask", overwrite=False)

Scan, then write a redacted copy to output. Never mutates path. strategy is "mask", "hash", or "remove".

package_release_tool(path, output, kind="dataset", redact_first=True, strategy="mask")

Scan, optionally redact, and write a release bundle (dataset/model card plus the EU AI Act Art. 53(1)(d) summary) to output.

A real example call:

scan_directory_tool(path="./dataset", score_threshold=0.4)
-> {"files_scanned": 1, "root_path": "./dataset", "findings": [...], "entity_counts": {"URL": 3, "PERSON": 2, "EMAIL_ADDRESS": 2}}

Every tool checks that path exists before doing anything else and returns a structured error, {"error": "Path '<path>' does not exist.", "error_type": "PathNotFound"}, instead of a silent, misleading "0 files scanned" success result. Earlier versions of this server skipped that check and let a bad path slip straight into scan_directory, which returned a false success instead of an error; every tool handler is also now wrapped so an unexpected exception comes back as {"error": ..., "error_type": ...} rather than crashing the server. A .well-known/agent.json manifest is shipped at the repo root for A2A-style discovery, listing both the CLI and MCP interfaces and the packages that provide them.

Comparison

ReleaseGuard

Presidio

huggingface_hub card tooling

pii-lib

Detects PII/secrets

No, wraps Presidio

Yes (its own job)

No

Yes (regex + NER, code-training-data scoped)

Redacts detected entities

Yes (via presidio-anonymizer)

Yes (library-level)

No

Yes

Generates a Hugging Face dataset/model card

Yes, from real scan results

No

Yes (manual fields, no scan integration)

No

Generates an EU AI Act Art. 53(1)(d) summary

Yes, from real scan results

No

No

No

One command, scan through release bundle

Yes

No (library only, you write the glue)

No (library only)

No

GitHub stars (checked 2026-08)

New in 2026

~10,300

~3,800

16

Star counts checked live against the GitHub API on 2026-08-03: data-privacy-stack/presidio (originally microsoft/presidio; the project moved organizations, same codebase), huggingface/huggingface_hub, bigcode-project/pii-lib. pii-lib's low star count is itself informative: it is the closest prior attempt at PII redaction scoped to a training-data release workflow, and it has not gained meaningful adoption. ReleaseGuard does not assume that outcome will be different here; see the FAQ entry on demand.

Enterprise data-governance platforms (Databricks Unity Catalog, Credo AI, BigID, and others) already offer PII classification and redaction as part of broader paid platforms aimed at large organizations. ReleaseGuard is a free, single-purpose, open-source alternative for a team that just wants the scan-redact-package workflow for one release, not a governance suite.

What is ReleaseGuard, and why does it exist

ReleaseGuard is an open-source CLI, Python library, and MCP server that chains three steps, PII/secret detection (via Presidio), redaction, and public-release documentation, into one command. Each step already exists as a separate tool: Presidio detects, presidio-anonymizer redacts, huggingface_hub has card-generation helpers, and the European Commission publishes a training-data-summary template as a document you fill in by hand. Nothing before ReleaseGuard chained a real scan directly into a filled-in template.

It exists because publishing a dataset or model responsibly involves running a PII scan, redacting what it finds, and then writing up two documents almost by hand, a card and (for general-purpose AI model providers) an EU AI Act training-data summary. ReleaseGuard automates the second half of that workflow so the resulting documents reflect what was actually scanned, not what someone remembered to write down afterward.

EU AI Act Art. 53(1)(d), stated precisely: this article requires providers of general-purpose AI (GPAI) models to publish a "sufficiently detailed summary" of training content, using the template the European Commission's AI Office published on 2025-07-24 (in force for new models from 2025-08-02, transitional deadline 2027-08-02 for models already on the market, enforcement checks from the AI Office starting 2026-08-02). It requires a categorical summary of data sources and modalities. It does not require raw training samples, full training recipes, or model weights, and it applies specifically to GPAI model providers, not to every dataset publisher. ReleaseGuard's generated summary is a starting draft for that narrow, real requirement, never a claim of broader "total transparency" compliance.

What ReleaseGuard is not

  • Not a PII detector. Every entity type, confidence score, and detection decision comes from Presidio. ReleaseGuard adds no NLP model, no recognizer, and no accuracy claim of its own. If Presidio misses something or overcounts (see the URL/email overlap in the Quickstart above), ReleaseGuard inherits that behavior unmodified.

  • Not a hosted service. Everything runs locally. No scan target, scan result, or redacted output is transmitted anywhere. See SECURITY.md's scope section.

  • Not proof of legal compliance. The generated EU AI Act summary is a draft that still needs a human to fill in licensing, data-source, and copyright sections ReleaseGuard cannot infer from a scan. Running releaseguard package does not, by itself, satisfy Art. 53(1)(d) or any other regulation.

  • Not evidence of demand beyond what's cited above. The closest prior attempt at this same workflow, pii-lib, sits at 16 GitHub stars. ReleaseGuard does not claim to have solved the adoption problem that project ran into; it claims to fill a real, narrow, independently-verified gap (no existing open-source tool chains a Presidio scan directly into an Art. 53(1)(d) template), and lets real usage decide the rest.

FAQ

Does ReleaseGuard detect PII more accurately than Presidio? No. It cannot, since it calls Presidio's own AnalyzerEngine for every detection decision. Any accuracy question is a Presidio question; see Presidio's own documentation and presidio-research for its evaluation methodology.

Why does scan need a spaCy model download? Presidio's AnalyzerEngine requires a spaCy language model for context-aware detection (recognizing that "John Smith" is a name from surrounding text, not just a capitalized word). spaCy models ship as their own installable packages, not as a pip dependency, so python -m spacy download en_core_web_sm is a required one-time step, the same as it is for anyone using Presidio directly.

Does ReleaseGuard work on Windows, macOS, and Linux? It's pure Python with no OS-specific code path, and the npm launcher shim picks where or which per platform to locate the installed CLI (npm-shim/bin/releaseguard-cli.js). CI currently runs on ubuntu-latest only, across Python 3.10 and 3.12, so macOS and Windows aren't yet covered by an automated test matrix. Treat them as expected to work, not CI-verified, until that matrix expands.

Is the EU AI Act Art. 53(1)(d) summary legally sufficient on its own? No. It is a structurally correct starting draft populated with real scan data where ReleaseGuard can verify it (the PII/secrets section) and an explicit placeholder everywhere it can't (data sources, licensing, copyright status). A human, ideally with legal review, has to fill in the placeholders before publishing it as a compliance artifact.

Does this only apply if I'm training a GPAI model? The Art. 53(1)(d) summary specifically targets general-purpose AI model providers under the EU AI Act, a narrow buyer set. The scan, redact, and Hugging Face card-generation parts of ReleaseGuard are useful for any dataset or model release, regardless of whether Art. 53(1)(d) applies to you.

Why two registries? ReleaseGuard's implementation is Python, since Presidio itself is Python (presidio-analyzer/presidio-anonymizer); wrapping it in another language would mean re-shelling out or reimplementing bindings. The npm package (releaseguard-cli) is a thin launcher, not a reimplementation. It locates and execs the real releaseguard binary installed from PyPI, so npx releaseguard-cli works for npm-first agent tooling without duplicating Presidio's detection logic in two languages.

What license is ReleaseGuard under, and can I use it commercially? Apache 2.0, the same license Presidio itself uses. It permits commercial use, modification, and redistribution, including inside a proprietary product, subject to the standard Apache 2.0 terms: keep the license and copyright notice, and state any changes made to the source. See LICENSE for the full text.

Does anyone actually need this, or is it "glue code nobody asked for"? Honestly stated: no organic demand signal (an HN/Reddit thread describing this exact workflow as a lived pain point) had surfaced as of this project's initial research. The independently verifiable fact is narrower and more defensible: no existing open-source tool chains a Presidio scan directly into an Art. 53(1)(d) template or a combined HF card, in one command, from one scan. Whether that gap turns into real usage is an open, falsifiable question this project tracks rather than assumes the answer to.

What happens to files ReleaseGuard can't parse (images, model weight files, Parquet without the extra)? scan and redact skip them (listed under files_skipped in --json output); redact copies them through to the output directory unchanged rather than silently dropping them from the release bundle. They are not scanned for PII, so review them separately before publishing.

Contributing

See CONTRIBUTING.md. Security issues: see SECURITY.md.

License

Apache 2.0

Available Tools

3 tools
package_release_toolA

Scan a dataset/model directory, redact it, and generate the paperwork needed to publish it, in one call.

This is the end-to-end tool: use it when the goal is "make this directory publishable" rather than just inspecting or redacting it. It chains a Presidio scan, an optional redaction pass, and generation of a Hugging Face dataset/model card plus an EU AI Act Art. 53(1)(d) training-data-summary template, all populated from the same scan results so the documents and the redacted copy can never disagree. Prefer scan_directory_tool alone for a read-only report, or redact_directory_tool alone when you don't need the generated cards. This tool does not detect PII itself -- detection is entirely Presidio's, unmodified.

path must exist and be readable. This tool is mutating: it writes the bundle to output (dataset/model card, EU AI Act summary) and, when redact_first=True (the default), also writes a redacted copy to <output>-redacted-source, overwriting that directory if it already exists. Nothing under path itself is ever modified. No network calls are made -- scanning, redaction, and document generation all run locally. The EU AI Act summary is a draft template with scan-derived counts filled in and everything else left as an explicit placeholder for a human to complete; it is not a compliance guarantee.

kind is "dataset" (default), "model", or "both", and picks which card template(s) get generated. redact_first toggles the redaction step (default True); strategy is "mask", "hash", or "remove" and only applies when redact_first=True. Example calls: package_release_tool(path="./data", output="./release"), package_release_tool(path="./model", output="./release", kind="model"), package_release_tool(path="./data", output="./release", redact_first=False).

Returns a JSON object with bundle_dir, dataset_card_path (or null if kind="model"), model_card_path (or null if kind="dataset"), eu_ai_act_summary_path, and source_kind. On a missing path or any internal failure it returns {"error": ..., "error_type": ...} instead of raising. See releaseguard package --help for the CLI-equivalent flag reference.

ParametersJSON Schema
NameRequiredDescriptionDefault
kindNodataset
pathYes
outputYes
strategyNomask
redact_firstNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and excels. It discloses mutating behavior (writes to output, overwrites redacted source), guarantees nothing under the original path is modified, notes local execution/no network calls, admits the tool doesn't detect PII itself, and explicitly states the EU AI Act summary is a draft template, not a compliance guarantee. Error handling is also described. This is comprehensive behavioral disclosure.

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?

Though long, the description is well-structured and every sentence earns its place. It starts with a concise summary, then covers usage guidance, behavioral details, parameter semantics, return format, and error behavior in clear paragraphs. The inclusion of example calls is practical and not redundant. No fluff or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters, 0% schema coverage, no annotations, and a non-trivial side-effect profile, the description is remarkably complete. It explains all parameters, return values, error behavior, side effects, limitations, and even points to a CLI reference. The output schema may exist but the description still provides a clear explanation of the JSON return shape, making it self-contained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does fully. It explains the meaning of `path`, `output`, `kind` (with allowed values), `redact_first`, and `strategy` (with allowed values and applicability condition). It also provides three example invocations that clarify parameter combinations. All five parameters are meaningfully described.

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 opens with a specific verb+resource statement: 'Scan a dataset/model directory, redact it, and generate the paperwork needed to publish it, in one call.' It immediately differentiates from siblings by naming exact alternatives: 'Prefer `scan_directory_tool` alone for a read-only report, or `redact_directory_tool` alone when you don't need the generated cards.' This fully clarifies what the tool does and how it is distinct.

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

Usage Guidelines5/5

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

Explicit usage guidance is provided: 'use it when the goal is "make this directory publishable" rather than just inspecting or redacting it.' It also gives concrete conditions for alternatives and even includes example calls to illustrate common use cases. This goes beyond simple context and provides clear decision criteria.

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

redact_directory_toolA

Scan a directory for PII/secrets with Presidio, then write a redacted copy to a new location.

Call this once you already know (or expect) a directory contains PII and want a sanitized copy you can hand off or publish, without touching the original. It runs its own internal scan first (same detector as scan_directory_tool), so you do not need to call scan_directory_tool beforehand unless you want to inspect findings before deciding to redact. Skip it if you only need a report (use scan_directory_tool) or if you also want the Hugging Face card and EU AI Act summary generated (use package_release_tool, which redacts as one step of a larger bundle).

path must exist and be readable. This tool is mutating but scoped to output only: it never edits, moves, or deletes anything under path. Writing fails if output already exists and is non-empty, unless overwrite=True -- pass that deliberately, since it will silently overwrite prior contents of output. No network calls are made; everything runs locally. Not idempotent across repeated calls with overwrite=True if the source directory changed between runs (the redacted copy reflects whatever path contains at call time).

strategy controls how each finding is replaced: "mask" (default, replaces matched text with a placeholder like <EMAIL_ADDRESS>), "hash" (replaces with a deterministic hash of the original value), or "remove" (deletes the matched span entirely). Example calls: redact_directory_tool(path="./data", output="./data-redacted"), redact_directory_tool(path="./data", output="./data-redacted", strategy="hash"), redact_directory_tool(path="./data", output="./data-redacted", overwrite=True).

Returns a JSON object with source_root, output_root, strategy, files_written (list of paths under output), entities_redacted (per-entity-type counts), and total_redacted. On a missing path, an invalid strategy, or a non-empty output without overwrite=True, it returns {"error": ..., "error_type": ...} instead of raising. See releaseguard redact --help for the CLI-equivalent flag reference.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
outputYes
strategyNomask
overwriteNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description fully discloses mutation scope: 'never edits, moves, or deletes anything under path', overwrite semantics, silent overwrite risk, local-only execution, non-idempotency, and error return behavior. This goes well beyond what annotations would provide.

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 longer than average but every section earns its place: purpose, usage, safety, parameter details, examples, and return format. It is well-structured and front-loaded with the core action, then branches into necessary caveats rather than burying the main point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter tool with no annotations and no schema descriptions, this description is remarkably complete. It covers sibling alternatives, operation details, failure modes, return value structure, and example calls, leaving almost no ambiguity for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate. It explains path must exist/readable, output collision/overwrite behavior, strategy values ('mask', 'hash', 'remove') with concrete examples, and overwrite semantics. Example calls demonstrate correct usage for all parameters.

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 opens with a specific verb and resource: 'Scan a directory for PII/secrets with Presidio, then write a redacted copy to a new location.' It clearly distinguishes itself from siblings by explicitly naming scan_directory_tool for reports and package_release_tool for the full bundle.

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

Usage Guidelines5/5

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

It gives explicit when-to-use guidance ('Call this once you already know...') and when-to-avoid ('Skip it if you only need a report...' or need the Hugging Face/EU AI Act bundle). It also clarifies that a prior scan step is unnecessary, which directly addresses an alternative.

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

scan_directory_toolA

Recursively scan a local dataset or model directory for PII and secrets before you publish it.

Call this before releasing, uploading, or sharing a dataset/model directory whenever you need to know what personal data it contains -- it is the read-only first step agents should take ahead of redact_directory_tool or package_release_tool, and the right choice on its own when you only need a report, not a redacted copy. Do not call it on directories you do not have read access to, or expect it to catch anything beyond what Presidio's own recognizers detect (no custom regex or heuristics are layered on top).

path must be a directory (or single file) that already exists on disk and is readable by the current process; it walks CSV, JSON/ JSONL, and plain-text files under it. This call is read-only: it never writes, moves, or deletes anything, makes no network requests (Presidio and spaCy run entirely locally), and is safe to call repeatedly -- re-running it against an unchanged directory returns the same findings. On a missing path, or any internal failure, it returns {"error": ..., "error_type": ...} instead of raising or crashing the server -- check for an error key before reading findings.

spacy_model selects the spaCy model Presidio's NLP engine uses (defaults to en_core_web_sm; must already be installed via python -m spacy download <model>, this tool does not install one). score_threshold (0.0-1.0, default 0.35) drops any finding below that Presidio confidence score -- raise it to cut false positives, lower it to widen recall. Example calls: scan_directory_tool(path="./data"), scan_directory_tool(path="./data", score_threshold=0.5), scan_directory_tool(path="./models/card-dir", spacy_model="en_core_web_lg").

Returns a JSON object with root_path, files_scanned, files_skipped, findings (a list of objects each with file_path, entity_type, start/end offsets, score, text_preview, line_number, field_name, detector), entity_counts (per-type totals), total_findings, detector_name, and language. For flag-level detail beyond this docstring, run the equivalent CLI form: releaseguard scan --help.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
spacy_modelNo
score_thresholdNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden. It thoroughly discloses behavior: read-only, no network requests, safe to call repeatedly, deterministic results, returns an error object instead of raising on missing paths, and explains limitations (no custom regex). It also details file types scanned and running entirely locally.

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?

While long, every sentence adds value. The structure logically moves from purpose to usage guidelines, parameter semantics, examples, and return format. It is front-loaded with the essential purpose and then provides comprehensive yet non-redundant details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers not only the three parameters but also error handling, return schema, and behavioral guarantees. It references the sibling tools and provides additional CLI help for deeper detail. Given no annotations and a simple output schema, this is fully complete for an agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description compensates fully. Each parameter is explained in detail: path conditions and file types, spacy_model defaults and installation requirement, and score_threshold range and effect on false positives/recall. Example calls illustrate usage.

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 opens with a specific verb+resource: 'Recursively scan a local dataset or model directory for PII and secrets before you publish it.' It clearly distinguishes from siblings by positioning itself as the read-only first step ahead of redact_directory_tool or package_release_tool, and explicitly states when it is the right standalone choice (for a report only).

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

Usage Guidelines5/5

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

It provides explicit when-to-use guidance: 'Call this before releasing, uploading, or sharing a dataset/model directory' and contrasts with siblings. It also includes exclusions: 'Do not call it on directories you do not have read access to, or expect it to catch anything beyond what Presidio's own recognizers detect.'

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedpackage_release_tool
    • First observedredact_directory_tool
    • First observedscan_directory_tool

TDQS

A5/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: scan is read-only, redact creates a sanitized copy, and package bundles with documentation. The descriptions explicitly differentiate them and even suggest which to use based on the goal.

Naming Consistency5/5

All tool names follow the same snake_case 'verb_noun_tool' pattern: scan_directory, redact_directory, package_release. This is uniform and predictable, despite the slightly redundant '_tool' suffix.

Tool Count5/5

Three tools is a well-scoped set for a release-preparation pipeline. Each tool addresses a distinct step (inspect, sanitize, package) without unnecessary bloat or redundancy.

Completeness5/5

The workflow is complete: users can scan to assess, redact to create a clean copy, and package to generate release artifacts. The package tool even includes an optional redaction pass, ensuring the core lifecycle is fully covered.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers