Skip to main content
Glama

Arquivix Notas · NFS-e

cte_correct

Destructive

Sends a correction letter (CC-e, event 110110) for an authorized CT-e: 1 to 20 fields, each {group (grupoAlterado, e.g. "compl"), field (campoAlterado, e.g. "xObs"), value, item? (for repeated groups)}. It cannot change the values, the taxes, the issuer, taker, sender or recipient, or the date (art. 58-B of the Convênio SINIEF 06/89). 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>",
      "corrections": "<corrections>"
    },
    "name": "cte_correct"
  }
}

Input Schema

NameRequiredDescriptionDefault
cte_idYesUUID of the CT-e
confirmNotrue runs the action. Without it nothing changes and only a preview is returned.
correctionsYesCampos a corrigir, de 1 a 20.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, readOnlyHint=false and idempotentHint=false, yet the description still adds real value: the dry-run gate ('Without confirm: true it changes nothing and returns a preview'), the pending lifecycle state, and the legal change restrictions. The one notable omission is duplicate-call behavior, which matters given idempotentHint=false.

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?

Front-loaded with the action and event code, then payload shape, then restrictions, then the confirm gate — four dense sentences with no filler. Every clause carries information an agent needs before calling.

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?

With no output schema, the description usefully compensates by describing the preview-vs-execute split and the pending-then-final status on the CT-e. It could still say more about failure modes (unauthorized CT-e, duplicate events), but it is sufficient to call the tool correctly.

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 100%, so the baseline is 3; the description goes slightly beyond by tying the payload to domain semantics (grupoAlterado/campoAlterado, item only for repeated groups) and by explaining what confirm actually gates. The phrasing 'It cannot change the values' is slightly ambiguous against the fact that each correction does carry a new value.

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 — 'Sends a correction letter (CC-e, event 110110) for an authorized CT-e' — plus the exact payload shape (1 to 20 field corrections). This clearly separates it from issuance, but it never explicitly contrasts with siblings like cte_cancel or cte_discard, leaving the agent to infer the boundary.

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?

It states a strong precondition ('authorized CT-e') and an explicit exclusion list (values, taxes, issuer, taker, sender, recipient, date, citing art. 58-B), which tells the agent when this tool will fail. It stops short of naming alternatives for the excluded cases (e.g. which sibling to use for cancellation or re-issuance).

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