Skip to main content
Glama

Kalvi — NFS-e e IBS/CBS

Conferir uma NFS-e antes de transmitir

validar_nfse

Confere o XML da DPS (NFS-e do padrão nacional) contra as regras oficiais de IBS/CBS e devolve o que seria recusado, com o código oficial de rejeição e o campo do XML que causou. Use antes de transmitir. Nada da nota é guardado.

Input Schema

NameRequiredDescriptionDefault
xmlYesO XML da DPS, completo, como string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description does real work: it discloses dry-run semantics ('devolve o que seria recusado') and a no-persistence guarantee ('Nada da nota é guardado'), which tells the agent this is a side-effect-free operation. It omits whether all violations are returned or only the first, and says nothing about size limits or auth requirements.

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?

Three tight sentences: what it checks, what it returns, when to use it, and the no-storage guarantee. No filler, and the core action plus output shape are 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?

With one parameter, no annotations and no output schema, the description carries the disclosure burden well by describing the return payload (official rejection code plus offending XML field). The main remaining gap is what a passing validation returns and whether multiple errors surface at once.

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 coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema field text by clarifying that the XML is the DPS under the national standard ('padrão nacional'), distinguishing it from municipal NFS-e layouts. That is useful disambiguation for a single-parameter tool.

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: checks the DPS XML (national-standard NFS-e) against official IBS/CBS rules. The purpose is unambiguous and clearly a pre-transmission validation, but it never names or contrasts with the siblings classificar_servico and explicar_rejeicao, even though 'explicar_rejeicao' overlaps with its rejection-code output.

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?

'Use antes de transmitir' gives a clear trigger condition for when to call it. It does not state when NOT to use it or point to explicar_rejeicao for deeper explanation of a returned code, so the routing guidance is contextual but not complete.

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