Skip to main content
Glama

Registrar desacordo de CT-e

cte_desacordo
Destructive

Registra desacordo do tomador com um CT-e recebido (evento tipo 4 do CT-e). Prazo: 45 dias da emissão.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cte_desacordo"
  }
}

Input Schema

NameRequiredDescriptionDefault
ChaveNo
ObservacaoNo
TipoAmbienteNoTipo do Documento Fiscal: Valores: 1 - Produção; 2 - Homologação
NumeroSequencialNoNúmero sequencial do evento

Output Schema

NameRequiredDescriptionDefault
ErrorNoMensagem de erro da operação. Vazia ("") quando foi bem-sucedida.
AvisosNoAvisos não bloqueantes. Pode vir preenchida mesmo em emissão bem-sucedida.
StatusNo1 - Evento Processado; 2 - Aguardando processamento do evento; 3 - Ocorreu um erro ao processar o evento
DsEventoNo
DsMotivoNo
Base64XmlNoXML do evento processado (procEventoNFe) em Base64. Preenchido quando o evento e autorizado (cStat 135) na Carta de Correcao da NF-e, na manifestacao do destinatario e no ECONF (NF-e e NFC-e). Nulo nos demais casos.
Base64FileNoPDF do documento auxiliar do evento (ex.: Carta de Correcao) em Base64. Preenchido apenas quando o evento e autorizado e a nota existe na base. Nulo nos demais casos.
DsAmbienteNo
NuProtocoloNo
NumeroSequencialNo
CodStatusRespostaSefazNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / Base64Xml / description
      Previous value: -"XML do evento processado (procEventoNFe) em Base64. Preenchido apenas quando o evento e autorizado (cStat 135) e o documento e NF-e (modelo 55). Nulo nos demais casos."New value: +"XML do evento processado (procEventoNFe) em Base64. Preenchido quando o evento e autorizado (cStat 135) na Carta de Correcao da NF-e, na manifestacao do destinatario e no ECONF (NF-e e NFC-e). Nulo nos demais casos."
  2. Changed2 schema fields changed
    • addedOutput schema / properties / Base64File
      Added value: +{
      +  "description": "PDF do documento auxiliar do evento (ex.: Carta de Correcao) em Base64. Preenchido apenas quando o evento e autorizado e a nota existe na base. Nulo nos demais casos.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / Base64Xml
      Added value: +{
      +  "description": "XML do evento processado (procEventoNFe) em Base64. Preenchido apenas quando o evento e autorizado (cStat 135) e o documento e NF-e (modelo 55). Nulo nos demais casos.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  3. Changed9 schema fields changed
    • changedInput schema / properties / Chave / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / NumeroSequencial / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / Observacao / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Avisos / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / DsAmbiente / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / DsEvento / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / DsMotivo / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Error / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / NuProtocolo / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  4. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, so the agent knows this is an irreversible open-world write. The description adds that it produces a formal fiscal event (type 4), but says nothing about certificate/authentication needs, whether the event can later be cancelled, or what the caller receives back.

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 the action front-loaded and the deadline following as a supporting constraint. Nothing redundant or padded.

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?

An output schema and rich annotations carry much of the burden, and the deadline is a useful addition. Still, for a destructive fiscal event with zero required parameters, the description leaves the agent guessing about key format, preconditions (received/authorized CT-e), and the effect of the registration.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only TipoAmbiente and NumeroSequencial carry schema descriptions (50% coverage); Chave and Observacao are undocumented in both places. The phrase "CT-e recebido" hints that Chave is the access key of the received CT-e, but the description never clarifies the key format, observacao content, or why NumeroSequencial matters, so it does not compensate 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?

The description names a specific verb and resource ("Registra desacordo do tomador com um CT-e recebido") and identifies it as fiscal event type 4, which pins down exactly what is being created. It implicitly separates itself from the NF-e manifestation siblings via the CT-e scope, though it never names an alternative tool outright.

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?

The 45-day-from-issuance deadline is concrete operational guidance telling the agent when this tool is still valid to invoke, information not present in the schema or annotations. It stops short of naming exclusions or alternative event tools, so guidance is clear context rather than full routing logic.

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.