Skip to main content
Glama

Cancelar uma nota

cancelar_nota
Destructive

Cancela uma NFS-e autorizada na SEFIN. Exige confirmar=true — peça confirmação explícita ao usuário antes. O crédito da emissão NÃO volta (a nota existiu); o cancelamento é grátis.

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": {
      "nota_id": "<nota_id>",
      "motivo": "<motivo>",
      "confirmar": "<confirmar>"
    },
    "name": "cancelar_nota"
  }
}

Input Schema

NameRequiredDescriptionDefault
motivoYesMotivo em texto (vai para a SEFIN).
nota_idYes
confirmarYesPrecisa ser true — confirmação do usuário nesta conversa.
codigo_motivoNo1=erro na emissão · 2=serviço não prestado · 4=duplicidade.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag it as destructive and non-idempotent, but the description adds critical context beyond them: the emission credit is NOT refunded even though cancellation is free, and confirmation must be obtained explicitly from the user. These are high-value behavioral details an agent cannot infer from annotations alone.

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 short sentences, front-loaded with the action, followed by the confirmation requirement and credit/cost implications. Every sentence earns its place with no redundancy.

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 a destructive mutation with no output schema, the description covers the essential behavior: what is cancelled, the confirmation gate, credit non-refund, and cost. It could mention irreversibility or post-cancellation state explicitly, but annotations and schema fill most gaps.

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 75%, with motivo, confirmar, and codigo_motivo already documented. The description adds meaning for 'confirmar' (must be true, requires explicit user confirmation in this conversation) and clarifies that motivo goes to SEFIN, which goes beyond the raw schema.

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?

States a specific verb and resource: 'Cancela uma NFS-e autorizada na SEFIN'. This is immediately distinguishable from siblings like emitir_nota or consultar_nota. No ambiguity about what the tool does.

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?

Clearly says to use it for cancelling an authorized NFS-e and mandates explicit user confirmation before calling. It doesn't name alternative tools (e.g., consultar_nota to verify status first), but the context and prerequisite are clear.

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