Skip to main content
Glama

Arquivix Notas · NFS-e

cte_issue

DestructiveIdempotent

Issue a road CT-e (model 57, normal emission) for the carrier. In live it uses 1 credit (the test environment is free) and goes to the SVRS in the background: the answer is queued and the final status shows on the CT-e. A rejection gives the credit back and the rejected CT-e can be corrected and sent again. 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": {
      "company_id": "<company_id>",
      "cte": "<cte>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "cte_issue"
  }
}

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.
confirmNotrue runs the action. Without it nothing changes and only a preview is returned.
company_idYesUUID of the carrier (issuer)
idempotency_keyYesRepeat the same key to avoid issuing twice.

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?

Adds substantial behavior beyond the annotations: 1 credit charged in live (free in test), asynchronous SVRS processing where the response is queued and final status lands on the CT-e, credit refund on rejection, and the confirm-gated no-op preview. This complements the destructiveHint/idempotentHint/openWorldHint annotations well. What is missing is how the agent should later observe the queued result (poll via cte_get/cte_sync).

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-loads the operation, then cost, then async semantics, then the confirm contract — a sensible order with no filler. Sentences are dense and colon-heavy but each carries distinct information; minor cost is that the preview-vs-run contract appears twice (implied earlier and restated at the end).

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 mutation tool with no output schema, a large nested input, and async processing, the definition covers cost, idempotency intent, rejection/refund, resend, and the dry-run gate. It stops short of explaining what the preview payload or the queued response contains, and how status is later retrieved, which an agent calling an asynchronous issuer would benefit from.

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 description coverage is 100%, and the cte object's schema already documents field-by-field structure, decimal-string amounts, and the note that the customer supplies CFOP and ICMS. The description reinforces the confirm gate but adds no new field-level meaning, so the baseline 3 for a fully documented schema applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource with scope qualifiers: 'Issue a road CT-e (model 57, normal emission) for the carrier.' This pins down the document type, model, emission mode, and issuer, so an agent can distinguish it from nfse_issue or the cte_correct/cte_resubmit follow-up tools without opening a schema.

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?

Clearly frames the two modes of use (preview vs. confirm: true) and notes that a rejected CT-e can be corrected and resent, which implies the follow-up path. It does not name the sibling tools (cte_correct, cte_resubmit, cte_cancel) that implement those follow-ups, so routing guidance stops just short of explicit alternatives.

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