Skip to main content
Glama

base_calculo_unificada

Calculates unified tax bases (baseRG, baseIS, baseSN) for NF-e/NFC-e documents and flags input fields ignored by the selected tax year.

Instructions

Base de cálculo unificada da NF-e (55) / NFC-e (65): devolve baseRG, baseIS, baseSN e avisos de campos ignorados pela vigência do ano informado.

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": {
      "anoFatoGerador": "<anoFatoGerador>",
      "tipoDocumento": "<tipoDocumento>",
      "natureza": "<natureza>"
    },
    "name": "base_calculo_unificada"
  }
}

Input Schema

NameRequiredDescriptionDefault
vISNo
vFCPNo
vPISNo
vSegNo
vDescNo
vICMSNo
vProdNo
vFreteNo
vOutroNo
vCOFINSNo
naturezaYes
tipoDocumentoYes
anoFatoGeradorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two real behaviors: the three returned bases (baseRG, baseIS, baseSN) and that fields ignored under the informed year's validity are reported as warnings. It says nothing about permissions, error conditions, or whether missing optional values default to zero, which matters for a 13-parameter tax calculation.

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 stating the resource, the applicable document types, the return values, and the warning behavior. It is dense but well ordered, with no filler.

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

Completeness2/5

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

For a tool with 13 parameters, no annotations, and no output schema, the definition is thin: it names the outputs but documents none of the inputs beyond their existence. An agent would have to guess which monetary fields are relevant for a given nature (bem vs. servico) and year.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate, and it largely does not. Ten optional monetary parameters (vIS, vFCP, vPIS, vSeg, vDesc, vICMS, vProd, vFrete, vOutro, vCOFINS) are never explained, and the required anoFatoGerador/natureza semantics are only hinted at via the year-validity warning.

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

Purpose4/5

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

The description names the resource precisely ('base de cálculo unificada') and scopes it to NF-e (55) / NFC-e (65), so an agent knows this produces calculation bases rather than the tax amounts themselves. It stops short of naming a sibling such as calcular_tributos to contrast against, so differentiation is inferred rather than stated.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no alternative is mentioned. The document-type scope implies a context, but an agent cannot tell from this text whether to call this before, instead of, or after calcular_tributos or gerar_xml.

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