Server definition
- Hash
- sha256:4fe6826bf141e0c1c9fe90acab6269fa0ae5c3c75b9d65c1ae1dc9f7d57168aa
- What it is
- What a remote MCP server returned when asked what it offers: 3 tools
The blob, as servednamed by its sha256
{
"instructions": null,
"tools": [
{
"description": "Computes Brazilian consumption-tax reform figures for one amount or a batch of up to 50 lines: it resolves the official Receita Federal cClassTrib classification from a code, NBS, NCM, LC 116 code or sector alias, applies the legal CBS/IBS reduction, the transition rates of the chosen year from 2026 to 2033 and the ISS phase-down, and returns the amounts due, the effective rates, the saving versus full taxation, a calculation trail and the ready-to-embed gIBSCBS XML group. It also simulates Simples Nacional DAS with the annex, revenue bracket and Fator R, and tells you how much CBS/IBS credit the buyer can actually appropriate. Use it for pricing, quoting, contract repricing, credit analysis and any what-if across transition years. Do not use it when you need the printable fiscal document itself, which is what generate_danfse_rtc returns, and do not use it to browse the official tables, which rtc_lookup_official_tables does for free. Deterministic, read-only and fully offline at the edge, so the same input always returns the same figures and a retry is safe. Costs 0.005 USDC per call via x402 v2 on Base (eip155:8453) or a B2B X-API-Key; an unpaid call returns HTTP 402 with a PAYMENT-REQUIRED header. It never throws on bad input: an unparseable body is treated as empty and defaults apply, and an unknown cClassTrib falls back to full taxation with rtc.warning explaining it, so always read classification.matchedBy and rtc.warning before trusting the figure.",
"inputSchema": {
"properties": {
"aliqCbs": {
"description": "Manual override for the nominal CBS rate in percent, bypassing the transition schedule for the chosen year. Use it only to model a scenario; leave it out to apply the official rate. Aliases accepted: cbsAliquota, aliq_cbs.",
"minimum": 0,
"type": "number"
},
"aliqIbs": {
"description": "Manual override for the total nominal IBS rate in percent. It is split between state and municipal shares in the proportion of the chosen transition year. Aliases accepted: ibsAliquota, aliq_ibs.",
"minimum": 0,
"type": "number"
},
"aliqIbsMun": {
"description": "Manual override for the municipal share of the nominal IBS rate, in percent. Overrides the municipal portion of aliqIbs when both are supplied.",
"minimum": 0,
"type": "number"
},
"aliqIbsUf": {
"description": "Manual override for the state (UF) share of the nominal IBS rate, in percent. Overrides the state portion of aliqIbs when both are supplied.",
"minimum": 0,
"type": "number"
},
"anexoSimples": {
"description": "Simples Nacional annex, used only when regime is 'simples_nacional'. When omitted it is derived from atividadeSimples and fatorR, falling back to Annex III. Alias accepted: anexo_simples.",
"enum": [
"I",
"II",
"III",
"IV",
"V"
],
"type": "string"
},
"ano": {
"description": "Calendar year of the LC 214/2025 transition schedule, defaulting to 2026. Years below 2026 are treated as 2026 (the test year with a 0.9% CBS plus 0.1% IBS token rate) and years above 2033 as 2033 (full CBS/IBS, ISS and ICMS extinguished). The year drives both the nominal rates and the ISS phase-down.",
"maximum": 2033,
"minimum": 2026,
"type": "integer"
},
"atividadeSimples": {
"description": "Official Receita Federal Simples Nacional activity code, '01' to '14' or '90'. Supplying it lets the engine pick the correct annex automatically, including the Annex III versus Annex V switch driven by fatorR.",
"type": "string"
},
"cClassTrib": {
"description": "Official 6-digit Receita Federal cClassTrib code from Base V0073, the highest-priority classifier. Examples: '000001' full taxation, '200003' basic food basket (100% reduction), '200027' property rental (70%), '200028' education (60%), '200029' health (60%), '200044' cybersecurity (60%), '200046' construction (50%), '200047' bars and restaurants (40%), '200052' regulated professions (30%), '620001' fuels (single-phase). An unknown code does not fail the call: full taxation is applied and rtc.warning explains it. Alias accepted: c_class_trib.",
"type": "string"
},
"discriminacao": {
"description": "Short description of the operation, carried into the result and the calculation trail.",
"type": "string"
},
"fatorR": {
"description": "Payroll-to-revenue ratio as a decimal fraction, not a percentage: 0.31 means 31%. At 0.28 or above a service activity falls under Annex III, below it under Annex V. Alias accepted: fator_r.",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"itens": {
"description": "Optional batch of lines priced in a single paid call, capped at 50 items; anything beyond the 50th is ignored. When present, the response adds batchRtcCalculation with per-line figures and the consolidated totals, while rtcCalculation still reflects the top-level valorServico. Each line inherits the top-level regime, ano, rbt12, fatorR and annex, and may override only its own classification and rates.",
"items": {
"properties": {
"aliqCbs": {
"description": "Line-level manual nominal CBS rate override, in percent.",
"type": "number"
},
"aliqIbs": {
"description": "Line-level manual nominal total IBS rate override, in percent.",
"type": "number"
},
"cClassTrib": {
"description": "Line-level cClassTrib override. Falls back to the top-level cClassTrib when omitted. Alias accepted: c_class_trib.",
"type": "string"
},
"codigoTributacaoNacional": {
"description": "Line-level LC 116 service code, for example '07.02.01', used as a classification fallback.",
"type": "string"
},
"descricao": {
"description": "Line description, echoed back in the result. Defaults to 'Item N'. Alias accepted: description.",
"type": "string"
},
"nbs": {
"description": "Line-level NBS code, used to resolve this line's cClassTrib. Falls back to the top-level nbs.",
"type": "string"
},
"ncm": {
"description": "Line-level NCM code, used to resolve this line's cClassTrib. Falls back to the top-level ncm.",
"type": "string"
},
"setor": {
"description": "Line-level sector alias. Falls back to the top-level setor.",
"type": "string"
},
"valor": {
"description": "Line amount in BRL. Negative values are clamped to zero. Alias accepted: baseCalculo.",
"minimum": 0,
"type": "number"
}
},
"type": "object"
},
"maxItems": 50,
"type": "array"
},
"nbs": {
"description": "NBS service code, 4 to 9 digits. Used to resolve cClassTrib automatically when cClassTrib is absent. Second in resolution priority, after cClassTrib and before ncm.",
"type": "string"
},
"ncm": {
"description": "NCM goods code, 4 to 8 digits. Used to resolve cClassTrib automatically when neither cClassTrib nor nbs is supplied. Third in resolution priority.",
"type": "string"
},
"rbt12": {
"description": "Gross revenue of the last 12 months in BRL, which selects the Simples Nacional revenue bracket and therefore the effective DAS rate. Defaults to 360000.",
"exclusiveMinimum": 0,
"type": "number"
},
"regime": {
"description": "Tax regime, defaulting to 'regime_regular'. 'simples_nacional' adds a DAS simulation and the B2B credit actually transferable to the buyer under LC 214/2025 Art. 41, which is capped at the CBS/IBS share inside the DAS. 'simples_nacional_regular_por_fora' models a Simples company that elected regular CBS/IBS assessment, which transfers full credit to the buyer.",
"enum": [
"regime_regular",
"simples_nacional",
"simples_nacional_regular_por_fora"
],
"type": "string"
},
"servico": {
"description": "The service line itself. Values supplied here take precedence over their top-level equivalents, so prefer this object when issuing a document and use the flat fields only for a quick calculation.",
"properties": {
"cClassTrib": {
"description": "Service-level cClassTrib override, taking precedence over the top-level field.",
"type": "string"
},
"cbsAliquota": {
"description": "Service-level manual nominal CBS rate override, in percent. Alias accepted: aliqCbs.",
"minimum": 0,
"type": "number"
},
"codigoTributacaoNacional": {
"description": "LC 116 national service code, for example '07.02.01'. Used to resolve cClassTrib when no fiscal code or sector is supplied.",
"type": "string"
},
"descontoIncondicionado": {
"description": "Unconditional discount in BRL, subtracted from valorServico to form the CBS/IBS/ISS tax base. Defaults to 0.",
"minimum": 0,
"type": "number"
},
"discriminacao": {
"description": "Full description of the service rendered, printed verbatim on the DANFSe.",
"type": "string"
},
"ibsAliquota": {
"description": "Service-level manual nominal total IBS rate override, in percent. Alias accepted: aliqIbs.",
"minimum": 0,
"type": "number"
},
"issAliquota": {
"description": "Municipal ISS rate in percent, defaulting to 5. It is automatically phased down from 2029 and reaches zero in 2033 under LC 214/2025. Alias accepted: aliqIss.",
"maximum": 5,
"minimum": 0,
"type": "number"
},
"nbs": {
"description": "Service-level NBS code, taking precedence over the top-level field.",
"type": "string"
},
"ncm": {
"description": "Service-level NCM code, taking precedence over the top-level field.",
"type": "string"
},
"retencaoIss": {
"description": "When true, ISS is withheld by the taker and subtracted from valorLiquidoEstimado.",
"type": "boolean"
},
"setor": {
"description": "Service-level sector alias, taking precedence over the top-level field.",
"type": "string"
},
"valorServico": {
"description": "Gross service amount in BRL, before unconditional discounts.",
"minimum": 0,
"type": "number"
}
},
"required": [
"discriminacao",
"valorServico"
],
"type": "object"
},
"setor": {
"description": "Semantic sector alias, the easiest classifier when the fiscal codes are unknown. Accepted values include 'construcao_civil', 'saude', 'educacao', 'cesta_basica', 'profissao_intelectual', 'locacao_imoveis', 'bares_restaurantes', 'ciberseguranca', 'combustiveis' and 'padrao'. Lowest resolution priority, used only when cClassTrib, nbs, ncm and the LC 116 code all fail to match.",
"type": "string"
},
"valorServico": {
"description": "Amount in BRL to tax, as a plain number (100000 means R$ 100.000,00). Defaults to 1000 when neither this nor servico.valorServico is supplied. Aliases accepted: valor_servico, baseCalculo.",
"minimum": 0,
"type": "number"
}
},
"required": [],
"type": "object"
},
"name": "calculate_rtc_official",
"outputSchema": {
"properties": {
"batchRtcCalculation": {
"description": "Per-line results and consolidated totals. Present only when itens was supplied.",
"properties": {
"ano": {
"description": "Transition year applied to every line.",
"type": "number"
},
"dbVersion": {
"description": "Version of the official table set applied.",
"type": "string"
},
"items": {
"description": "One entry per priced line, in input order.",
"items": {
"properties": {
"baseCalculo": {
"description": "Line tax base in BRL.",
"type": "number"
},
"cbs": {
"description": "CBS (federal) figures.",
"properties": {
"aliquota": {
"description": "Effective CBS rate in percent after the reduction.",
"type": "number"
},
"aliquotaNominal": {
"description": "Nominal CBS rate in percent for the chosen transition year, before the legal reduction.",
"type": "number"
},
"creditoAdquirentePermitido": {
"description": "Whether the buyer may appropriate this CBS as a credit.",
"type": "boolean"
},
"memoria": {
"description": "Human-readable calculation trail, ready to paste into a fiscal memo.",
"type": "string"
},
"reducaoPct": {
"description": "Legal reduction applied, in percent.",
"type": "number"
},
"tributo": {
"description": "Always 'CBS'.",
"type": "string"
},
"valor": {
"description": "CBS due in BRL.",
"type": "number"
}
},
"type": "object"
},
"classification": {
"description": "The official Receita Federal classification the engine resolved and actually applied.",
"properties": {
"anexo": {
"description": "Annex of LC 214/2025 that grants the reduction, or null when none applies.",
"type": "string"
},
"cClassTrib": {
"description": "Resolved 6-digit cClassTrib code.",
"type": "string"
},
"creditEligibleCbs": {
"description": "Whether the buyer may appropriate a CBS credit on this operation.",
"type": "boolean"
},
"creditEligibleIbs": {
"description": "Whether the buyer may appropriate an IBS credit on this operation.",
"type": "boolean"
},
"cst": {
"description": "CST tax-situation code tied to that classification, for example '000' for full taxation or '200' for a legal reduction.",
"type": "string"
},
"cstDescricao": {
"description": "Text description of the CST code.",
"type": "string"
},
"descricao": {
"description": "Text description of the cClassTrib code.",
"type": "string"
},
"fundamentacaoLegal": {
"description": "Article of LC 214/2025 that supports the classification. Quote this in a fiscal memo.",
"type": "string"
},
"matchedBy": {
"description": "Which input actually resolved the classification. 'default' means nothing matched and full taxation (000001) was applied, which is the signal to review the input.",
"enum": [
"cClassTrib",
"nbs",
"ncm",
"lc116",
"setor",
"default"
],
"type": "string"
},
"matchedValue": {
"description": "The exact value that produced the match.",
"type": "string"
},
"redCbsPct": {
"description": "Legal CBS reduction applied, in percent. 100 means fully exempt.",
"type": "number"
},
"redIbsPct": {
"description": "Legal IBS reduction applied, in percent.",
"type": "number"
},
"tipoAliquota": {
"description": "Rate type of the classification, for example standard, reduced or single-phase.",
"type": "string"
}
},
"type": "object"
},
"descricao": {
"description": "Line description as supplied, or 'Item N'.",
"type": "string"
},
"economiaReducaoLegal": {
"description": "Savings from the legal reduction on this line, in BRL, broken into cbsBrl, ibsBrl and totalBrl.",
"type": "object"
},
"ibs": {
"description": "IBS figures, split between the state (UF) and municipal shares.",
"properties": {
"aliquota": {
"description": "Total effective IBS rate in percent after the reduction.",
"type": "number"
},
"aliquotaMun": {
"description": "Effective municipal rate, in percent.",
"type": "number"
},
"aliquotaMunNominal": {
"description": "Municipal share of the nominal rate, in percent.",
"type": "number"
},
"aliquotaNominal": {
"description": "Total nominal IBS rate in percent for the chosen year, before the legal reduction.",
"type": "number"
},
"aliquotaUf": {
"description": "Effective state rate, in percent.",
"type": "number"
},
"aliquotaUfNominal": {
"description": "State share of the nominal rate, in percent.",
"type": "number"
},
"creditoAdquirentePermitido": {
"description": "Whether the buyer may appropriate this IBS as a credit.",
"type": "boolean"
},
"memoria": {
"description": "Human-readable calculation trail, ready to paste into a fiscal memo.",
"type": "string"
},
"reducaoPct": {
"description": "Legal reduction applied, in percent.",
"type": "number"
},
"tributo": {
"description": "Always 'IBS'.",
"type": "string"
},
"valor": {
"description": "Total IBS due in BRL.",
"type": "number"
},
"valorMun": {
"description": "Municipal portion of the IBS due, in BRL.",
"type": "number"
},
"valorUf": {
"description": "State portion of the IBS due, in BRL.",
"type": "number"
}
},
"type": "object"
},
"ibscbsOfficialGroup": {
"description": "The official gIBSCBS XML group for this line.",
"type": "object"
},
"numero": {
"description": "1-based line number.",
"type": "number"
},
"totalImpostosRtc": {
"description": "CBS plus IBS due on this line, in BRL.",
"type": "number"
}
},
"type": "object"
},
"type": "array"
},
"itemsCount": {
"description": "How many lines were actually priced, at most 50.",
"type": "number"
},
"regime": {
"description": "Regime applied to every line.",
"type": "string"
},
"totals": {
"description": "Consolidated totals across all lines, using the official Receita Federal field names.",
"properties": {
"economiaReducaoLegalBrl": {
"description": "Total saved by legal reductions across all lines, in BRL.",
"type": "number"
},
"totalImpostosRtc": {
"description": "Total CBS plus IBS due, in BRL.",
"type": "number"
},
"vBCIBSCBS": {
"description": "Sum of the CBS/IBS tax bases, in BRL.",
"type": "number"
},
"vCBS": {
"description": "Total CBS due, in BRL.",
"type": "number"
},
"vIBS": {
"description": "Total IBS due, in BRL.",
"type": "number"
}
},
"type": "object"
}
},
"type": "object"
},
"error": {
"description": "Stable machine-readable failure code. Common values: 'invalid_payment' / 'settlement_failed' (x402 verification or settlement refused, returned with HTTP 402), 'B2B_KEY_INVALID' and 'B2B_QUOTA_EXCEEDED' (B2B X-API-Key path). A classification that cannot be resolved is NOT an error: the call succeeds with full taxation applied and rtcCalculation.rtc.warning set.",
"type": "string"
},
"message": {
"description": "Human-readable explanation of the failure, in Portuguese. Safe to log or surface to a human operator.",
"type": "string"
},
"meta": {
"description": "Provenance of the calculation, worth logging for audit purposes.",
"properties": {
"legalSource": {
"description": "Normative reference and licence of the official tables.",
"type": "string"
},
"processingTimeMs": {
"description": "Edge processing time in milliseconds, excluding payment settlement.",
"type": "number"
},
"rfbDbVersion": {
"description": "Version of the official Receita Federal table set applied, for example 'V0073'.",
"type": "string"
},
"service": {
"description": "Service identifier that produced the result.",
"type": "string"
},
"version": {
"description": "Service version.",
"type": "string"
},
"zeroJavaServer": {
"description": "Always true: the official RTC engine runs entirely at the edge, with no Java service behind it.",
"type": "boolean"
}
},
"type": "object"
},
"rtcCalculation": {
"description": "The full RTC and ISS calculation for the main service line.",
"properties": {
"baseCalculo": {
"description": "Tax base in BRL: valorServico minus descontoIncondicionado, floored at zero.",
"type": "number"
},
"iss": {
"description": "Municipal ISS, including the LC 214/2025 phase-down.",
"properties": {
"aliquota": {
"description": "Effective ISS rate in percent after the transition reduction.",
"type": "number"
},
"aliquotaNominal": {
"description": "Nominal municipal ISS rate in percent, defaulting to 5.",
"type": "number"
},
"reducaoTransicaoPct": {
"description": "Transition reduction applied to ISS for the chosen year, in percent. It is 0 up to 2028 and 100 from 2033, when ISS is extinguished.",
"type": "number"
},
"retido": {
"description": "Whether ISS is withheld by the taker.",
"type": "boolean"
},
"valor": {
"description": "ISS due in BRL.",
"type": "number"
}
},
"type": "object"
},
"rtc": {
"description": "CBS and IBS block computed from the official Receita Federal tables.",
"properties": {
"aliquotaEfetivaTotalRtcPct": {
"description": "Combined effective CBS plus IBS rate, in percent.",
"type": "number"
},
"ano": {
"description": "Transition year actually applied, clamped to 2026..2033.",
"type": "number"
},
"cbs": {
"description": "CBS (federal) figures.",
"properties": {
"aliquota": {
"description": "Effective CBS rate in percent after the reduction.",
"type": "number"
},
"aliquotaNominal": {
"description": "Nominal CBS rate in percent for the chosen transition year, before the legal reduction.",
"type": "number"
},
"creditoAdquirentePermitido": {
"description": "Whether the buyer may appropriate this CBS as a credit.",
"type": "boolean"
},
"memoria": {
"description": "Human-readable calculation trail, ready to paste into a fiscal memo.",
"type": "string"
},
"reducaoPct": {
"description": "Legal reduction applied, in percent.",
"type": "number"
},
"tributo": {
"description": "Always 'CBS'.",
"type": "string"
},
"valor": {
"description": "CBS due in BRL.",
"type": "number"
}
},
"type": "object"
},
"classification": {
"description": "The official Receita Federal classification the engine resolved and actually applied.",
"properties": {
"anexo": {
"description": "Annex of LC 214/2025 that grants the reduction, or null when none applies.",
"type": "string"
},
"cClassTrib": {
"description": "Resolved 6-digit cClassTrib code.",
"type": "string"
},
"creditEligibleCbs": {
"description": "Whether the buyer may appropriate a CBS credit on this operation.",
"type": "boolean"
},
"creditEligibleIbs": {
"description": "Whether the buyer may appropriate an IBS credit on this operation.",
"type": "boolean"
},
"cst": {
"description": "CST tax-situation code tied to that classification, for example '000' for full taxation or '200' for a legal reduction.",
"type": "string"
},
"cstDescricao": {
"description": "Text description of the CST code.",
"type": "string"
},
"descricao": {
"description": "Text description of the cClassTrib code.",
"type": "string"
},
"fundamentacaoLegal": {
"description": "Article of LC 214/2025 that supports the classification. Quote this in a fiscal memo.",
"type": "string"
},
"matchedBy": {
"description": "Which input actually resolved the classification. 'default' means nothing matched and full taxation (000001) was applied, which is the signal to review the input.",
"enum": [
"cClassTrib",
"nbs",
"ncm",
"lc116",
"setor",
"default"
],
"type": "string"
},
"matchedValue": {
"description": "The exact value that produced the match.",
"type": "string"
},
"redCbsPct": {
"description": "Legal CBS reduction applied, in percent. 100 means fully exempt.",
"type": "number"
},
"redIbsPct": {
"description": "Legal IBS reduction applied, in percent.",
"type": "number"
},
"tipoAliquota": {
"description": "Rate type of the classification, for example standard, reduced or single-phase.",
"type": "string"
}
},
"type": "object"
},
"dbVersion": {
"description": "Version of the official table set, for example 'V0073'.",
"type": "string"
},
"economiaReducaoLegal": {
"description": "How much the legal reduction saved against full taxation. This is the number to quote when justifying a classification.",
"properties": {
"cbsBrl": {
"description": "CBS saved, in BRL.",
"type": "number"
},
"ibsBrl": {
"description": "IBS saved, in BRL.",
"type": "number"
},
"totalBrl": {
"description": "Total saved, in BRL.",
"type": "number"
}
},
"type": "object"
},
"faseTransicao": {
"description": "Name of the transition phase for that year, for example the 2026 test phase or full implementation.",
"type": "string"
},
"framework": {
"description": "Legal framework applied, LC 214/2025.",
"type": "string"
},
"ibs": {
"description": "IBS figures, split between the state (UF) and municipal shares.",
"properties": {
"aliquota": {
"description": "Total effective IBS rate in percent after the reduction.",
"type": "number"
},
"aliquotaMun": {
"description": "Effective municipal rate, in percent.",
"type": "number"
},
"aliquotaMunNominal": {
"description": "Municipal share of the nominal rate, in percent.",
"type": "number"
},
"aliquotaNominal": {
"description": "Total nominal IBS rate in percent for the chosen year, before the legal reduction.",
"type": "number"
},
"aliquotaUf": {
"description": "Effective state rate, in percent.",
"type": "number"
},
"aliquotaUfNominal": {
"description": "State share of the nominal rate, in percent.",
"type": "number"
},
"creditoAdquirentePermitido": {
"description": "Whether the buyer may appropriate this IBS as a credit.",
"type": "boolean"
},
"memoria": {
"description": "Human-readable calculation trail, ready to paste into a fiscal memo.",
"type": "string"
},
"reducaoPct": {
"description": "Legal reduction applied, in percent.",
"type": "number"
},
"tributo": {
"description": "Always 'IBS'.",
"type": "string"
},
"valor": {
"description": "Total IBS due in BRL.",
"type": "number"
},
"valorMun": {
"description": "Municipal portion of the IBS due, in BRL.",
"type": "number"
},
"valorUf": {
"description": "State portion of the IBS due, in BRL.",
"type": "number"
}
},
"type": "object"
},
"ibscbsOfficialGroup": {
"description": "The gIBSCBS group exactly as Receita Federal NT 2025.002 specifies it, with values already formatted as strings. Copy this block straight into an NFS-e or NF-e XML; gRed subgroups appear only when a reduction applies.",
"type": "object"
},
"normativeReference": {
"description": "Normative reference behind the tables.",
"type": "string"
},
"publishedDate": {
"description": "Publication date of that table set.",
"type": "string"
},
"regime": {
"description": "Regime actually applied, after inferring it from prestador.simplesNacional when not supplied.",
"enum": [
"regime_regular",
"simples_nacional",
"simples_nacional_regular_por_fora"
],
"type": "string"
},
"simplesNacional": {
"description": "Simples Nacional detail, present only when regime is 'simples_nacional'.",
"properties": {
"aliquotaEfetivaDasPct": {
"description": "Effective DAS rate in percent after applying the bracket deduction.",
"type": "number"
},
"aliquotaNominalDasPct": {
"description": "Nominal DAS rate of the bracket, in percent.",
"type": "number"
},
"anexo": {
"description": "Annex actually applied, I to V.",
"type": "string"
},
"atividadeOficial": {
"description": "The official Receita Federal activity record matched from atividadeSimples, when supplied.",
"type": "object"
},
"creditoTransferivelB2B": {
"description": "CBS/IBS credit the buyer can actually appropriate. This is the figure a B2B counterparty cares about: under LC 214/2025 Art. 41 a single DAS transfers only the CBS/IBS share embedded in it, which is far less than the regular-regime credit.",
"properties": {
"cbsAliqEfetivaPct": {
"description": "CBS share embedded in the effective DAS rate, in percent.",
"type": "number"
},
"ibsAliqEfetivaPct": {
"description": "IBS share embedded in the effective DAS rate, in percent.",
"type": "number"
},
"notaLegal": {
"description": "Legal note explaining the cap and when electing regular assessment is worth it.",
"type": "string"
},
"totalCreditoTransferivelBrl": {
"description": "Total transferable credit in BRL.",
"type": "number"
},
"vCbsTransferivelBrl": {
"description": "Transferable CBS credit in BRL.",
"type": "number"
},
"vIbsTransferivelBrl": {
"description": "Transferable IBS credit in BRL.",
"type": "number"
}
},
"type": "object"
},
"faixa": {
"description": "Revenue bracket index within the annex, 1 to 6.",
"type": "number"
},
"fatorR": {
"description": "Payroll-to-revenue ratio applied, when supplied.",
"type": "number"
},
"parcelaDeduzirBrl": {
"description": "Deduction amount of the bracket, in BRL, used in the effective-rate formula.",
"type": "number"
},
"rbt12": {
"description": "Trailing 12-month gross revenue in BRL that selected the bracket.",
"type": "number"
},
"regimeApuracao": {
"description": "Assessment mode, 'SN_PLENO' for the single DAS payment.",
"type": "string"
},
"valorDasEstimadoBrl": {
"description": "Estimated DAS due on this operation, in BRL.",
"type": "number"
}
},
"type": "object"
},
"totalImpostosRtc": {
"description": "CBS plus IBS due, in BRL.",
"type": "number"
},
"warning": {
"description": "Present only when the supplied cClassTrib was not found in the official table, in which case full taxation was applied. Treat it as a signal to fix the input.",
"type": "string"
}
},
"type": "object"
},
"valorLiquidoEstimado": {
"description": "Estimated net amount to receive in BRL: valorServico less withheld ISS when retencaoIss is true.",
"type": "number"
}
},
"type": "object"
},
"status": {
"description": "'CALCULATED' for this tool, since no printable document is produced.",
"enum": [
"CALCULATED",
"GENERATED"
],
"type": "string"
},
"success": {
"description": "Present and false only on a rejected call.",
"type": "boolean"
},
"suggestedNextSteps": {
"description": "Chaining hints for autonomous agents: sibling paid APIs in the same suite that are commonly called right after this one. Purely advisory, never required.",
"items": {
"properties": {
"endpoint": {
"description": "Absolute HTTPS endpoint of the suggested follow-up API.",
"type": "string"
},
"priceUsdc": {
"description": "Price of the suggested follow-up call, in USDC.",
"type": "string"
},
"reason": {
"description": "Why the follow-up call is worth making, in Portuguese.",
"type": "string"
},
"service": {
"description": "Service identifier of the suggested follow-up API.",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"required": [
"success",
"status",
"rtcCalculation"
],
"type": "object"
}
},
{
"description": "Produces the printable DANFSe of the Brazilian national NFS-e as self-contained HTML, with the access key, document number and verification code, and embeds the same official CBS/IBS/ISS calculation the engine performs from the Receita Federal Base V0073 tables. It accepts either structured provider, taker and service objects or a raw NFS-e XML (national or ABRASF standard) that it parses for you. Use it when a human-readable or archivable fiscal document is the deliverable: attaching an invoice to an email, publishing a customer portal page, or filing a PDF. Do not use it when you only need the numbers, since calculate_rtc_official returns the identical calculation without the HTML payload and therefore a much smaller response. Deterministic, read-only and fully offline at the edge: the document is rendered and returned, never transmitted, registered with any municipality or city hall, nor given any legal validity by this call, so treat it as a faithful rendering and not as an official issuance. Costs 0.005 USDC per call via x402 v2 on Base (eip155:8453) or a B2B X-API-Key; an unpaid call returns HTTP 402 with a PAYMENT-REQUIRED header. It never throws on bad input: missing identification fields are filled with demonstration placeholders, so always check that danfse.chaveAcesso is the key you supplied before archiving the result.",
"inputSchema": {
"properties": {
"aliqCbs": {
"description": "Manual override for the nominal CBS rate in percent, bypassing the transition schedule for the chosen year. Use it only to model a scenario; leave it out to apply the official rate. Aliases accepted: cbsAliquota, aliq_cbs.",
"minimum": 0,
"type": "number"
},
"aliqIbs": {
"description": "Manual override for the total nominal IBS rate in percent. It is split between state and municipal shares in the proportion of the chosen transition year. Aliases accepted: ibsAliquota, aliq_ibs.",
"minimum": 0,
"type": "number"
},
"aliqIbsMun": {
"description": "Manual override for the municipal share of the nominal IBS rate, in percent. Overrides the municipal portion of aliqIbs when both are supplied.",
"minimum": 0,
"type": "number"
},
"aliqIbsUf": {
"description": "Manual override for the state (UF) share of the nominal IBS rate, in percent. Overrides the state portion of aliqIbs when both are supplied.",
"minimum": 0,
"type": "number"
},
"anexoSimples": {
"description": "Simples Nacional annex, used only when regime is 'simples_nacional'. When omitted it is derived from atividadeSimples and fatorR, falling back to Annex III. Alias accepted: anexo_simples.",
"enum": [
"I",
"II",
"III",
"IV",
"V"
],
"type": "string"
},
"ano": {
"description": "Calendar year of the LC 214/2025 transition schedule, defaulting to 2026. Years below 2026 are treated as 2026 (the test year with a 0.9% CBS plus 0.1% IBS token rate) and years above 2033 as 2033 (full CBS/IBS, ISS and ICMS extinguished). The year drives both the nominal rates and the ISS phase-down.",
"maximum": 2033,
"minimum": 2026,
"type": "integer"
},
"atividadeSimples": {
"description": "Official Receita Federal Simples Nacional activity code, '01' to '14' or '90'. Supplying it lets the engine pick the correct annex automatically, including the Annex III versus Annex V switch driven by fatorR.",
"type": "string"
},
"cClassTrib": {
"description": "Official 6-digit Receita Federal cClassTrib code from Base V0073, the highest-priority classifier. Examples: '000001' full taxation, '200003' basic food basket (100% reduction), '200027' property rental (70%), '200028' education (60%), '200029' health (60%), '200044' cybersecurity (60%), '200046' construction (50%), '200047' bars and restaurants (40%), '200052' regulated professions (30%), '620001' fuels (single-phase). An unknown code does not fail the call: full taxation is applied and rtc.warning explains it. Alias accepted: c_class_trib.",
"type": "string"
},
"chaveAcesso": {
"description": "44-digit NFS-e access key printed on the document. A demonstration key is used when omitted, so always supply the real one for an archivable document.",
"type": "string"
},
"codigoVerificacao": {
"description": "Verification code printed on the DANFSe, used by the municipality to confirm authenticity.",
"type": "string"
},
"dataEmissao": {
"description": "Issue timestamp in ISO 8601, for example '2027-03-10T10:00:00-03:00'. Its year is used as the transition year when ano is not supplied.",
"type": "string"
},
"discriminacao": {
"description": "Flat alternative to servico.discriminacao. Used only when the servico object is absent.",
"type": "string"
},
"fatorR": {
"description": "Payroll-to-revenue ratio as a decimal fraction, not a percentage: 0.31 means 31%. At 0.28 or above a service activity falls under Annex III, below it under Annex V. Alias accepted: fator_r.",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"generateHtml": {
"default": true,
"description": "Whether to include the printable HTML. It defaults to true here; set it false to get exactly the payload of calculate_rtc_official at the same price.",
"type": "boolean"
},
"itens": {
"description": "Optional batch of lines priced in a single paid call, capped at 50 items; anything beyond the 50th is ignored. When present, the response adds batchRtcCalculation with per-line figures and the consolidated totals, while rtcCalculation still reflects the top-level valorServico. Each line inherits the top-level regime, ano, rbt12, fatorR and annex, and may override only its own classification and rates.",
"items": {
"properties": {
"aliqCbs": {
"description": "Line-level manual nominal CBS rate override, in percent.",
"type": "number"
},
"aliqIbs": {
"description": "Line-level manual nominal total IBS rate override, in percent.",
"type": "number"
},
"cClassTrib": {
"description": "Line-level cClassTrib override. Falls back to the top-level cClassTrib when omitted. Alias accepted: c_class_trib.",
"type": "string"
},
"codigoTributacaoNacional": {
"description": "Line-level LC 116 service code, for example '07.02.01', used as a classification fallback.",
"type": "string"
},
"descricao": {
"description": "Line description, echoed back in the result. Defaults to 'Item N'. Alias accepted: description.",
"type": "string"
},
"nbs": {
"description": "Line-level NBS code, used to resolve this line's cClassTrib. Falls back to the top-level nbs.",
"type": "string"
},
"ncm": {
"description": "Line-level NCM code, used to resolve this line's cClassTrib. Falls back to the top-level ncm.",
"type": "string"
},
"setor": {
"description": "Line-level sector alias. Falls back to the top-level setor.",
"type": "string"
},
"valor": {
"description": "Line amount in BRL. Negative values are clamped to zero. Alias accepted: baseCalculo.",
"minimum": 0,
"type": "number"
}
},
"type": "object"
},
"maxItems": 50,
"type": "array"
},
"nbs": {
"description": "NBS service code, 4 to 9 digits. Used to resolve cClassTrib automatically when cClassTrib is absent. Second in resolution priority, after cClassTrib and before ncm.",
"type": "string"
},
"ncm": {
"description": "NCM goods code, 4 to 8 digits. Used to resolve cClassTrib automatically when neither cClassTrib nor nbs is supplied. Third in resolution priority.",
"type": "string"
},
"numero": {
"description": "Document number printed on the DANFSe. Defaults to '1'.",
"type": "string"
},
"prestador": {
"description": "Service provider identification, printed on the DANFSe. Required for a document that is meant to be issued or archived.",
"properties": {
"cnpjCpf": {
"description": "Provider CNPJ (14 digits) or CPF (11 digits), digits only.",
"type": "string"
},
"inscricaoMunicipal": {
"description": "Provider municipal taxpayer registration, optional.",
"type": "string"
},
"municipio": {
"description": "Provider municipality, which is the ISS levy location for most LC 116 services.",
"type": "string"
},
"nomeFantasia": {
"description": "Provider trade name, optional.",
"type": "string"
},
"razaoSocial": {
"description": "Provider registered legal name.",
"type": "string"
},
"simplesNacional": {
"description": "When true and no explicit regime is supplied, the calculation switches to 'simples_nacional'.",
"type": "boolean"
},
"uf": {
"description": "Provider two-letter state code.",
"type": "string"
}
},
"required": [
"cnpjCpf",
"razaoSocial",
"municipio",
"uf"
],
"type": "object"
},
"rbt12": {
"description": "Gross revenue of the last 12 months in BRL, which selects the Simples Nacional revenue bracket and therefore the effective DAS rate. Defaults to 360000.",
"exclusiveMinimum": 0,
"type": "number"
},
"regime": {
"description": "Tax regime, defaulting to 'regime_regular'. 'simples_nacional' adds a DAS simulation and the B2B credit actually transferable to the buyer under LC 214/2025 Art. 41, which is capped at the CBS/IBS share inside the DAS. 'simples_nacional_regular_por_fora' models a Simples company that elected regular CBS/IBS assessment, which transfers full credit to the buyer.",
"enum": [
"regime_regular",
"simples_nacional",
"simples_nacional_regular_por_fora"
],
"type": "string"
},
"servico": {
"description": "The service line itself. Values supplied here take precedence over their top-level equivalents, so prefer this object when issuing a document and use the flat fields only for a quick calculation.",
"properties": {
"cClassTrib": {
"description": "Service-level cClassTrib override, taking precedence over the top-level field.",
"type": "string"
},
"cbsAliquota": {
"description": "Service-level manual nominal CBS rate override, in percent. Alias accepted: aliqCbs.",
"minimum": 0,
"type": "number"
},
"codigoTributacaoNacional": {
"description": "LC 116 national service code, for example '07.02.01'. Used to resolve cClassTrib when no fiscal code or sector is supplied.",
"type": "string"
},
"descontoIncondicionado": {
"description": "Unconditional discount in BRL, subtracted from valorServico to form the CBS/IBS/ISS tax base. Defaults to 0.",
"minimum": 0,
"type": "number"
},
"discriminacao": {
"description": "Full description of the service rendered, printed verbatim on the DANFSe.",
"type": "string"
},
"ibsAliquota": {
"description": "Service-level manual nominal total IBS rate override, in percent. Alias accepted: aliqIbs.",
"minimum": 0,
"type": "number"
},
"issAliquota": {
"description": "Municipal ISS rate in percent, defaulting to 5. It is automatically phased down from 2029 and reaches zero in 2033 under LC 214/2025. Alias accepted: aliqIss.",
"maximum": 5,
"minimum": 0,
"type": "number"
},
"nbs": {
"description": "Service-level NBS code, taking precedence over the top-level field.",
"type": "string"
},
"ncm": {
"description": "Service-level NCM code, taking precedence over the top-level field.",
"type": "string"
},
"retencaoIss": {
"description": "When true, ISS is withheld by the taker and subtracted from valorLiquidoEstimado.",
"type": "boolean"
},
"setor": {
"description": "Service-level sector alias, taking precedence over the top-level field.",
"type": "string"
},
"valorServico": {
"description": "Gross service amount in BRL, before unconditional discounts.",
"minimum": 0,
"type": "number"
}
},
"required": [
"discriminacao",
"valorServico"
],
"type": "object"
},
"setor": {
"description": "Semantic sector alias, the easiest classifier when the fiscal codes are unknown. Accepted values include 'construcao_civil', 'saude', 'educacao', 'cesta_basica', 'profissao_intelectual', 'locacao_imoveis', 'bares_restaurantes', 'ciberseguranca', 'combustiveis' and 'padrao'. Lowest resolution priority, used only when cClassTrib, nbs, ncm and the LC 116 code all fail to match.",
"type": "string"
},
"tomador": {
"description": "Service taker identification, printed on the DANFSe and relevant to the buyer's CBS/IBS credit.",
"properties": {
"cnpjCpf": {
"description": "Taker CNPJ (14 digits) or CPF (11 digits), digits only.",
"type": "string"
},
"municipio": {
"description": "Taker municipality, optional.",
"type": "string"
},
"razaoSocial": {
"description": "Taker registered legal name.",
"type": "string"
},
"uf": {
"description": "Taker two-letter state code, optional.",
"type": "string"
}
},
"required": [
"cnpjCpf",
"razaoSocial"
],
"type": "object"
},
"valorServico": {
"description": "Flat alternative to servico.valorServico, in BRL. Used only when the servico object is absent.",
"minimum": 0,
"type": "number"
},
"xml": {
"description": "Raw NFS-e XML in the national or ABRASF standard. When supplied, the access key, number, dates, parties and service values are read from it, and any field you also pass explicitly overrides the parsed value. Pass the decoded XML string, not a file path or URL.",
"type": "string"
}
},
"required": [],
"type": "object"
},
"name": "generate_danfse_rtc",
"outputSchema": {
"properties": {
"batchRtcCalculation": {
"description": "Per-line results and consolidated totals. Present only when itens was supplied.",
"properties": {
"ano": {
"description": "Transition year applied to every line.",
"type": "number"
},
"dbVersion": {
"description": "Version of the official table set applied.",
"type": "string"
},
"items": {
"description": "One entry per priced line, in input order.",
"items": {
"properties": {
"baseCalculo": {
"description": "Line tax base in BRL.",
"type": "number"
},
"cbs": {
"description": "CBS (federal) figures.",
"properties": {
"aliquota": {
"description": "Effective CBS rate in percent after the reduction.",
"type": "number"
},
"aliquotaNominal": {
"description": "Nominal CBS rate in percent for the chosen transition year, before the legal reduction.",
"type": "number"
},
"creditoAdquirentePermitido": {
"description": "Whether the buyer may appropriate this CBS as a credit.",
"type": "boolean"
},
"memoria": {
"description": "Human-readable calculation trail, ready to paste into a fiscal memo.",
"type": "string"
},
"reducaoPct": {
"description": "Legal reduction applied, in percent.",
"type": "number"
},
"tributo": {
"description": "Always 'CBS'.",
"type": "string"
},
"valor": {
"description": "CBS due in BRL.",
"type": "number"
}
},
"type": "object"
},
"classification": {
"description": "The official Receita Federal classification the engine resolved and actually applied.",
"properties": {
"anexo": {
"description": "Annex of LC 214/2025 that grants the reduction, or null when none applies.",
"type": "string"
},
"cClassTrib": {
"description": "Resolved 6-digit cClassTrib code.",
"type": "string"
},
"creditEligibleCbs": {
"description": "Whether the buyer may appropriate a CBS credit on this operation.",
"type": "boolean"
},
"creditEligibleIbs": {
"description": "Whether the buyer may appropriate an IBS credit on this operation.",
"type": "boolean"
},
"cst": {
"description": "CST tax-situation code tied to that classification, for example '000' for full taxation or '200' for a legal reduction.",
"type": "string"
},
"cstDescricao": {
"description": "Text description of the CST code.",
"type": "string"
},
"descricao": {
"description": "Text description of the cClassTrib code.",
"type": "string"
},
"fundamentacaoLegal": {
"description": "Article of LC 214/2025 that supports the classification. Quote this in a fiscal memo.",
"type": "string"
},
"matchedBy": {
"description": "Which input actually resolved the classification. 'default' means nothing matched and full taxation (000001) was applied, which is the signal to review the input.",
"enum": [
"cClassTrib",
"nbs",
"ncm",
"lc116",
"setor",
"default"
],
"type": "string"
},
"matchedValue": {
"description": "The exact value that produced the match.",
"type": "string"
},
"redCbsPct": {
"description": "Legal CBS reduction applied, in percent. 100 means fully exempt.",
"type": "number"
},
"redIbsPct": {
"description": "Legal IBS reduction applied, in percent.",
"type": "number"
},
"tipoAliquota": {
"description": "Rate type of the classification, for example standard, reduced or single-phase.",
"type": "string"
}
},
"type": "object"
},
"descricao": {
"description": "Line description as supplied, or 'Item N'.",
"type": "string"
},
"economiaReducaoLegal": {
"description": "Savings from the legal reduction on this line, in BRL, broken into cbsBrl, ibsBrl and totalBrl.",
"type": "object"
},
"ibs": {
"description": "IBS figures, split between the state (UF) and municipal shares.",
"properties": {
"aliquota": {
"description": "Total effective IBS rate in percent after the reduction.",
"type": "number"
},
"aliquotaMun": {
"description": "Effective municipal rate, in percent.",
"type": "number"
},
"aliquotaMunNominal": {
"description": "Municipal share of the nominal rate, in percent.",
"type": "number"
},
"aliquotaNominal": {
"description": "Total nominal IBS rate in percent for the chosen year, before the legal reduction.",
"type": "number"
},
"aliquotaUf": {
"description": "Effective state rate, in percent.",
"type": "number"
},
"aliquotaUfNominal": {
"description": "State share of the nominal rate, in percent.",
"type": "number"
},
"creditoAdquirentePermitido": {
"description": "Whether the buyer may appropriate this IBS as a credit.",
"type": "boolean"
},
"memoria": {
"description": "Human-readable calculation trail, ready to paste into a fiscal memo.",
"type": "string"
},
"reducaoPct": {
"description": "Legal reduction applied, in percent.",
"type": "number"
},
"tributo": {
"description": "Always 'IBS'.",
"type": "string"
},
"valor": {
"description": "Total IBS due in BRL.",
"type": "number"
},
"valorMun": {
"description": "Municipal portion of the IBS due, in BRL.",
"type": "number"
},
"valorUf": {
"description": "State portion of the IBS due, in BRL.",
"type": "number"
}
},
"type": "object"
},
"ibscbsOfficialGroup": {
"description": "The official gIBSCBS XML group for this line.",
"type": "object"
},
"numero": {
"description": "1-based line number.",
"type": "number"
},
"totalImpostosRtc": {
"description": "CBS plus IBS due on this line, in BRL.",
"type": "number"
}
},
"type": "object"
},
"type": "array"
},
"itemsCount": {
"description": "How many lines were actually priced, at most 50.",
"type": "number"
},
"regime": {
"description": "Regime applied to every line.",
"type": "string"
},
"totals": {
"description": "Consolidated totals across all lines, using the official Receita Federal field names.",
"properties": {
"economiaReducaoLegalBrl": {
"description": "Total saved by legal reductions across all lines, in BRL.",
"type": "number"
},
"totalImpostosRtc": {
"description": "Total CBS plus IBS due, in BRL.",
"type": "number"
},
"vBCIBSCBS": {
"description": "Sum of the CBS/IBS tax bases, in BRL.",
"type": "number"
},
"vCBS": {
"description": "Total CBS due, in BRL.",
"type": "number"
},
"vIBS": {
"description": "Total IBS due, in BRL.",
"type": "number"
}
},
"type": "object"
}
},
"type": "object"
},
"danfse": {
"description": "The printable document. Present only when generateHtml is true.",
"properties": {
"chaveAcesso": {
"description": "Access key printed on the document, echoing the input or the demonstration placeholder.",
"type": "string"
},
"codigoVerificacao": {
"description": "Verification code printed on the document.",
"type": "string"
},
"html": {
"description": "Complete self-contained HTML of the DANFSe, with inline styles and no external assets. Render it, print it to PDF, or email it as-is.",
"type": "string"
},
"numero": {
"description": "Document number printed on the document.",
"type": "string"
}
},
"type": "object"
},
"error": {
"description": "Stable machine-readable failure code. Common values: 'invalid_payment' / 'settlement_failed' (x402 verification or settlement refused, returned with HTTP 402), 'B2B_KEY_INVALID' and 'B2B_QUOTA_EXCEEDED' (B2B X-API-Key path). A classification that cannot be resolved is NOT an error: the call succeeds with full taxation applied and rtcCalculation.rtc.warning set.",
"type": "string"
},
"message": {
"description": "Human-readable explanation of the failure, in Portuguese. Safe to log or surface to a human operator.",
"type": "string"
},
"meta": {
"description": "Provenance of the calculation, worth logging for audit purposes.",
"properties": {
"legalSource": {
"description": "Normative reference and licence of the official tables.",
"type": "string"
},
"processingTimeMs": {
"description": "Edge processing time in milliseconds, excluding payment settlement.",
"type": "number"
},
"rfbDbVersion": {
"description": "Version of the official Receita Federal table set applied, for example 'V0073'.",
"type": "string"
},
"service": {
"description": "Service identifier that produced the result.",
"type": "string"
},
"version": {
"description": "Service version.",
"type": "string"
},
"zeroJavaServer": {
"description": "Always true: the official RTC engine runs entirely at the edge, with no Java service behind it.",
"type": "boolean"
}
},
"type": "object"
},
"rtcCalculation": {
"description": "The full RTC and ISS calculation for the main service line.",
"properties": {
"baseCalculo": {
"description": "Tax base in BRL: valorServico minus descontoIncondicionado, floored at zero.",
"type": "number"
},
"iss": {
"description": "Municipal ISS, including the LC 214/2025 phase-down.",
"properties": {
"aliquota": {
"description": "Effective ISS rate in percent after the transition reduction.",
"type": "number"
},
"aliquotaNominal": {
"description": "Nominal municipal ISS rate in percent, defaulting to 5.",
"type": "number"
},
"reducaoTransicaoPct": {
"description": "Transition reduction applied to ISS for the chosen year, in percent. It is 0 up to 2028 and 100 from 2033, when ISS is extinguished.",
"type": "number"
},
"retido": {
"description": "Whether ISS is withheld by the taker.",
"type": "boolean"
},
"valor": {
"description": "ISS due in BRL.",
"type": "number"
}
},
"type": "object"
},
"rtc": {
"description": "CBS and IBS block computed from the official Receita Federal tables.",
"properties": {
"aliquotaEfetivaTotalRtcPct": {
"description": "Combined effective CBS plus IBS rate, in percent.",
"type": "number"
},
"ano": {
"description": "Transition year actually applied, clamped to 2026..2033.",
"type": "number"
},
"cbs": {
"description": "CBS (federal) figures.",
"properties": {
"aliquota": {
"description": "Effective CBS rate in percent after the reduction.",
"type": "number"
},
"aliquotaNominal": {
"description": "Nominal CBS rate in percent for the chosen transition year, before the legal reduction.",
"type": "number"
},
"creditoAdquirentePermitido": {
"description": "Whether the buyer may appropriate this CBS as a credit.",
"type": "boolean"
},
"memoria": {
"description": "Human-readable calculation trail, ready to paste into a fiscal memo.",
"type": "string"
},
"reducaoPct": {
"description": "Legal reduction applied, in percent.",
"type": "number"
},
"tributo": {
"description": "Always 'CBS'.",
"type": "string"
},
"valor": {
"description": "CBS due in BRL.",
"type": "number"
}
},
"type": "object"
},
"classification": {
"description": "The official Receita Federal classification the engine resolved and actually applied.",
"properties": {
"anexo": {
"description": "Annex of LC 214/2025 that grants the reduction, or null when none applies.",
"type": "string"
},
"cClassTrib": {
"description": "Resolved 6-digit cClassTrib code.",
"type": "string"
},
"creditEligibleCbs": {
"description": "Whether the buyer may appropriate a CBS credit on this operation.",
"type": "boolean"
},
"creditEligibleIbs": {
"description": "Whether the buyer may appropriate an IBS credit on this operation.",
"type": "boolean"
},
"cst": {
"description": "CST tax-situation code tied to that classification, for example '000' for full taxation or '200' for a legal reduction.",
"type": "string"
},
"cstDescricao": {
"description": "Text description of the CST code.",
"type": "string"
},
"descricao": {
"description": "Text description of the cClassTrib code.",
"type": "string"
},
"fundamentacaoLegal": {
"description": "Article of LC 214/2025 that supports the classification. Quote this in a fiscal memo.",
"type": "string"
},
"matchedBy": {
"description": "Which input actually resolved the classification. 'default' means nothing matched and full taxation (000001) was applied, which is the signal to review the input.",
"enum": [
"cClassTrib",
"nbs",
"ncm",
"lc116",
"setor",
"default"
],
"type": "string"
},
"matchedValue": {
"description": "The exact value that produced the match.",
"type": "string"
},
"redCbsPct": {
"description": "Legal CBS reduction applied, in percent. 100 means fully exempt.",
"type": "number"
},
"redIbsPct": {
"description": "Legal IBS reduction applied, in percent.",
"type": "number"
},
"tipoAliquota": {
"description": "Rate type of the classification, for example standard, reduced or single-phase.",
"type": "string"
}
},
"type": "object"
},
"dbVersion": {
"description": "Version of the official table set, for example 'V0073'.",
"type": "string"
},
"economiaReducaoLegal": {
"description": "How much the legal reduction saved against full taxation. This is the number to quote when justifying a classification.",
"properties": {
"cbsBrl": {
"description": "CBS saved, in BRL.",
"type": "number"
},
"ibsBrl": {
"description": "IBS saved, in BRL.",
"type": "number"
},
"totalBrl": {
"description": "Total saved, in BRL.",
"type": "number"
}
},
"type": "object"
},
"faseTransicao": {
"description": "Name of the transition phase for that year, for example the 2026 test phase or full implementation.",
"type": "string"
},
"framework": {
"description": "Legal framework applied, LC 214/2025.",
"type": "string"
},
"ibs": {
"description": "IBS figures, split between the state (UF) and municipal shares.",
"properties": {
"aliquota": {
"description": "Total effective IBS rate in percent after the reduction.",
"type": "number"
},
"aliquotaMun": {
"description": "Effective municipal rate, in percent.",
"type": "number"
},
"aliquotaMunNominal": {
"description": "Municipal share of the nominal rate, in percent.",
"type": "number"
},
"aliquotaNominal": {
"description": "Total nominal IBS rate in percent for the chosen year, before the legal reduction.",
"type": "number"
},
"aliquotaUf": {
"description": "Effective state rate, in percent.",
"type": "number"
},
"aliquotaUfNominal": {
"description": "State share of the nominal rate, in percent.",
"type": "number"
},
"creditoAdquirentePermitido": {
"description": "Whether the buyer may appropriate this IBS as a credit.",
"type": "boolean"
},
"memoria": {
"description": "Human-readable calculation trail, ready to paste into a fiscal memo.",
"type": "string"
},
"reducaoPct": {
"description": "Legal reduction applied, in percent.",
"type": "number"
},
"tributo": {
"description": "Always 'IBS'.",
"type": "string"
},
"valor": {
"description": "Total IBS due in BRL.",
"type": "number"
},
"valorMun": {
"description": "Municipal portion of the IBS due, in BRL.",
"type": "number"
},
"valorUf": {
"description": "State portion of the IBS due, in BRL.",
"type": "number"
}
},
"type": "object"
},
"ibscbsOfficialGroup": {
"description": "The gIBSCBS group exactly as Receita Federal NT 2025.002 specifies it, with values already formatted as strings. Copy this block straight into an NFS-e or NF-e XML; gRed subgroups appear only when a reduction applies.",
"type": "object"
},
"normativeReference": {
"description": "Normative reference behind the tables.",
"type": "string"
},
"publishedDate": {
"description": "Publication date of that table set.",
"type": "string"
},
"regime": {
"description": "Regime actually applied, after inferring it from prestador.simplesNacional when not supplied.",
"enum": [
"regime_regular",
"simples_nacional",
"simples_nacional_regular_por_fora"
],
"type": "string"
},
"simplesNacional": {
"description": "Simples Nacional detail, present only when regime is 'simples_nacional'.",
"properties": {
"aliquotaEfetivaDasPct": {
"description": "Effective DAS rate in percent after applying the bracket deduction.",
"type": "number"
},
"aliquotaNominalDasPct": {
"description": "Nominal DAS rate of the bracket, in percent.",
"type": "number"
},
"anexo": {
"description": "Annex actually applied, I to V.",
"type": "string"
},
"atividadeOficial": {
"description": "The official Receita Federal activity record matched from atividadeSimples, when supplied.",
"type": "object"
},
"creditoTransferivelB2B": {
"description": "CBS/IBS credit the buyer can actually appropriate. This is the figure a B2B counterparty cares about: under LC 214/2025 Art. 41 a single DAS transfers only the CBS/IBS share embedded in it, which is far less than the regular-regime credit.",
"properties": {
"cbsAliqEfetivaPct": {
"description": "CBS share embedded in the effective DAS rate, in percent.",
"type": "number"
},
"ibsAliqEfetivaPct": {
"description": "IBS share embedded in the effective DAS rate, in percent.",
"type": "number"
},
"notaLegal": {
"description": "Legal note explaining the cap and when electing regular assessment is worth it.",
"type": "string"
},
"totalCreditoTransferivelBrl": {
"description": "Total transferable credit in BRL.",
"type": "number"
},
"vCbsTransferivelBrl": {
"description": "Transferable CBS credit in BRL.",
"type": "number"
},
"vIbsTransferivelBrl": {
"description": "Transferable IBS credit in BRL.",
"type": "number"
}
},
"type": "object"
},
"faixa": {
"description": "Revenue bracket index within the annex, 1 to 6.",
"type": "number"
},
"fatorR": {
"description": "Payroll-to-revenue ratio applied, when supplied.",
"type": "number"
},
"parcelaDeduzirBrl": {
"description": "Deduction amount of the bracket, in BRL, used in the effective-rate formula.",
"type": "number"
},
"rbt12": {
"description": "Trailing 12-month gross revenue in BRL that selected the bracket.",
"type": "number"
},
"regimeApuracao": {
"description": "Assessment mode, 'SN_PLENO' for the single DAS payment.",
"type": "string"
},
"valorDasEstimadoBrl": {
"description": "Estimated DAS due on this operation, in BRL.",
"type": "number"
}
},
"type": "object"
},
"totalImpostosRtc": {
"description": "CBS plus IBS due, in BRL.",
"type": "number"
},
"warning": {
"description": "Present only when the supplied cClassTrib was not found in the official table, in which case full taxation was applied. Treat it as a signal to fix the input.",
"type": "string"
}
},
"type": "object"
},
"valorLiquidoEstimado": {
"description": "Estimated net amount to receive in BRL: valorServico less withheld ISS when retencaoIss is true.",
"type": "number"
}
},
"type": "object"
},
"status": {
"description": "'GENERATED' when the HTML document is included, 'CALCULATED' when generateHtml was set to false.",
"enum": [
"GENERATED",
"CALCULATED"
],
"type": "string"
},
"success": {
"description": "Present and false only on a rejected call.",
"type": "boolean"
},
"suggestedNextSteps": {
"description": "Chaining hints for autonomous agents: sibling paid APIs in the same suite that are commonly called right after this one. Purely advisory, never required.",
"items": {
"properties": {
"endpoint": {
"description": "Absolute HTTPS endpoint of the suggested follow-up API.",
"type": "string"
},
"priceUsdc": {
"description": "Price of the suggested follow-up call, in USDC.",
"type": "string"
},
"reason": {
"description": "Why the follow-up call is worth making, in Portuguese.",
"type": "string"
},
"service": {
"description": "Service identifier of the suggested follow-up API.",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"required": [
"success",
"status",
"rtcCalculation"
],
"type": "object"
}
},
{
"description": "Returns the reference data behind the calculator at no charge: the table-set metadata, the full 2026 to 2033 transition schedule with nominal CBS and IBS rates per year, the headline sector reductions with their cClassTrib code and the LC 214/2025 article that grants them, every accepted sector alias, and the official Simples Nacional activity list. Passing a cClassTrib code instead resolves that single classification. Use it to discover which classifier to send to calculate_rtc_official, to validate a code before pricing, or to explain a reduction with its legal basis. Do not use it to tax an amount, which calculate_rtc_official does, or to produce a document, which generate_danfse_rtc does. This is the only free tool on this server: it needs no x402 payment and no API key, is read-only, idempotent and fully offline, and an unknown code returns HTTP 404 with success:false and a null result rather than an exception.",
"inputSchema": {
"properties": {
"cClassTrib": {
"description": "Optional 6-digit cClassTrib code to resolve on its own, for example '200046'. Omit it to receive the complete table set instead of a single record.",
"type": "string"
}
},
"required": [],
"type": "object"
},
"name": "rtc_lookup_official_tables",
"outputSchema": {
"properties": {
"keyReductions": {
"description": "Headline sector reductions, one entry per sector. Returned only when cClassTrib is omitted.",
"items": {
"properties": {
"artigo": {
"description": "Article of LC 214/2025 that grants the reduction.",
"type": "string"
},
"cClassTrib": {
"description": "Official code for that sector.",
"type": "string"
},
"cst": {
"description": "CST code tied to the classification.",
"type": "string"
},
"reducaoPct": {
"description": "Legal CBS/IBS reduction, in percent.",
"type": "number"
},
"setor": {
"description": "Sector alias you can pass as setor.",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"metadata": {
"description": "Official table-set provenance: version, publication date, normative reference, licence, record counts and source engines.",
"type": "object"
},
"result": {
"description": "The single resolved classification record. Present only when cClassTrib was supplied; null when the code was not found.",
"type": "object"
},
"sectorAliases": {
"description": "Every sector alias the engine accepts in the setor field. Returned only when cClassTrib is omitted.",
"items": {
"type": "string"
},
"type": "array"
},
"simplesActivities": {
"description": "Official Receita Federal Simples Nacional activity records, each with its code, description and the annex to apply with and without Fator R. Returned only when cClassTrib is omitted.",
"type": "array"
},
"success": {
"description": "true when the tables were returned, or when the requested cClassTrib was found. false with HTTP 404 when a supplied code does not exist.",
"type": "boolean"
},
"transitionSchedule": {
"description": "Map keyed by year from 2026 to 2033. Each entry carries year, cbsNominal, ibsUfNominal, ibsMunNominal, ibsTotalNominal, totalNominal, icmsIssReductionPct, phase, isTestYear and legalBasis, all rates in percent. Returned only when cClassTrib is omitted.",
"type": "object"
}
},
"required": [
"success"
],
"type": "object"
}
}
]
}Verify it yourself
curl -s https://api.teppi.xyz/v1/evidence/sha256:4fe6826bf141e0c1c9fe90acab6269fa0ae5c3c75b9d65c1ae1dc9f7d57168aa | sha256sum