br_nfe_xml_auditor
Brazilian NF-e/NFC-e XML-to-JSON compressor (~90% token savings), mathematical & CFOP tax auditor, 44-digit Access Key Mod-11 decoder, and LC 214/2025 CBS/IBS Tax Credit Auditor (single XML, batch xmls[], or direct items[]) with ready-to-send supplierAlert (0.01 USDC via x402 on Base).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "br_nfe_xml_auditor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | No | Raw Brazilian NF-e or NFC-e XML content (<nfeProc> or <NFe>, SEFAZ 4.00 / NT 2025.002 layout) to parse, compress (~90% token savings), mathematically audit, and audit CBS/IBS tax credits. | |
| xmls | No | Optional batch array of up to 25 NF-e/NFC-e XML strings for fleet/procurement CBS/IBS credit auditing in a single call. | |
| items | No | Optional list of purchased items (NCM/cClassTrib/valor + highlighted CBS/IBS) for direct LC 214/2025 credit auditing without building XML. | |
| accessKey | No | Optional 44-digit Brazilian NF-e access key (Chave de Acesso) to decompose UF, issue date, issuer CNPJ, model, number, and validate Mod-11 check digit. Alias: access_key. | |
| aiSummary | No | Generate a concise accounting/tax audit summary via Cloudflare Workers AI (default: true). | |
| buyerRegime | No | Buyer tax regime (default: 'regime_regular'). | |
| includeItems | No | Include line-item details (NCM, CFOP, ICMS/IPI/PIS/COFINS and CBS/IBS credit audit) in output (default: true). | |
| referenceYear | No | Optional calendar year (2026..2033) for expected CBS/IBS rates (defaults to invoice issue year >= 2026, else 2026). | |
| supplierEmail | No | Optional supplier email address to prefill supplierAlert.emailDraft for agent-email-x402 chaining. | |
| auditRtcCredit | No | Enable LC 214/2025 CBS/IBS tax credit highlight audit & supplierAlert generation (default: true). |