lookup_taxpayer
Look up one taxpayer by exact tax id, to confirm who it is.
Use it to check a recipient's name before issuing against them. It takes the id exactly — punctuation is fine, but there is no search by name, by prefix or by state, and there will not be: the registry holds the names and addresses of real people.
A 404 does not mean the company does not exist. The registry reloads monthly from the RFB's dump, so a recently registered CNPJ is simply not in it yet. Say that to the user rather than reporting the tax id as invalid, and never turn a 404 here into a validation rule.
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": {
"tax_id": "<tax_id>"
},
"name": "lookup_taxpayer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tax_id | Yes | The exact tax id. A CNPJ is 14 characters and may carry letters in its first 12 since July 2026 (e.g. 12ABC34501DE35); a CPF is 11 digits. Punctuation is fine. | |
| country | No | ISO 3166-1 alpha-2 code. A code means nothing without it, and Brazil is the default rather than a guess. | BR |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Whether it is a company or a person. | |
| name | No | ||
| state | No | ||
| status | No | ||
| tax_id | No | ||
| country | No | ||
| metadata | No | Whatever the registry holds beyond these. | |
| city_code | No | ||
| started_at | No | ||
| trade_name | No | ||
| postal_code | No | ||
| activity_code | No |