Skip to main content
Glama

Liuwangcun Chinese Compliance Tools

文本敏感信息脱敏

pii-mask

文本敏感信息脱敏:把文本里的身份证号、银行卡号、手机号、邮箱自动打码,返回脱敏后文本 + 命中统计。Agent 把用户数据送进模型 / 日志 / 第三方之前,先过这一层。 传入参数对象,返回确定性计算结果与依据。适用场景:模型算数不稳、法规口径易错时,调用它拿准确答案。

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": {
      "input": "<input>"
    },
    "name": "pii-mask"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYes待脱敏的长文本

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden. It discloses which categories are masked and that the output includes hit statistics, but it does not say how masking is rendered (full redaction vs partial like 138****1234), whether unmasked PII classes pass through, or whether processing is local or remote. That is meaningful but incomplete disclosure for a privacy tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition front-loads what the tool masks and why to call it in two efficient sentences, which is good. The two trailing sentences ('传入参数对象,返回确定性计算结果与依据' and '适用场景:模型算数不稳') are templated filler unrelated to PII masking and dilute the definition.

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?

This is a simple one-parameter tool with no output schema, and the description covers the operation, the four PII categories, and the shape of the return value. It is nearly complete; the main missing piece is how masking is rendered and whether redaction can be reversed.

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 single 'input' parameter is already documented in the schema as the text to be masked. The description adds nothing about input, such as size limits or multi-line handling, beyond '传入参数对象', which is generic filler. This matches the baseline 3 where the schema does the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The definition names a concrete operation and a concrete scope: it masks ID card numbers, bank card numbers, mobile numbers, and emails inside text, and it describes the return value as the masked text plus hit statistics. That is a specific verb and resource, not a restatement of the title. It does not contrast itself with sibling validators such as cn-idcard or luhn-bank, which check values instead of masking them, so it falls short of a 5.

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 sentence 'Agent 把用户数据送进模型 / 日志 / 第三方之前,先过这一层' gives a clear trigger: run this tool before user data goes to a model, logs, or a third party. It gives no alternatives and no exclusions, and the trailing '适用场景:模型算数不稳、法规口径易错时' is boilerplate that describes arithmetic and regulatory tools rather than masking.

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.