Skip to main content
Glama

统一社会信用代码校验

validate_uscc

Validate 18-character Unified Social Credit Codes using GB 32100-2015 character-set and check-digit rules; parse registration authority, institution category, and region without business lookups.

Instructions

校验 18 位统一社会信用代码的字符集与校验位(GB 32100-2015),解析登记管理部门、机构类别与地区。不查询工商信息

Input Schema

NameRequiredDescriptionDefault
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden, and it does disclose the important behavioral trait that this is a purely local format-and-checksum validation with no registry lookup or network call. It is silent on what happens for an invalid code (error vs. valid=false), on idempotency, and — with no output schema — on the shape of the returned parse result.

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?

One dense sentence leads with the verb and resource, then adds which checks and parses are performed, followed by a short exclusion. Every clause carries information and nothing is repeated.

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 one-parameter, no-output-schema validator, the description covers purpose, checks performed, fields extracted, and the key non-behavior (no business lookup). The gap is the invalid-input behavior and the exact parse fields returned, which matter because there's no output schema to lean on.

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 0% for the single `code` parameter, so the description must compensate, and it does: 18 位统一社会信用代码 plus the GB 32100-2015 reference tells the agent the expected length, character set, and standard, which is the essential constraint. It does not discuss formats beyond that (for example, whether hyphens or spaces are tolerated).

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 (校验) and resource (18 位统一社会信用代码), then goes further to say which checks are applied (字符集与校验位, GB 32100-2015) and which fields are parsed (登记管理部门、机构类别、地区). The closing phrase 不查询工商信息 pre-empts the most likely confusion with a company-registry lookup, so an agent can distinguish this from the other validate_* siblings.

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 gives a clear use context (validating and decoding an 18-character USCC) and an explicit exclusion (不查询工商信息), which tells the agent when not to reach for it. However, it does not name an alternative tool for the excluded use case or state prerequisites, so it stops short of a full when/when-not/alternatives statement.

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