Skip to main content
Glama

Liuwangcun Chinese Compliance Tools

银行卡号校验与卡组织识别

luhn-bank

银行卡号校验与卡组织识别:Luhn 算法校验银行卡号,识别 Visa / MasterCard / 银联 / Amex / JCB / Discover / Diners,输出自动掩码。支付前预检、防录入错位。不做任何扣款。 传入参数对象,返回确定性计算结果与依据。适用场景:模型算数不稳、法规口径易错时,调用它拿准确答案。

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": "luhn-bank"
  }
}

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?

No annotations are supplied, so the description carries the full disclosure burden. It does useful work here: it declares the tool is side-effect free (不做任何扣款), that output is masked, and that the result is deterministic and includes a rationale. However, it does not say whether malformed input (wrong length, non-digits) yields an error, an invalid verdict, or a partially masked echo, which is the main behavioral unknown 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.

Conciseness3/5

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

The core content is front-loaded and efficient: what it checks, which networks it recognizes, masking, and no-charge. The trailing sentences ('传入参数对象,返回确定性计算结果与依据…调用它拿准确答案') are generic filler that adds no tool-specific information and could be cut without loss.

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, side-effect-free computation tool with no output schema, the description covers the essential ground: input meaning, the check performed, the recognized networks, and masked output. The remaining gap is edge-case behavior on invalid input, which matters for a validator but is not fatal given how simple the contract is.

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 only one parameter and schema description coverage is 100%, so the schema already defines `input` as the card number. The description reinforces that the value is used only for validation and never for charging, but adds no format, length, or digit-only constraints beyond the schema. This is the expected baseline when the schema does the heavy lifting.

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 description names a specific verb and resource (Luhn validation of bank card numbers) and adds concrete scope: card-network identification for Visa/MasterCard/银联/Amex/JCB/Discover/Diners, automatic masking on output, and an explicit negative scope (不做任何扣款). It is not tautological. It falls short of 5 only because it doesn't contrast itself against nearby siblings like pii-mask or cn-idcard, leaving the agent to infer the split from the scope text alone.

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?

It clearly states when to reach for it: pre-payment pre-check and catching data-entry errors, plus a general trigger for cases where arithmetic or regulatory interpretation is error-prone. The one exclusion it makes explicit is that it performs no charging. There is no explicit when-not-to-use or named alternative tool, so it stops short of a 5.

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.