Skip to main content
Glama

Brazil Tax & Payroll Engine (x402)

br_tax_payroll_calc

Deterministic Brazilian tax & payroll calculator: Simples Nacional (Anexos I-V + Fator R), progressive INSS/IRRF, FGTS, and B2B NFS-e withholdings (0.008 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_tax_payroll_calc"
  }
}

Input Schema

NameRequiredDescriptionDefault
payrollNoCalculate progressive INSS, IRRF (comparing legal deductions vs simplified discount), net salary, and employer FGTS.
simplesNoCalculate Brazilian Simples Nacional effective tax rate, DAS amount, and Fator R (28% payroll ratio optimization).
aiSummaryNoGenerate an executive Brazilian tax & payroll brief via Cloudflare Workers AI (default: true).
nfseRetentionNoCalculate B2B Brazilian service invoice withholdings (IRRF 1.5%, CSRF/PCC 4.65%, ISS, INSS 11%) and net payable.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description still discloses two traits an agent would otherwise not know: outputs are deterministic arithmetic rather than model-inferred, and each call carries a concrete cost (0.008 USDC via x402 on Base), which implies a payment step an agent must be prepared for. It stops short of the mechanics that would make this fully actionable for a paid tool: whether payment is required on every invocation, what happens if the x402 settlement fails, and whether the 'deterministic' guarantee holds when aiSummary defaults to true and invokes Cloudflare Workers AI.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence: the identity of the tool comes first, then the supported tax regimes, with the price detail held in a short parenthetical. Nothing is wasted, though the parenthetical mixing a pricing constant into an otherwise computational summary makes the sentence denser than it needs to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with three nested calculation branches and no output schema, the description never indicates what comes back — no mention of returned breakdown fields, currency/formatting of results, or whether passing multiple nested objects returns multiple result blocks. The payment and cost behavior is stated but the response contract, which the missing output schema would otherwise cover, is left entirely unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and every nested object carries its own description, so the schema already carries the parameter burden and a 3 baseline applies. The description adds only domain framing — it names Fator R and Anexos I-V and reveals the pricing constant — but adds no unit conventions, ranges, or guidance on how dependents, otherDeductions, or isProLabore change the computation beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Deterministic ... calculator') plus the resource domain (Brazilian tax & payroll) and enumerates the exact computation families — Simples Nacional with Anexos I-V and Fator R, progressive INSS/IRRF, FGTS, and NFS-e withholdings — which map one-to-one onto the three nested input objects. An agent can tell what it computes and which parameters activate which calculation without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: listing the three tax domains suggests that supplying the corresponding nested object triggers that calculation, and the word 'Deterministic' hints this is the authoritative path for exact figures rather than an LLM estimate. However, there is no explicit when-to-use/when-not guidance, no statement about whether several nested objects may be combined in one call, and no mention of prerequisites for the x402 payment step.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.