Skip to main content
Glama
crisjonblvx

enrichrapi-mcp

by crisjonblvx

validate_credit_card

Validate a credit card number using Luhn checksum and identify its network (Visa, Mastercard, etc.). Returns a masked version to protect the full number.

Instructions

Validate a credit card number.

Performs Luhn checksum verification and detects the card network (Visa, Mastercard, Amex, Discover, UnionPay, etc.). The full card number is never logged or stored — only a masked version is returned.

Args: number: Card number with optional spaces or dashes (e.g. "4111 1111 1111 1111")

Returns: dict with keys: valid, luhn_valid, length_valid, network, length, masked, cost_usd

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

The description discloses a key behavioral trait: the full card number is never logged or stored, only a masked version is returned. This is valuable privacy/security context beyond what annotations provide (none). It also explains the return keys, which adds transparency about what the tool does.

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?

The description is well-structured with a short summary, a behavioral note, an Args section, and a Returns section. It's slightly longer than necessary but every sentence adds value. The privacy note is front-loaded after the summary.

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 tool with no output schema, the description covers the input format, the validation logic, the privacy behavior, and the return keys. It doesn't describe error handling or edge cases (e.g., empty string, invalid characters), but the core information an agent needs is present.

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%, so the description must compensate. It does: it explains the 'number' parameter accepts spaces or dashes and gives an example. It doesn't specify maximum length or whether non-string types are accepted, but for a single-param tool this is adequate.

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 clearly states the tool validates a credit card number, performs Luhn checksum verification, and detects the card network. It names specific networks and distinguishes itself from sibling validation tools (validate_vat, validate_iban, validate_domain) by focusing on credit cards.

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 implies when to use this tool (when you need to validate a credit card number) and provides input format examples. It doesn't explicitly state when not to use it or name alternatives, but the sibling list makes the context clear enough.

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