validate_nif_es
Validates Spanish tax IDs (NIF, NIE, CIF) by automatically detecting the document type and returning a boolean validity flag, type, and normalized ID.
Instructions
Validates Spanish tax identification numbers — NIF (DNI, 8 digits + check letter, for Spanish citizens), NIE (Número de Identidad de Extranjero, starts with X/Y/Z, for foreign residents), and CIF (Código de Identificación Fiscal, letter + 7 digits + control, for companies). Automatically detects the document type. Returns { valid: boolean, type: 'NIF'|'NIE'|'CIF', id: string }.
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": {
"id": "<id>"
},
"name": "validate_nif_es"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Spanish NIF, NIE or CIF. Examples: '12345678Z' (NIF), 'X1234567L' (NIE), 'B12345678' (CIF) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| type | No | ||
| id | No | ||
| reason | No |