Skip to main content
Glama

Agent Data Tools: Utilities

Luhn check digit

validate_luhn
Read-only

Check whether a number passes the Luhn (mod 10) algorithm used by card numbers, IMEI numbers and many IDs, and compute the check digit to append. Only the format is checked; nothing is looked up. Use to catch typos in card or ID numbers. Example: number=79927398713. Price $0.003/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesDigits, spaces and hyphens allowed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/destructive/idempotent, but the description adds genuinely useful context beyond them: 'Only the format is checked; nothing is looked up' (no external data involved) and the billing semantics ('each call is charged, so repeats are not free'), which explains the idempotentHint=false in operational terms. It does not describe the response shape, keeping it from 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-loads the purpose, then behavior, then pricing in a compact block with an inline example. The pricing sentence is dense ('x402 USDC or a card key', 'first 25 free', 'failed calls free') but each clause carries operational information, so little is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool this covers purpose, scope and cost well, but with no output schema the description leaves the return shape ambiguous — it is unclear whether the check digit is always returned alongside the validity result or only computed on request, and there is no parameter to control that.

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 the accepted format ('Digits, spaces and hyphens allowed'). The description adds only a concrete example (number=79927398713), which is a marginal benefit over the schema, so the 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?

States a specific verb (check/validate) plus the exact algorithm and resource (Luhn mod 10 check digit) and adds the secondary capability of computing the check digit to append. An agent can distinguish it from validate_iban/validate_isbn siblings, which are format-specific variants of the same idea.

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?

Gives clear context — 'Use to catch typos in card or ID numbers' — and notes the algorithm covers card numbers, IMEI numbers and many IDs, so the agent knows when it applies. It stops short of explicit exclusions (e.g. 'use validate_iban for IBAN checksums'), so it is not 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.