validate_cnpj
Validates a Brazilian CNPJ (Cadastro Nacional da Pessoa Jurídica) using the official Receita Federal checksum algorithm. Use this tool when processing Brazilian company registrations, B2B invoices, supplier onboarding, e-commerce orders, or any document requiring a valid Brazilian company taxpayer number. Input must be a 14-digit string (with or without formatting). Returns whether the CNPJ is mathematically valid, along with the cleaned CNPJ. Does not verify if the CNPJ is active in the Receita Federal database.
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": {
"cnpj": "<cnpj>"
},
"name": "validate_cnpj"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cnpj | Yes | The Brazilian CNPJ to validate. Formatting (dots, slash and dash) is automatically removed. Example: '11.222.333/0001-81' or '11222333000181' |