Skip to main content
Glama

br__submit_cte

Submit signed CT-e XML to SEFAZ for authorization via synchronous CTeRecepcaoSincV4. Compresses and base64-encodes payload automatically. Requires endpoint override and confirmation for production submissions.

Instructions

Submete um CT-e assinado à autorização SEFAZ (CTeRecepcaoSincV4, síncrono).

O payload é automaticamente compactado em GZip e codificado em Base64 antes do envio, conforme exigido pelo MOC CT-e §3.4.1 [Verified locally].

Submissão para SEFAZ é uma operação irreversível em produção e exige confirmação em duas etapas (ConfirmationGate). Define BR_CTE_READ_ONLY=1 para desabilitar esta ferramenta. Nenhuma URL de endpoint CT-e está embutida/verificada nesta versão — endpoint_override é obrigatório.

Retorna protCTe (incluindo nProt, o protocolo de autorização) em caso de sucesso, ou error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
c_ufYesCódigo IBGE da UF do autorizador (cUF), 2 dígitos
tp_ambNoIdentificação do Ambiente (tpAmb): '1' = produção, '2' = homologação2
cert_pathYesCaminho local para o certificado ICP-Brasil A1 (.p12/.pfx)
xml_base64NoXML CT-e assinado, codificado em base64.
xml_contentNoXML CT-e assinado (saída de br__sign_cte). Informe xml_content ou xml_base64.
cert_passwordNoSenha do certificado A1, se houver
endpoint_overrideYesURL completa do webservice CTeRecepcaoSincV4 — obrigatório, ver docstring do módulo.
confirmation_tokenNoToken de confirmação obtido de uma chamada anterior pendente.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries full burden. It discloses automatic GZip + Base64 encoding, irreversible operation, two-step confirmation gate, absence of embedded endpoint URLs, and return format (protCTe or error). This is comprehensive.

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?

The description is fairly long but each sentence provides necessary information. It is well-structured: purpose, encoding details, irreversibility, confirmation gate, return value. Could be slightly more concise but not wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema (not shown), the description does not need to explain return values in full detail, but it mentions key parts (protCTe, nProt). For a tool with 8 parameters (3 required), it covers encoding, mandatory endpoint, confirmation process, and necessary context (e.g., no embedded endpoint). Complete.

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 every parameter has a description. The description adds context: xml_content is the output of br__sign_cte, endpoint_override is mandatory, and encoding details. It adds value beyond schema, especially clarifying the relationship between xml_content and xml_base64.

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?

The description clearly states the verb 'Submete um CT-e assinado' and the resource 'à autorização SEFAZ', specifying the operation as 'CTeRecepcaoSincV4, síncrono'. It distinguishes itself from siblings (e.g., br__submit_nfe, br__submit_nfse) by focusing on CT-e submission.

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 description provides when to use: after signing CT-e (from br__sign_cte). It mentions that submission is irreversible in production, requires two-step confirmation, and that endpoint_override is mandatory. It also gives a way to disable the tool. However, it does not explicitly mention when not to use it vs alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cmendezs/mcp-nfe-br'

If you have feedback or need assistance with the MCP directory API, please join our Discord server