Skip to main content
Glama
fairquery

fairquery-agent-trust-mcp

Official

Redact PII and secrets locally (free)

pii_redact_text
Read-onlyIdempotent

Redact PII and secrets from text locally before sending it to LLMs or third parties, replacing findings with placeholders, masks, or salted hashes.

Instructions

WHAT: Return sanitized copies of texts with every local PII/secret finding replaced (placeholder [EMAIL_1], mask, or salted hash). Placeholders are consistent across documents in one call. Runs 100% on your machine. WHEN: Right before sending user data to an LLM/third party. Use returnPlaceholderMap=true if you need to restore originals in the LLM answer later (do the restore yourself by string replacement). WHEN NOT: For a findings report only use pii_scan_text. For names/addresses NER, URLs or PDFs use pii_guard_documents (paid). COST: Free. Local only; no network, no token. RETURNS: Paged {count,total,...,items:[{type:"redacted_document",doc_index,chars,finding_count,counts_by_type,risk_level,output_text}],meta:{placeholder_map?}}. One item per document (page with limit/offset). placeholder_map contains the ORIGINAL sensitive values; omit unless needed. Errors: INPUT_TOO_LARGE. EXAMPLE: {"texts":["Call +1 415 555 0100 or mail jane@acme.com"]} -> output_text "Call [PHONE_1] or mail [EMAIL_1]".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoPage size: items to return, integer 1-50 (default 10)
textsYesRequired. 1-50 documents (prompt, chat message, log, file content), each <= 200,000 chars, total <= 500,000 chars. Example: ["Mail jane@acme.com, key AKIAIOSFODNN7EXAMPLE"]
offsetNoItems to skip for paging, integer >= 0 (default 0); pass nextOffset from the previous response
allowListNoExact values never flagged (case-insensitive), e.g. ["support@yourco.com"]. Default []
entityTypesNoOnly report these types, e.g. ["EMAIL","CREDIT_CARD","AWS_ACCESS_KEY"]. Omit = all local detectors. Valid names: pii_list_detectors
entropyScanNoAlso flag unlabeled random-looking 20-200 char tokens as HIGH_ENTROPY_STRING (default false; may flag hashes/IDs)
redactionStyleNo"placeholder" (default) = [EMAIL_1]; "mask" = j***@a***.com; "hash" = [EMAIL:3f2a9c0d1b7e] (random per-call salt)placeholder
defaultPhoneRegionNoISO 3166-1 alpha-2 region for phones without +prefix, e.g. "US" (default), "DE", "GB"US
returnPlaceholderMapNoDefault false. If true (placeholder style), meta.placeholder_map maps "[EMAIL_1]" -> original value

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaNoTool-specific context (summary counts, cost notes, ...)
countYesNumber of items in this page
itemsYesResult rows for this page
totalYesTotal items before paging
offsetYesOffset of the first item in this page
hasMoreYesTrue if more items exist after this page
nextOffsetYesOffset to pass for the next page, or null

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the read-only/idempotent/non-destructive annotations, it discloses local-only execution, no network/token usage, placeholder consistency across documents in one call, the sensitive nature of placeholder_map, possible entropy-scan false positives, and the INPUT_TOO_LARGE error. The random per-call salt for hash mode is also noted, which is important behavioral context.

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 structured WHAT/WHEN/WHEN NOT/COST/RETURNS/EXAMPLE format is front-loaded and easy to scan. Despite covering many details, every section provides actionable information for invoking the tool correctly.

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 9-parameter tool with an output schema and rich annotations, the description covers purpose, alternatives, cost, return shape, errors, and an example. It gives an agent everything needed to select and invoke the tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds practical meaning: placeholder consistency within a call, the security caveat to omit placeholder_map unless needed, and paging behavior of one item per document. It does not add much beyond the schema for every parameter, so it is not a full 5.

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 states a specific verb and resource: redact PII/secrets from texts, returning sanitized copies. It explicitly distinguishes itself from siblings by naming pii_scan_text for findings-only and pii_guard_documents for NER/URL/PDF cases.

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 ('right before sending user data to an LLM/third party') and when-not guidance with named alternative tools. It also clarifies the returnPlaceholderMap workflow and cost/local constraints.

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