Skip to main content
Glama

cancelar_nfe

Cancel an authorized Brazilian electronic invoice (NF-e) within 24 hours of issuance by providing a justification.

Instructions

Cancela uma NF-e autorizada (deve ser feito em até 24h após a autorização)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID da NF-e na Nuvem Fiscal
justificativaYesMotivo do cancelamento (mínimo 15 caracteres)
Behavior2/5

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

With no annotations provided, the description carries the full burden. It discloses the 24-hour regulatory window, but it does not mention potential side effects (e.g., contacting SEFAZ, irreversibility, or error behavior if the deadline is missed). For a destructive/mutation operation, this is a significant 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?

The description is a single, front-loaded sentence that immediately states the action and the critical constraint. There is no redundant wording or filler, so every word earns its place.

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?

This is a write/state-changing operation with no annotations, no output schema, and only a terse description. It lacks information about expected outcomes, failure modes, or preconditions beyond the 24-hour rule. The simple schema (2 params) reduces complexity, but the description still leaves important operational context unexplored.

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?

The input schema already provides 100% coverage with clear descriptions for both parameters ('ID da NF-e na Nuvem Fiscal' and 'Motivo do cancelamento (mínimo 15 caracteres)'). The description adds no additional parameter-specific meaning beyond what the schema states, so the baseline score of 3 applies.

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

Purpose5/5

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

The description clearly states the action ('Cancela uma NF-e autorizada') and specifies the target resource (NF-e) plus the status (authorized). It also adds a key condition (within 24 hours), which helps distinguish it from sibling tools like inutilizar_nfe and cancelar_nfse.

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?

It provides a clear temporal condition ('dentro de 24h após a autorização') that tells the agent when cancellation is valid. However, it does not explicitly mention alternatives or exclusions, such as 'use inutilizar_nfe if the NF-e is not authorized' or 'for NFSe, use cancelar_nfse'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rodrigo-do-carmo/mcp-nota-fiscal'

If you have feedback or need assistance with the MCP directory API, please join our Discord server