Skip to main content
Glama

個資遮罩

pii_mask
Read-onlyIdempotent

Masks Taiwan phone numbers, emails, ID numbers, and social media accounts or links in text, returning the masked text and per-category match counts.

Instructions

把文字裡的台灣手機/市話(含 +886、全形、中文數字、分隔符號變形)、Email(含 at/dot 寫法)、身分證字號、 LINE/IG/FB 帳號與社群連結蓋掉,回傳遮罩後文字與各類命中次數。原則上擋常見格式,重要文件仍建議人工再看一遍。

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": "pii_mask"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes要遮罩的文字
contactsNo(選填)要「部分遮罩」顯示的單一聯絡方式清單,例如 ['0900-000-101'],回傳 0900-***-101

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description goes further by disclosing the return shape (masked text plus per-category hit counts) and by honestly flagging that masking is best-effort with false negatives. It does not mention the 200k-character limit or any failure behavior, which keeps it from a 5.

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?

Two sentences: the first front-loads the enumerated targets and the return value, the second carries the caveat. Dense but every clause carries information; the category list is long but that length is functional. Minor cost is a slightly run-on first sentence.

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

Completeness4/5

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

With only two parameters, rich annotations, and no output schema, the description supplies the missing return-value information (masked text + hit counts) and the scope of detection. What is absent — interaction with `contacts`, length limits, encoding expectations — is minor for this tool's complexity.

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 description coverage is 100%, with both `text` and `contacts` fully documented including an example of the partial-mask output. The description adds nothing about parameters — notably it never mentions the `contacts` partial-mask option — so it sits at the baseline where the schema carries the parameter semantics.

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 a specific verb (遮罩/mask) and enumerates the exact resources targeted: Taiwan mobile/landline numbers, Email, national ID numbers, LINE/IG/FB accounts and social links. It also spells out format variants (+886, full-width, Chinese numerals, at/dot spellings), so an agent knows precisely what class of operation this is. No sibling tool overlaps with masking, so no disambiguation is needed.

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 makes the use case clear (redact PII from free text) and adds a reliability caveat: it only covers common formats and important documents should still be human-reviewed. There is no explicit when-not or named alternative, but among the siblings listed none is a substitute, so the guidance is sufficient in context.

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