Skip to main content
Glama

Enviar Carta de Correção (CC-e)

evento_carta_correcao

Envia Carta de Correção (CC-e) para uma NF-e ou CT-e já autorizada (evento tipo 2). Não pode corrigir: valores, datas de emissão/saída, partes envolvidas (CNPJ/CPF), regimes tributários ou número/série do documento. Limite: 20 CC-e por NF-e.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ChaveNFYesChave de acesso de 44 dígitos da NF-e ou CT-e a corrigir.
CorrecaoNoTexto da correção (mínimo 15, máximo 1000 caracteres). Obrigatório para NF-e (modelo 55). Não pode corrigir variáveis que afetam tributos (valores, quantidades, base de cálculo, alíquotas) nem dados de remetente/destinatário, nem data de emissão. Para CT-e use a lista Correcoes em vez deste campo.
CorrecoesNoLista de correções estruturadas (campo, grupo, valor). Usado SOMENTE para CT-e (modelo 57). Para NF-e/NFC-e use o campo Correcao acima.
TipoAmbienteYesAmbiente do documento original (DEVE bater com o ambiente onde a nota foi emitida). IMPORTANTE: passe explicitamente. Se a nota foi emitida em homologação, use 2. Valores: 1 - Produção; 2 - Homologação
NumeroSequencialNoNúmero sequencial do evento (1 a 20). Se omitido, o sistema usa o próximo disponível.

Output Schema

TableJSON 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
DsAmbienteNo
NuProtocoloNo
NumeroSequencialNo
CodStatusRespostaSefazNo

TDQS

A3.7/5.0
Behavior3/5

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

The description adds the constraint that CC-e cannot correct certain fields and a limit of 20. Annotations only provide openWorldHint, no safety hints. The description implies a write operation but does not disclose required permissions or reversibility. Moderate extra value.

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 concise sentences that front-load the action and then list constraints. No unnecessary words. Highly efficient.

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?

The description covers purpose and constraints but does not mention the dual correction modes (string for NF-e vs list for CT-e) which are important for correct usage. Given the complexity and presence of an output schema, the description is adequate but could be more complete.

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% with detailed parameter descriptions. The tool description does not add additional parameter-level information; it only restates constraints that are already in the schema. Baseline score of 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?

The description clearly states the action (Envia Carta de Correção) and the target documents (NF-e or CT-e authorized). It specifies it is for event type 2, which differentiates from other event tools like cancelar or inutilizar, though not explicitly.

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?

Describes what cannot be corrected (values, dates, parties, tax regimes, document numbers) which guides when not to use. Mentions a limit of 20 CC-e per NF-e. Does not explicitly recommend alternative tools but the constraints help the agent decide.

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.

TDQS

A3.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose, with thorough descriptions that clarify overlaps (e.g., cliente_consultar vs cadastro_consultar). Even similar operations like arquivo_baixar variants have explicit scope differences.

Naming Consistency4/5

Most tools follow a noun_verb pattern (e.g., cliente_consultar, evento_cancelar, produto_criar), but a few deviate (e.g., 'health', 'cte_desacordo'). Overall consistent enough for easy recognition.

Tool Count4/5

34 tools is high but justified given the complexity of fiscal document management across multiple document types (NF-e, NFS-e, CT-e, MDF-e, etc.) and required CRUD, events, and auxiliary operations.

Completeness4/5

The tool set covers create/read/update/delete for clients, products, and tax rules, plus emission, cancellation, correction, and status checks for various documents. Minor gaps like dedicated NFS-e cancellation are handled by generic event tools.