correct_invoice
File an electronic correction letter (CC-e) against an NF-e.
NF-e only: there is no correction letter for an NFS-e, where a wrong document is cancelled and issued again.
It corrects wording and non-fiscal fields only. It cannot change values, taxes, the recipient or the products — those still require cancelling and issuing again, and telling the user a CC-e will fix an amount is wrong in a way they only discover at an audit.
Each letter supersedes the previous one and the SEFAZ keeps at most 20 per document. The text reaches the tax authority verbatim.
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": {
"access_key": "<access_key>",
"correction": "<correction>"
},
"name": "correct_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| access_key | Yes | The access key (chave de acesso) the authorizer assigned, as issue_invoice and list_invoices return it. An NF-e key has 44 characters; the issuer's CNPJ inside it may carry letters since July 2026, so copy it exactly. | |
| company_id | No | UUID of the company acted for. Omit for a single company; else see list_authorized_companies. Send one, never both. | |
| correction | Yes | The corrected wording, 15 to 1000 characters, sent verbatim, e.g. Onde se le Rua A, leia-se Rua B. Replaces any earlier letter, so repeat what still applies. | |
| company_tax_id | No | CNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit for a single company; else see list_authorized_companies. Send one, never both. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Local id. Use it for reissue and for submissions, and when a document was rejected and has no key. | |
| status | No | issued, rejected or cancelled. | |
| protocol | No | The authorization protocol, when granted. | |
| access_key | No | The authorizer's key. Absent while the document is not authorized. |