Skip to main content
Glama

Arquivix Notas · NFS-e

cte_cancel

DestructiveIdempotent

Cancel an authorized CT-e at the SVRS (event 110111). It cannot be undone. Justification of 15 to 255 characters. The event starts as pending and its final status shows on the CT-e. Without confirm: true it changes nothing and returns a preview; with confirm: true it runs.

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": {
      "cte_id": "<cte_id>",
      "justification": "<justification>"
    },
    "name": "cte_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
cte_idYesUUID of the CT-e
confirmNotrue runs the action. Without it nothing changes and only a preview is returned.
justificationYesMotivo do cancelamento, de 15 a 255 caracteres.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4/5.0
Behavior5/5

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

Beyond annotations that already flag destructive and idempotent, the description adds that the action cannot be undone, that the event starts as pending with final status reflected on the CT-e, and how confirm:true versus absent confirm switches between preview and execution. Those are meaningful behavioral facts the annotations do not convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and resource, and each sentence carries useful information about irreversibility, length limits, pending status and the confirm gate. Minor redundancy with the schema's own justification and confirm descriptions keeps it from being maximally tight.

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

Completeness5/5

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

For a destructive, asynchronous operation with no output schema, the description covers the essentials: irreversibility, the confirmation gate, and where the outcome appears (final status on the CT-e). An agent can call this correctly and knows how to verify the result.

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 coverage is 100%, so the schema already documents cte_id, justification (15-255) and the confirm preview gate. The description restates the justification length and the confirm semantics rather than adding format, encoding or edge-case detail beyond the schema.

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 ('Cancel an authorized CT-e') plus the system and event code (SVRS, event 110111), which is far more specific than a generic cancel. It stops short of naming the siblings it differs from (e.g., cte_discard or cte_correct), so an agent must infer the boundary from the word 'authorized'.

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 precondition 'authorized CT-e' implies when the tool applies, and the confirm gate is described. However, there is no explicit statement of when to use this versus cte_discard or cte_correct, nor what to do if the CT-e is not yet authorized.

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