Skip to main content
Glama

Liuwangcun Chinese Compliance Tools

身份证号校验与解析

cn-idcard

身份证号校验与解析:18 位身份证号校验(GB 11643 加权校验位)+ 解析出生日期 / 性别 / 年龄 / 行政区划;15 位自动升 18 位;输出自动脱敏,不回显完整号码。 传入参数对象,返回确定性计算结果与依据。适用场景:模型算数不稳、法规口径易错时,调用它拿准确答案。

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": "cn-idcard"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYes18 位或 15 位身份证号

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description must carry the full behavioral burden, and it does disclose privacy-relevant traits: output is auto-masked and the full number is never echoed back, and results are described as deterministic with stated 依据. The remaining gap is failure semantics — it never says what happens for an invalid or malformed number (error vs. a validity flag), which matters for a validator.

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?

Purpose and accepted formats are front-loaded, and each clause (checksum standard, parsed fields, upgrade path, masking) adds distinct information. It is slightly dense in one block rather than broken into clear segments, but there is no filler.

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?

For a single-parameter tool with no output schema, the description covers the input forms, the parsed output fields, and the masking guarantee, which is most of what an agent needs. The missing piece is result shape on invalid input and any note on returned 依据 structure, since no output schema documents it.

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

Parameters4/5

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

Schema coverage is 100% and there is only one parameter, so the baseline is already a 3. The description earns an extra point by explaining that the single input accepts both 18-digit and 15-digit forms and that the 15-digit form is auto-promoted to 18, which is behavior the schema does not express.

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 names a specific verb pair (校验/解析) and a precise resource (18 位身份证号), and enumerates exactly what is parsed (出生日期/性别/年龄/行政区划). It also scopes the accepted input forms (18-digit checksum per GB 11643, 15-digit auto-upgrade), so an agent can tell this apart from unrelated validation siblings such as luhn-bank or cn-uscc without opening schemas.

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?

It offers one usage trigger — 适用场景:模型算数不稳、法规口径易错时 — which tells the agent when the tool pays off. However, it never states when NOT to use it, gives no prerequisites, and does not route to alternatives, so guidance is implied rather than explicit.

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.