Skip to main content
Glama

calculate_ibs_cbs

Read-onlyIdempotent

Simulate IBS/CBS per item and in total. Issues nothing.

Not a fiscal document: say so to the user. Rates left out use the official 2026 ones in 2026; outside 2026 they are required.

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": {
      "items": "<items>",
      "operation_date": "<operation_date>"
    },
    "name": "calculate_ibs_cbs"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesThe items.
rate_cityNopIBSMun, %.
rate_stateNopIBSUF, %.
rate_federalNopCBS, %.
document_typeNoModel the cClassTrib is checked for; amounts are the NF-e's.nfe
operation_dateYesYYYY-MM-DD; picks vigência and rates.

Output Schema

NameRequiredDescriptionDefault
itemsNo
totalNo
noticeNo
simulatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, and the description still adds real behavior: nothing is issued, the result is explicitly not a fiscal document and the user must be told so, plus the year-dependent rate defaulting rule. It omits any mention of error conditions or how totals are aggregated.

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?

Three short sentences with no filler and the core constraint front-loaded. The rate sentence is telegraphic and slightly awkward ("the official 2026 ones in 2026"), but nothing is redundant.

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

Completeness5/5

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

An output schema exists, so return values need no explanation, and the input schema fully documents the six parameters. Given a read-only simulation tool, the description covers the two things the structured fields can't say: no document is issued and the omitted-rate fallback rule.

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%, so the baseline is 3. The description does add one genuinely new rule not in the schema — rates omitted fall back to official 2026 rates, and outside 2026 they become required — but the other five parameters (items, document_type, operation_date) get no added meaning beyond the schema.

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?

States a specific verb and resource ("Simulate IBS/CBS per item and in total") and immediately contrasts with the issuance siblings via "Issues nothing." An agent can distinguish this from issue_invoice without opening a schema, though the abbreviation IBS/CBS is never expanded.

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: "Issues nothing" and "Not a fiscal document" signal this is a simulation path rather than an issuance path, but there is no explicit when-to-use or when-to-prefer-an-alternative statement. It also doesn't say what to do when the caller actually needs a fiscal document.

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.