Skip to main content
Glama

pseudonymize_pii

Read-onlyIdempotent

utilpeek: Pseudonymise PII in text: stable keyed tokens for emails, phones, cards, IBANs and IPs. Returns the text with each email, phone number, payment card, IBAN, US SSN, IPv4 / IPv6, EVM / BTC address and secret URL query value replaced by a typed token (EMAIL_843eca1f055c), plus the token-to-type list with counts. The token is HMAC-SHA256 under your key of the normalised value, so the same value and key give the same token on every call and memory records stay linkable. Same detectors as /v1/text/redact. Pseudonymisation, not anonymisation: the key holder can test guesses. Names and street addresses are not detected. Key never stored or logged. Typically under 1 s. Price: USD 0.002. No free tier. The submitted text is never logged or stored.

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": {
      "text": "<text>",
      "key": "<key>"
    },
    "name": "pseudonymize_pii"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesYour secret, 16-1024 UTF-8 bytes. The same key always gives the same tokens; keep it private (whoever has it can test guessed values). Never stored, logged or echoed. Use a long random key kept for this use only.
textYesThe text (at most 200,000 characters).
typesNoLimit detection to these types: email, phone, card, iban, ssn, ipv4, ipv6, crypto_address, url_secret, national_id (CPF, CNPJ, Aadhaar, NIF, NIE; opt-in). Default: all but national_id.

Output Schema

NameRequiredDescriptionDefault
textNo
countNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
notesNo
typesNo
schemeNo
sourceNo
tokensNo
by_typeNo
token_hexNo
not_detectedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / types / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "enum": [
      -        "email",
      -        "phone",
      -        "card",
      -        "iban",
      -        "ssn",
      -        "ipv4",
      -        "ipv6",
      -        "crypto_address",
      -        "url_secret"
      -      ],
      -      "type": "string"
      -    },
      -    "maxItems": 9,
      -    "minItems": 1,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "enum": [
      +        "email",
      +        "phone",
      +        "card",
      +        "iban",
      +        "ssn",
      +        "ipv4",
      +        "ipv6",
      +        "crypto_address",
      +        "url_secret",
      +        "national_id"
      +      ],
      +      "type": "string"
      +    },
      +    "maxItems": 10,
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / types / description
      Previous value: -"Limit detection to these types: email, phone, card, iban, ssn, ipv4, ipv6, crypto_address, url_secret (default: all)."New value: +"Limit detection to these types: email, phone, card, iban, ssn, ipv4, ipv6, crypto_address, url_secret, national_id (CPF, CNPJ, Aadhaar, NIF, NIE; opt-in). Default: all but national_id."
  2. Changed11 schema fields changed
    • removedInput schema / properties / key / title
      Removed value: -"Key"
    • removedInput schema / properties / text / title
      Removed value: -"Text"
    • removedInput schema / properties / types / default
      Removed value: -null
    • removedInput schema / properties / types / title
      Removed value: -"Types"
    • removedInput schema / title
      Removed value: -"pseudonymize_piiArguments"
    • removedOutput schema / properties / by_type / additionalProperties
      Removed value: -{
      -  "minimum": 0,
      -  "type": [
      -    "integer",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / not_detected / items
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / notes / additionalProperties
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / source / additionalProperties
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / tokens / items
      Removed value: -{
      -  "properties": {
      -    "count": {
      -      "minimum": 0,
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    },
      -    "token": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "type": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": [
      -    "object",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / types / items
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
  3. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description adds material behavior: determinism via HMAC-SHA256 over normalised values so tokens stay linkable across calls, never storing or logging the key or submitted text, sub-second latency, and the price (USD 0.002, no free tier). This is exactly the credit-earning context the annotations cannot carry.

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?

The most important fact (what the tokens look like and that they are stable) is front-loaded, and almost every sentence carries new information, including pricing and privacy guarantees. It is a dense run-on block without visual structure, and the repeated 'never logged or stored' phrasing appears twice, costing a 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?

With an output schema present, the description still covers the essentials: what is replaced, what the token looks like, determinism, detection gaps, privacy handling, cost, and latency. Nothing an agent needs to decide whether to call this or to interpret the result is missing.

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 100%, so the schema already documents the key, text length limit, and the types filter with its default (all but national_id). The description restates determinism of key + value and the detector coverage, adding only marginal meaning beyond the schema; baseline 3 applies when the schema does the heavy lifting.

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?

Opens with a specific verb and resource ('Pseudonymise PII in text') and enumerates the covered entity classes (emails, phones, cards, IBANs, IPs, SSNs, crypto addresses, URL secrets). It also states the output shape in the tool itself (typed tokens like EMAIL_843eca1f055c plus a token-to-type list with counts), so an agent knows exactly what it gets back.

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?

Gives explicit exclusions ('Names and street addresses are not detected') and a clear conceptual when-to-use boundary: 'Pseudonymisation, not anonymisation: the key holder can test guesses,' which tells the agent to choose this only when the key stays private. It references the shared detector behavior with '/v1/text/redact' but never explicitly routes between this tool and the redact_pii sibling, so the alternative-selection guidance is implied rather than stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources