Skip to main content
Glama

Emitir MDF-e

mdfe_emitir

Emite MDF-e (Manifesto Eletrônico de Documentos Fiscais), agrupando vários CT-e/NF-e em um único transporte. Obrigatório para transportadores com vários DFs no mesmo veículo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
loteNo
pesoYesPeso bruto total das mercadorias em KG. DEVE ser > 0.
AereoNo
serieNo
valorYesValor total das mercadorias transportadas. DEVE ser > 0.
codigoNo
numeroNo
segurosNo
AquaviarioNo
RodoviarioNoDados do transporte rodoviário (placa 7 caracteres, condutores com CPF/nome, UF do veículo). OBRIGATÓRIO quando modalidade = 1.
modalidadeYesModalidade de transporte. Valores: 1 - Rodoviário (exige objeto Rodoviario com placa, condutores e percurso); 2 - Aéreo (exige objeto Aereo); 3 - Aquaviário (exige objeto Aquaviario); 4 - Ferroviário (exige objeto Ferroviario)
observacaoNo
DataEmissaoNoData/hora ISO 8601 (ex: 2026-07-22T13:45:00-03:00)
FerroviarioNo
percursoUfsNo
tipoAmbienteYesTipo de ambiente. IMPORTANTE: passe explicitamente. Para testes use 2. Valores: 1 - Produção; 2 - Homologação
tipoEmitenteYesTipo de emitente. Valores: 1 - Prestador de Serviço de Transporte (transportadora); 2 - Transportador de carga própria (mais comum - empresa transportando seus próprios produtos)
carregamentosNo
ufCarregamentoYesUF de carregamento (origem). Sigla de 2 letras (SP, RJ, MG...).
observacaoFiscoNo
descarregamentosNo
ufDescarregamentoYesUF de descarregamento (destino). Sigla de 2 letras (SP, RJ, MG...).
produtoPredominanteNoProduto predominante transportado. Opcional.
identificadorInternoNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
ErrorNoMensagem de erro da operação. Vazia ("") quando foi bem-sucedida.
chaveNo
AvisosNoAvisos não bloqueantes. Pode vir preenchida mesmo em emissão bem-sucedida.
numeroNo
statusNo1 - Lote processado; 2 - Aguardando processamento; 3 - Ocorreu um erro ao processar o lote
base64XmlNo
base64DAMDFeNo
tipoAmbienteNo
codRespostaSefazNo

TDQS

A3.5/5.0
Behavior3/5

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

Annotations are sparse (only openWorldHint), so the description carries the burden of behavioral disclosure. It adds useful context about grouping behavior and mandatory usage, but does not explain post-emission behavior, return values, or failure modes. The openWorldHint already signals side effects, but the description adds only limited extra behavioral detail.

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?

The description is compact and front-loaded, with two sentences that each add value: the first defines the action and purpose, the second states a key usage condition. No wasted words or redundancy.

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

Completeness2/5

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

Given the tool's high complexity (24 parameters, nested structures) and low schema coverage, a two-sentence description is inadequate. It fails to mention prerequisites like referencing existing CT-e/NF-e keys, how to structure the grouped documents, or important environmental parameters like tipoAmbiente. The presence of an output schema reduces the burden for return values, but the description still lacks sufficient guidance for safe and correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool description contains no parameter information whatsoever. With schema description coverage at only 42%, the description needed to compensate for the many undocumented parameters (e.g., lote, serie, codigo, numero, carregamentos, descarregamentos), but it does not. This is a critical gap for such a large parameter set.

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 identifies the specific action ('Emite MDF-e') and resource (Manifesto Eletrônico de Documentos Fiscais), and explains it groups multiple CT-e/NF-e into a single transport. This differentiates it from sibling emission tools like cte_emitir and nfe_emitir.

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 an explicit when-to-use condition: 'Obrigatório para transportadores com vários DFs no mesmo veículo.' However, it does not name alternative tools or state when not to use it, so it falls short of a 5.

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.