Skip to main content
Glama

Arquivix Notas · NFS-e

cte_resubmit

Destructive

Correct a rejected CT-e and send it again with the whole new body (same number, new key). In live it uses 1 credit again. Only for status rejected. 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>",
      "company_id": "<company_id>",
      "cte": "<cte>"
    },
    "name": "cte_resubmit"
  }
}

Input Schema

NameRequiredDescriptionDefault
cteYesThe CT-e as in POST /v1/cte (camelCase, without companyId): cfop, natOp, start/end {cityCode (IBGE, 7 digits), city, state}, sender, recipient, shipper?, receiver? {taxId, stateRegistration?, name, tradeName?, phone?, email?, address{street, number, complement?, district, zip?, cityCode, city, state}}, taker {role: sender|shipper|receiver|recipient|other, party? (required for other)}, values {total, receivable?, components[] {name, amount}}, icms {cst: 00|20|40|41|51|60|90|outra_uf|sn, base?, rate?, amount?, reduction?, credit?}, cargo {value, product, otherFeatures?, measures[] {unit 00-05, type, quantity}}, nfeKeys[] (44 digits, 1 to 2000), rntrc (8 digits or ISENTO), observations?, externalId?. Amounts are decimal strings ("150.00"). The customer informs CFOP and the ICMS (CST, base and rate): Arquivix Notas does not choose them.
cte_idYesUUID of the rejected CT-e
confirmNotrue runs the action. Without it nothing changes and only a preview is returned.
company_idYesThe same carrier of the CT-e

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 this as destructive, non-idempotent and non-read-only; the description adds context those annotations cannot convey, namely that live use costs 1 credit again and that the CT-e keeps its number but gets a new access key. The dry-run semantics of confirm are also spelled out, though what the preview actually returns is not described.

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, no filler, with the core action and its state restriction front-loaded and the credit and confirmation caveats following in priority order. Every clause carries operational information.

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, credit-consuming mutation with no output schema, the definition covers the important guardrails: status restriction, dry-run default, cost, and key behavior. Minor gaps remain around the preview payload and failure modes when the status is not rejected.

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 description coverage is 100%, so the baseline is 3, but the description adds real meaning by framing the cte object as a full replacement body ('the whole new body') rather than a patch, and by tying confirm to the preview/execute switch. The 1-credit cost note also gives the agent a reason to prefer preview first.

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 opens with a specific verb and resource ('Correct a rejected CT-e and send it again') and adds concrete scope ('same number, new key'), which tells an agent this is a resubmission rather than a plain edit. It does not explicitly contrast with the sibling cte_correct, so the distinction has to be inferred from the 'rejected' qualifier.

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 an explicit precondition ('Only for status rejected') and explains the two-mode invocation: without confirm it only previews, with confirm it executes. What it lacks is a direct pointer to the alternative for non-rejected CT-es (e.g. cte_correct), so the agent must reason from the status rule alone.

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