Skip to main content
Glama

Kalvi — NFS-e e IBS/CBS

Explicar um código de rejeição da NFS-e

explicar_rejeicao

Recebe um código de rejeição da NFS-e nacional (E0958, E0855, E0959...) e devolve o texto oficial da regra, o campo do XML a que ela se refere e se o efeito é recusar a nota. Use quando a pergunta for 'o que significa este erro'.

Input Schema

NameRequiredDescriptionDefault
codigoYesO código, como veio na recusa. Ex.: "E0958".

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 disclose the return content (rule text, XML field, rejection effect), which effectively signals a read-only lookup. It does not say what happens for an unrecognized code or whether partial matches are resolved, which is the main residual gap.

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 sentences, zero waste: the return contract comes first, the usage trigger second. Nothing is repeated or padded.

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?

Since there is no output schema, the description properly enumerates the returned fields, which is the critical information here. Minor omission: behavior on an unknown or malformed rejection code is not covered.

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 100% and the single parameter already carries its own description and example ("E0958"). The description only re-states the example codes with an ellipsis, adding no format or normalization guidance beyond the schema, so the 3 baseline applies.

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?

Specific verb pair (recebe / devolve) plus the exact resource (código de rejeição da NFS-e nacional), and it enumerates the three things returned: official rule text, XML field, and whether the effect is rejection. It is clearly a lookup-dictionary tool, distinguishable in spirit from validar_nfse, though it never names a sibling to contrast with.

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?

Explicit trigger: "Use quando a pergunta for 'o que significa este erro'." That cleanly separates diagnostic explanation from validation or classification work. No explicit 'do not use when' clause or named alternatives, so it stops short of a 5.

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