Brazil Tax & Payroll Engine (x402)
v2.7.1Simples Nacional (Fator R), progressive INSS/IRRF, FGTS & B2B NFS-e tax engine via x402 Base USDC.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
calculate_simples_nacional_das Estimate the monthly Simples Nacional DAS, bracket and effective rate
Computes the monthly DAS of a Brazilian Simples Nacional company from its revenue of the last 12 months (RBT12) and the month's revenue: it picks the bracket of the chosen anexo, applies the fixed deduction to get the effective rate, and, when you send the 12-month payroll, applies the 28% Fator R rule that moves service companies between Anexo III and Anexo V. It also flags the BRL 3.6 million sublimit and the BRL 4.8 million ceiling. Use it for monthly tax provisioning, pricing a service, or deciding whether raising pro-labore to reach Fator R pays off. Do not use it for Lucro Presumido or L…
| Parameter | Type | Description |
|---|---|---|
monthlyRevenue * | number | Revenue of the month being assessed, in BRL. The DAS is this amount times the effective rate. |
rbt12 * | number | Gross revenue of the 12 months before the assessed month, in BRL, for example 720000. Selects the bracket; above 4800000 the company is outside the Simples and 'alert' says so. |
aiSummary | boolean | When true (the default) the response carries 'aiExecutiveBrief', one Portuguese sentence of at most 35 words with the key amounts, written by an edge model with a deterministic fallback. Set false to… |
anexo | string | Anexo of the activity: I commerce, II industry, III and V services, IV construction, cleaning and security. 'auto' (default) chooses between III and V by Fator R, falling back to V without payroll12m. |
payroll12m | number | Total payroll of the last 12 months, in BRL, including pro-labore and INSS employer charges. Needed for the Fator R; when given it decides between III and V even if anexo says otherwise. |
calculate_payroll_net_salary Calculate INSS, IRRF, net salary and employer FGTS for one salary
Calculates the monthly payroll deductions of one Brazilian salary or pro-labore under the 2025-2026 tables: progressive employee INSS up to the ceiling, IRRF choosing automatically whichever of the legal deductions or the BRL 607.20 simplified discount is cheaper, the resulting net salary and the employer's 8% FGTS deposit. Use it to show an employee or candidate their take-home pay, to compare CLT with pro-labore, or to check a payslip. Do not use it for 13th salary, vacation pay, termination amounts, overtime or benefits, which are not modelled, or for the employer's own 20% INSS and third-p…
| Parameter | Type | Description |
|---|---|---|
grossSalary * | number | Monthly gross salary or pro-labore, in BRL, for example 6500. |
aiSummary | boolean | When true (the default) the response carries 'aiExecutiveBrief', one Portuguese sentence of at most 35 words with the key amounts, written by an edge model with a deterministic fallback. Set false to… |
dependents | integer | Number of IRRF dependents; each deducts BRL 189.59 from the tax base. |
isProLabore | boolean | True for a partner's pro-labore: INSS becomes a flat 11% capped at the ceiling and no FGTS is due. |
otherDeductions | number | Other legal monthly deductions in BRL, such as court-ordered alimony. |
calculate_nfse_withholdings Calculate IRRF, CSRF (PIS/COFINS/CSLL), INSS and ISS withheld on a B2B service invoice
Calculates the taxes a Brazilian company must withhold when paying a B2B service invoice (NFS-e): IRRF at 1.5% or 1%, CSRF at 4.65% split into PIS, COFINS and CSLL, INSS at 11% on labour-supply services, and ISS when the buyer retains it, applying the BRL 10.00 minimum waivers and exempting Simples Nacional providers from the federal withholdings; it returns the net amount to transfer. Use it in accounts payable before paying a supplier, or on the provider side to predict what will reach the bank. Do not use it for goods (NF-e), for payments to individuals, or to decide the municipality's ISS…
| Parameter | Type | Description |
|---|---|---|
invoiceAmount * | number | Gross amount of the service invoice, in BRL, for example 15000. |
aiSummary | boolean | When true (the default) the response carries 'aiExecutiveBrief', one Portuguese sentence of at most 35 words with the key amounts, written by an edge model with a deterministic fallback. Set false to… |
isSimplesNacional | boolean | True when the provider is a Simples Nacional company, which removes IRRF, CSRF and INSS withholding. |
issRatePct | number | Municipal ISS rate in percent, between 2 and 5 by law; values above 5 are capped at 5. Used only when retainIss is true. |
retainIss | boolean | True when the buyer withholds ISS at source, as many municipalities require for out-of-town providers. |
serviceType | string | 'consultoria_ti_contabil' (default) for professional, IT and accounting services: IRRF 1.5% + CSRF 4.65%. 'limpeza_vigilancia' for cleaning, security and labour supply: IRRF 1% + CSRF 4.65% + INSS 11%… |