Skip to main content
Glama

Parse Id Card

parse_id_card

解析 18 位中国大陆居民身份证号:按 GB 11643-1999 校验位算法验证合法性,返回归属地(省/市/区,含邮编区号)、出生日期、实足年龄、生肖、星座、性别。非法号码返回具体错误原因(校验位错误/格式错误/出生日期非法等)。

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": {
      "id_number": "<id_number>"
    },
    "name": "parse_id_card"
  }
}

Input Schema

NameRequiredDescriptionDefault
id_numberYes18 位身份证号(末位可为 X),仅做本地算法校验,不联网

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and mostly succeeds: it discloses that validation is checksum-based against GB 11643-1999, that the operation is pure/offline (schema also states 不联网), and that failures return categorized reasons (checksum vs format vs invalid birth date). It does not explicitly state idempotency or that no data is mutated, so it stops short of 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?

Front-loaded with verb, resource and standard, followed by return fields then error behavior — a logical order with no filler. The middle clause enumerates many return fields in one long run-on, which is dense but each item is informative.

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 pure parser this is nearly complete: input constraints, validation method, returned fields and failure categories are all covered. Since an output schema exists, the enumerated return list is partly redundant, but the error-reason taxonomy adds information the schema may not convey.

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% and the schema already documents '18 位身份证号(末位可为 X),仅做本地算法校验,不联网', so the description adds little parameter-level detail beyond restating the 18-digit constraint and the checksum standard. Baseline 3 is appropriate.

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?

Names a specific verb (解析/parse) and resource (18位中国大陆居民身份证号), and even cites the governing standard GB 11643-1999. The input domain (18-digit mainland ID, not phone/plate/region name) cleanly distinguishes it from the listed siblings.

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 implied by the input domain — you call it when you have an 18-digit ID number — but the description never states when to prefer it or when to use lookup_region instead, nor does it warn about inputs it rejects beyond 'invalid'. Adequate, not explicit routing guidance.

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.

Resources