Skip to main content
Glama
nbrain-sdaia-pdpl-privacy

nbrain-sdaia-pdpl-privacy

Official

scan_and_tokenize_mena_pii

Scans mixed Arabic/English MENA text, normalizes Arabic-Indic digits, verifies and HMAC-tokenizes or masks Saudi, Egyptian and UAE IDs, IBANs and Saudi addresses to protect PII in logs and prompts.

Instructions

Scan mixed Arabic/English text (normalizing Arabic-Indic digits) and HMAC-tokenize checksum-verified Saudi IDs/Iqamas, Egyptian 14-digit IDs, UAE Emirates IDs, MOD-97 MENA IBANs, and Saudi SPL addresses.

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>"
    },
    "name": "scan_and_tokenize_mena_pii"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNotokenize
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses Arabic-Indic digit normalization and that only checksum-verified IDs are matched, but it never explains the mask-vs-tokenize choice, whether the input text is returned, whether output is reversible, or what happens when nothing matches.

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 with no filler; the parenthetical normalization note and entity enumeration both add information. The long list is dense but every element earns its place by defining detection scope.

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

Completeness3/5

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

Detection scope and normalization are well covered, which is the hardest part. However, with no annotations, no output schema, and 0% schema coverage, the definition leaves the return value and the 'mode' parameter unexplained — gaps an agent would hit on the first call.

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

Parameters2/5

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

Schema description coverage is 0% for two parameters, so the description must compensate and largely does not. It covers the text parameter implicitly but never mentions the 'mode' enum, leaving the difference between 'tokenize' and 'mask' entirely undocumented despite that being the tool's only configurable behavior.

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 specific verbs (scan, normalize, HMAC-tokenize) against a specific resource (PII in mixed Arabic/English text) and enumerates exactly which identifier types are covered. This clearly separates it from the sibling compliance-assessment tools, which do not process raw text.

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

Usage Guidelines3/5

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

Usage is only implied by the entity list — an agent can infer this is for text containing Saudi/Egyptian/UAE identifiers, but there is no explicit when-to-use, when-not-to-use, or prerequisite (e.g., key material needed for HMAC). No alternative is named.

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