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
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": {
"number": "<number>"
},
"name": "validate_credit_card"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes |