Skip to main content
Glama

Metis · Data Guardian — Anonymize Text

anonymize_text

Replace sensitive identifiers like patient IDs, GPS coordinates, and contact details in text. Returns anonymized content and a replacement map for reversibility.

Instructions

Scrub PII from text and return anonymized version + replacement map.

Replaces:
  - Patient/case IDs        → [PARTICIPANT_001]
  - GPS coordinates         → [GPS_001]
  - Belgian national IDs    → [NID_001]
  - Email addresses         → [EMAIL_001]
  - Phone numbers           → [PHONE_001]
  - Name-like tokens (opt.) → [NAME_001]

Args:
    content:        Text to anonymize.
    mode:           'full' — replace; 'preview' — mark without replacing.
    replace_names:  Also replace CAPITALIZED name-like tokens (heuristic).

Returns JSON with keys 'anonymized' (str) and 'replacements' (dict).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNofull
contentYes
replace_namesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully bears the burden. It details the replacement behavior (list of PII types), modes ('full' vs 'preview'), and the optional name replacement heuristic. It also describes the output JSON structure, leaving no ambiguity about the tool's behavior.

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 concise yet comprehensive, using bullet points for replacements and clear sections for args. Every sentence adds value without redundancy.

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 3 parameters, an output schema, and no nested objects, the description covers all necessary aspects: what it does, how to use it (args), and what to expect (output JSON with 'anonymized' and 'replacements'). It is fully complete for an agent to select and invoke 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% (no descriptions in schema). The description compensates by explaining all three parameters: content (text to anonymize), mode (full/preview), and replace_names (heuristic for CAPITALIZED tokens). It also explains the output format, adding significant value.

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 clearly states 'Scrub PII from text and return anonymized version + replacement map.' It lists specific PII types and their replacements, distinguishing it from sibling tools like redact_data_file or diff_anonymization.

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?

The description explains the tool's purpose and parameters (mode, replace_names) but does not explicitly state when to use this tool versus alternatives like redact_data_file or diff_anonymization. However, the context is clear enough for an agent to infer usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SVerITG/Metis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server