Skip to main content
Glama

身份证号格式校验

validate_id_card

Verify the format and checksum of Chinese ID cards. Extract critical data such as birth date, gender, and region from the ID string for local development needs.

Instructions

校验中国大陆居民身份证号格式、出生日期与校验位,解析出生日期、性别、地区。仅做格式校验,不查询、不核验真实身份

Input Schema

NameRequiredDescriptionDefault
idYes15 或 18 位身份证号

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses that the operation is a read-only format check, that it also validates birth-date plausibility and the checksum digit, and that it explicitly does NOT perform real-identity lookup. The one gap is that it doesn't state what a failed validation returns.

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?

Two compact clauses: the first front-loads what is checked and parsed, the second immediately scopes the tool with a negation. No filler; every phrase earns its place.

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?

No output schema exists, and the description compensates by enumerating the parsed fields (birth date, gender, region), so an agent knows roughly what comes back. It could be slightly more complete by describing the success/failure signal shape, but nothing essential is missing for correct invocation.

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?

There is a single parameter with 100% schema description coverage ('15 或 18 位身份证号'), so the schema already carries the parameter semantics. The description adds only indirect context by implying both 15- and 18-digit formats are accepted; baseline 3 applies.

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+resource (校验身份证号格式) and enumerates exactly what is checked — format, birth date, checksum — plus what is parsed (birth date, gender, region). This clearly distinguishes it from siblings like validate_uscc and validate_mobile.

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 closing clause '仅做格式校验,不查询、不核验真实身份' sets a clear boundary on when the tool is appropriate and what it must not be used for. It does not name an alternative tool for actual identity verification, so the routing 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.