Skip to main content
Glama

Cancelar nota de produto

cancelar_nota_produto
Destructive

Cancela uma NF-e ou NFC-e autorizada. Efeito fiscal que não se desfaz: chame só com pedido explícito do usuário, com a justificativa dele (15 a 255 caracteres) e confirmar=true. O prazo é o da legislação; fora dele a SEFAZ recusa. O crédito da emissão não volta.

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": {
      "tipo": "<tipo>",
      "id": "<id>",
      "justificativa": "<justificativa>",
      "confirmar": "<confirmar>"
    },
    "name": "cancelar_nota_produto"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
tipoYes
confirmarYes
justificativaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint=true, idempotentHint=false) by disclosing that the fiscal effect is irreversible, that emission credit is not restored, and that SEFAZ rejects cancellations past the legal deadline. These are the consequences an agent needs before invoking an irreversible write.

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?

Four dense sentences, each carrying a distinct constraint — scope, authorization gate, deadline, and financial consequence — with the irreversibility warning front-loaded. No filler.

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 an irreversible open-world mutation with no output schema, the description covers the critical risks and preconditions. It stops short of saying what a successful or rejected cancellation returns, but that is a minor gap given the schema already enforces the confirmation flag.

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 0%, and the description only explains justificativa (15-255 chars, must be the user's own wording) and confirmar=true. The 'id' format and the 'tipo' enum choice (nfe vs nfce) are left entirely to the schema, so it only partly compensates for the coverage gap.

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 (cancelar) and a specific resource (NF-e/NFC-e already authorized), and the qualifier 'autorizada' narrows the scope meaningfully. It does not explicitly contrast itself with the sibling cancelar_nota, so an agent must rely on the tool name to know this is the product-note variant.

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?

Gives an explicit usage gate: only call with an explicit user request, using the user's own justification, and with confirmar=true. It does not name an alternative tool or state when-not-to-use in favor of a sibling, which keeps it from 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