Skip to main content
Glama
fairquery-agent-trust-mcp

fairquery-agent-trust-mcp

Official

Deep PII/secret guard for documents and URLs (paid)

pii_guard_documents
Read-onlyIdempotent

Detect, redact, or restore PII and secrets in documents and URLs, including person names, addresses, and PDFs, when you need NER or hosted file scanning.

Instructions

WHAT: Runs the Fairquery Apify Actor llm-data-guard-pii-secrets: everything pii_scan_text does PLUS person-name/location NER, street addresses, public document URLs (txt/md/json/csv/HTML/PDF text layer, <= 10 MB) and restore mode (put originals back into LLM output using a placeholder map). WHEN: Only when you need NER names/addresses, files at URLs/PDFs, or the hosted pipeline; for plain text with regex-detectable PII/secrets use pii_scan_text / pii_redact_text (free, local). WHEN NOT: Plain text scans (pii_scan_text / pii_redact_text, free), restoring placeholders in an LLM answer (pii_restore_text, free, same result as restore mode), images (no OCR), email deliverability. COST: Paid, billed to YOUR Apify account via your APIFY_TOKEN: $0.0015 per document + $0.0002 per finding. Example: 10 docs with 20 findings ~ $0.02. RETURNS: Paged "document" rows (findings masked; output_text in redact/restore modes) or "error" rows. Tool errors: APIFY_TOKEN_MISSING, APIFY_TOKEN_INVALID, APIFY_PAYMENT_REQUIRED, APIFY_ACTOR_RUN_FAILED, APIFY_TIMEOUT, INPUT_EMPTY. BEHAVIOR: Makes network calls: runs the Actor in your Apify account, which may fetch documentUrls. Latency seconds to a few minutes (300 s actor timeout). Up to 1000 texts / 100 URLs (10 MB each). PARAMETERS: texts and/or documentUrls: at least one non-empty (the schema marks both optional; neither -> INPUT_EMPTY, not billed); both may be combined and each text or URL becomes one billed document row. mode picks which other fields matter: "detect" ignores redactionStyle/returnPlaceholderMap; "redact" uses them; "restore" ignores all detector flags and only replaces placeholders found in texts using placeholderMap (pass the map from an earlier redact call; a placeholder missing from the map stays as is). returnPlaceholderMap works only with mode="redact" + redactionStyle="placeholder". detectNames / detectAddresses enable English NER (PERSON, LOCATION, STREET_ADDRESS; lower precision, slower) and are required before those names can be used in entityTypes. entityTypes / allowList: same semantics as pii_scan_text (case-insensitive, whole-value allow-list) but up to 1000 allow-list values. Cost scales with documents and findings, so narrow entityTypes to cut finding charges. limit/offset only page the returned rows: every call processes and bills the whole input again (also when only offset changes), so pick a limit (max 1000) that covers all rows instead of paging. EXAMPLE: {"documentUrls":["https://example.com/report.pdf"],"mode":"redact","detectNames":true}

Input Schema

NameRequiredDescriptionDefault
modeNoOptional, one of "detect" | "redact" | "restore", default "redact". "detect" = findings only; "redact" = findings + output_text; "restore" = replace placeholders in texts with originals from placeholderMap. Example: "detect"redact
limitNoOptional page size: items to return, integer 1-1000 (default 100). Example: 50
textsNoOptional if documentUrls is given (at least one of the two is required). 0-1000 documents as plain strings, each <= 1,000,000 chars; one billed document row each. Example: ["Mail jane@acme.com, key AKIAIOSFODNN7EXAMPLE"]
offsetNoOptional zero-based number of items to skip, integer 0-1000000 (default 0); pass nextOffset from the previous response, e.g. 100
allowListNoOptional, default []. 0-1000 exact values never flagged (whole value, case-insensitive). Example: ["support@yourco.com"]
detectNamesNoOptional boolean, default false. true enables English person-name NER (type PERSON; lower precision, slower)
entityTypesNoOptional, default omitted = all enabled detectors. 0-40 type names from pii_list_detectors (case-insensitive), e.g. ["EMAIL","PERSON"]; PERSON/LOCATION/STREET_ADDRESS also need detectNames/detectAddresses
entropyScanNoOptional boolean, default false. true also flags unlabeled random-looking tokens (20+ chars) as HIGH_ENTROPY_STRING
documentUrlsNoOptional if texts is given. 0-100 public http(s) URLs (<= 2000 chars) of txt/md/json/csv/HTML/PDF files (<= 10 MB each, PDF text layer only), fetched by the Actor in Apify cloud. Example: ["https://example.com/a.pdf"]
placeholderMapNoOptional; used only with mode="restore". Object mapping placeholder -> original value, as returned by an earlier redact call. Example: {"[EMAIL_1]":"jane@acme.com"}
redactionStyleNoOptional, one of "placeholder" | "mask" | "hash", default "placeholder"; used in mode="redact" only. placeholder = [EMAIL_1] (reversible), mask = j***@a***.com, hash = [EMAIL:3f2a9c0d1b7e]placeholder
detectAddressesNoOptional boolean, default false. true enables street-address patterns (STREET_ADDRESS) and place-name NER (LOCATION)
returnPlaceholderMapNoOptional boolean, default false. true adds placeholder_map (ORIGINAL values) to each row; only with mode="redact" and redactionStyle="placeholder"

Output 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. Changed13 schema fields changed
    • changedInput schema / properties / allowList / description
      Previous value: -"Values never flagged"New value: +"Optional, default []. 0-1000 exact values never flagged (whole value, case-insensitive). Example: [\"support@yourco.com\"]"
    • changedInput schema / properties / detectAddresses / description
      Previous value: -"Street addresses + place-name NER (default false)"New value: +"Optional boolean, default false. true enables street-address patterns (STREET_ADDRESS) and place-name NER (LOCATION)"
    • changedInput schema / properties / detectNames / description
      Previous value: -"Person-name NER (default false)"New value: +"Optional boolean, default false. true enables English person-name NER (type PERSON; lower precision, slower)"
    • changedInput schema / properties / documentUrls / description
      Previous value: -"Public http(s) URLs of txt/md/json/csv/HTML/PDF files (<= 10 MB each), fetched by the Actor in Apify cloud, max 100. Example: [\"https://example.com/a.pdf\"]"New value: +"Optional if texts is given. 0-100 public http(s) URLs (<= 2000 chars) of txt/md/json/csv/HTML/PDF files (<= 10 MB each, PDF text layer only), fetched by the Actor in Apify cloud. Example: [\"https://example.com/a.pdf\"]"
    • changedInput schema / properties / entityTypes / description
      Previous value: -"Restrict types, e.g. [\"EMAIL\",\"PERSON\"]"New value: +"Optional, default omitted = all enabled detectors. 0-40 type names from pii_list_detectors (case-insensitive), e.g. [\"EMAIL\",\"PERSON\"]; PERSON/LOCATION/STREET_ADDRESS also need detectNames/detectAddresses"
    • changedInput schema / properties / entropyScan / description
      Previous value: -"Flag high-entropy tokens (default false)"New value: +"Optional boolean, default false. true also flags unlabeled random-looking tokens (20+ chars) as HIGH_ENTROPY_STRING"
    • changedInput schema / properties / limit / description
      Previous value: -"Page size: items to return, integer 1-1000 (default 100)"New value: +"Optional page size: items to return, integer 1-1000 (default 100). Example: 50"
    • changedInput schema / properties / mode / description
      Previous value: -"\"detect\" findings only; \"redact\" (default) also output_text; \"restore\" replaces placeholders in texts using placeholderMap"New value: +"Optional, one of \"detect\" | \"redact\" | \"restore\", default \"redact\". \"detect\" = findings only; \"redact\" = findings + output_text; \"restore\" = replace placeholders in texts with originals from placeholderMap. Example: \"detect\""
    • changedInput schema / properties / offset / description
      Previous value: -"Items to skip for paging, integer >= 0 (default 0); pass nextOffset from the previous response"New value: +"Optional zero-based number of items to skip, integer 0-1000000 (default 0); pass nextOffset from the previous response, e.g. 100"
    • changedInput schema / properties / placeholderMap / description
      Previous value: -"For mode=\"restore\": {\"[EMAIL_1]\":\"jane@acme.com\"}"New value: +"Optional; used only with mode=\"restore\". Object mapping placeholder -> original value, as returned by an earlier redact call. Example: {\"[EMAIL_1]\":\"jane@acme.com\"}"
    • changedInput schema / properties / redactionStyle / description
      Previous value: -"Redact style (default placeholder)"New value: +"Optional, one of \"placeholder\" | \"mask\" | \"hash\", default \"placeholder\"; used in mode=\"redact\" only. placeholder = [EMAIL_1] (reversible), mask = j***@a***.com, hash = [EMAIL:3f2a9c0d1b7e]"
    • changedInput schema / properties / returnPlaceholderMap / description
      Previous value: -"Include placeholder_map with original values (default false)"New value: +"Optional boolean, default false. true adds placeholder_map (ORIGINAL values) to each row; only with mode=\"redact\" and redactionStyle=\"placeholder\""
    • changedInput schema / properties / texts / description
      Previous value: -"Documents as strings (each <= 1,000,000 chars, max 1000). Optional if documentUrls given"New value: +"Optional if documentUrls is given (at least one of the two is required). 0-1000 documents as plain strings, each <= 1,000,000 chars; one billed document row each. Example: [\"Mail jane@acme.com, key AKIAIOSFODNN7EXAMPLE\"]"
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly/openWorld/idempotent/non-destructive) and no auth or cost information; the description adds the pricing model and billing target ($0.0015/doc + $0.0002/finding, billed to your Apify account), network/Actor-run behavior, latency and 300s timeout, input caps, and a full error-code list. It also discloses the non-obvious billing trap that limit/offset only page results while every call re-processes and re-bills the whole input.

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?

Well front-loaded with WHAT/WHEN/WHEN NOT before the dense detail, and every block is relevant to a 13-parameter paid tool. It is nevertheless long and repeats some material already in the schema (e.g., mode semantics, allowList semantics), which costs it the top score.

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 13-parameter, nested-schema, network-calling paid tool with an output schema, the description covers cost, latency, caps, error codes, paging/billing behavior, and mode-field interactions. An agent has everything needed to call it correctly and to avoid unexpected charges.

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 coverage is 100%, so the baseline would be 3, but the description adds interaction semantics the schema does not: which fields each mode consumes or ignores, that detectNames/detectAddresses must be enabled before PERSON/LOCATION/STREET_ADDRESS are usable in entityTypes, that returnPlaceholderMap only applies to redact+placeholder, that a missing placeholder is left untouched in restore mode, and that narrowing entityTypes reduces finding charges.

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 WHAT line names a specific verb/resource (runs the llm-data-guard-pii-secrets Actor for PII/secret scanning of text and documents/URLs) and immediately scopes it as a superset of pii_scan_text. It explicitly distinguishes the tool from named siblings (pii_scan_text, pii_redact_text, pii_restore_text), so an agent can pick it without opening any schema.

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?

Dedicated WHEN and WHEN NOT sections give the selecting conditions and the free alternatives for each excluded case (plain text -> pii_scan_text/pii_redact_text, placeholder restoration -> pii_restore_text, no OCR for images). This is textbook routing guidance with explicit exclusions, not just implied usage.

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