Skip to main content
Glama
nota-fiscal-mcp

nota-fiscal-mcp

by FAVIOSENGER

cancelar_nfe

Cancel an authorized Brazilian NF-e within 24 hours of issuance by providing a mandatory justification of at least 15 characters.

Instructions

Cancela uma NF-e autorizada (permitido ate 24h apos a emissao). A justificativa e obrigatoria e deve ter no minimo 15 caracteres.

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": {
      "ref": "<ref>",
      "justificativa": "<justificativa>"
    },
    "name": "cancelar_nfe"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesA ref da nota a cancelar.
justificativaYesMotivo do cancelamento (minimo 15 caracteres).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose two valuable traits — the 24h post-issuance limit and the mandatory justification — but for a destructive mutation it says nothing about irreversibility, required authorization, what happens to the document after cancellation, or what the response contains.

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 compact sentences with zero filler, and the most decision-relevant constraint (the 24h window) is front-loaded. Nothing in it could be removed without losing information.

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

Completeness3/5

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

For a simple two-parameter mutation with full schema coverage and no output schema, the basics are covered. Still missing is any statement of whether cancellation is final, what the caller receives back (protocol/status), or what to do when the 24h limit has passed, leaving real gaps for a destructive operation.

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%, including the 15-character minLength on justificativa and a description for ref. The description merely restates the 15-character rule already enforced in the schema, adding no syntax, format, or content guidance beyond it. Baseline 3 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?

States a specific verb and resource: 'Cancela uma NF-e autorizada' — cancel an already-authorized NF-e. This is clearly distinct in resource type from siblings like cancelar_nfse and emitir_nfe, but the description never names or explicitly contrasts any alternative, so it lands at clear-but-undifferentiated.

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?

The 24-hour-after-issuance window is an implicit usage constraint (you cannot cancel outside it), which is genuinely helpful. However, nothing addresses when to prefer this over cancelar_nfse or what to do if the note is outside the window — no alternatives or exclusions are stated.

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