Skip to main content
Glama

Kalvi — NFS-e e IBS/CBS

Descobrir o CST e o cClassTrib de um serviço

classificar_servico

A partir do item da LC 116 (ou do código de tributação nacional), do regime do prestador, do município e da data de competência, devolve os candidatos de CST e cClassTrib com justificativa, alíquotas vigentes e a fonte oficial de cada regra. Use quando a pergunta for 'qual código eu uso neste serviço'.

Input Schema

NameRequiredDescriptionDefault
nbs_codeNoNBS, quando houver.
tax_regimeYes
service_codeYesItem da LC 116 ("04.01") ou cTribNac de 6 dígitos ("040101").
competence_dateYesAAAA-MM-DD.
operation_natureNo
municipality_codeYesCódigo IBGE de 7 dígitos.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does meaningful work: it discloses that the result is a set of candidates (not a single deterministic answer) accompanied by justification, current rates and the official source of each rule. It does not say what happens when nothing matches (empty result vs. error) or note any auth prerequisites, which is a read-only lookup so risk is low.

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

Conciseness5/5

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

Two dense sentences: inputs first, outputs second, usage trigger last. No filler, no repetition of the tool name, and the key classification constraint is front-loaded.

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 6-parameter, annotation-free tool with no output schema, the description substitutes well by describing the return payload (candidates, justification, rates, sources). Remaining gaps are the unmentioned optional parameters and the no-match behavior, but the core call is fully specified.

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 coverage is 67% and the description reinforces the meaning of service_code (accepts either "04.01" or a 6-digit cTribNac). However, nbs_code and operation_nature are absent from both the description and the schema, and the enum parameters (tax_regime, operation_nature) have no explanation of their effect on classification.

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+resource: given the LC 116 item (or national tax code), regime, municipality and competence date, it returns CST/cClassTrib candidates. The enumerated inputs and outputs make the function unambiguous. It does not explicitly differentiate from siblings (validar_nfse, explicar_rejeicao), though the tasks are plainly distinct.

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

Usage Guidelines4/5

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

The closing sentence gives an explicit trigger: use it when the question is 'which code do I use for this service'. That is a clear usage context, but no when-not-to-use guidance or prerequisite/alternative routing is offered.

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.

Resources