Skip to main content
Glama
rtc-calculadora-mcp

rtc-calculadora-mcp

by tmoreiradev

calcular_tributos

Compute CBS, IBS (state and municipal) and Selective Tax for a tax operation with Brazil's official calculator. Returns base values, effective rates, per-item and total tax amounts plus error details.

Instructions

Calcula CBS, IBS (UF e municipio) e Imposto Seletivo de uma operacao com a calculadora oficial.

operacao segue o contrato de POST /regime-geral da calculadora: {"dhFatoGerador": "2027-03-10T10:00:00-03:00", "municipio": 4314902 (codigo IBGE), "uf": "RS", "itens": [{"numero": 1, "ncm": "10063021" (ou "nbs" para servicos), "cst": "200", "cClassTrib": "200003", "baseCalculo": 100.00, "quantidade": 20, "unidade": "KG", "aliquotasNominais": {"cbs": 8.8, "ibsEstadual": 0.05, "ibsMunicipal": 0.05}, "impostoSeletivo": {"cst": "000", "cClassTrib": "000001", "baseCalculo": 150.00, "quantidade": 12, "unidade": "LT", "impostoInformado": 15.00}}]} aliquotasNominais e proibido antes de 2027 e obrigatorio a partir de 2027 (valores em %). id e versao sao preenchidos se faltarem.

Por padrao (estrito=false) cada item e calculado de forma independente: itens com erro vem com estadoItem = INCONSISTENCIA_ENTRADA e a lista erros, e os totais somam so os itens calculados. Com estrito=true a operacao inteira falha no primeiro erro. Campos do resultado: vBC (base), pCBS/pIBSUF/pIBSMun (aliquotas %), gRed.pAliqEfet (aliquota efetiva apos reducao), vCBS, vIBSUF, vIBSMun, vIBS, e no grupo IS: vBCIS, pIS, vIS.

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": {
      "operacao": "<operacao>"
    },
    "name": "calcular_tributos"
  }
}

Input Schema

NameRequiredDescriptionDefault
estritoNo
operacaoYes
incluir_memoriaNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With zero annotations the description carries the full burden and does it well: it discloses the 2027 temporal rule (`aliquotasNominais` forbidden before 2027, mandatory after), that `id` and `versao` are auto-filled, and the two error regimes — per-item INCONSISTENCIA_ENTRADA with an `erros` list and partial totals in default mode, versus whole-operation failure on the first error with estrito=true. These are non-obvious behavioral traits an agent could not get from structured fields.

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?

The description is long but dense with low redundancy: purpose first, then the request contract, then temporal constraints, then error semantics, then result fields. The embedded JSON example earns its space by concretizing the nested contract, though its ragged inline formatting makes it harder to scan than a cleanly separated block.

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

Completeness4/5

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

For a complex nested-input computation tool with an output schema present, the description covers what the schema cannot: the request contract shape, the date-based rate rule, strict vs lenient error behavior, and the meaning of the result groups (vBC, pCBS/pIBSUF/pIBSMun, gRed.pAliqEfet, vIBS, IS group). The only meaningful omission is `incluir_memoria`, plus no note on upstream calculator availability or failure modes beyond item-level errors.

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

Parameters4/5

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

Schema description coverage is 0%, and the description compensates strongly for the nested `operacao` payload by spelling out every field of the request contract (dhFatoGerador, municipio as IBGE code, uf, itens with ncm/nbs, cst, cClassTrib, baseCalculo, quantidade, unidade, aliquotasNominais, impostoSeletivo) and explaining `estrito`. The notable gap is `incluir_memoria`, which is never mentioned in the description or the schema, leaving one of three parameters undocumented.

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?

The description opens with a specific verb and resource set: it calculates CBS, IBS (state and municipal) and Imposto Seletivo for an operation using the official calculator. That instantly distinguishes it from the consultar_*, validar_* and gerar_xml_* siblings, which query or validate rather than compute a full tax assessment.

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 only implied: the caller learns that it must supply a `operacao` following the POST /regime-geral contract, and that `estrito` toggles all-or-nothing failure. There is no explicit statement of when to prefer this tool over the taxonomy/rate lookup siblings (e.g. 'use this to compute an assessment; use consultar_* to find codes first'), so the routing decision is left to inference.

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