Skip to main content
Glama

Emitir DC-e

dce_emitir
Destructive

Emite DC-e (Declaração de Conteúdo Eletrônica) para transporte de itens não-fiscais por pessoa física ou MEI. Requer serviço DC-e habilitado no cadastro.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
LoteNo
ItensYesItens/produtos declarados no conteúdo (mínimo 1, máximo 999). Cada item exige Descricao (até 120 chars) e ValorTotal > 0. NCM opcional (2 ou 8 dígitos quando informado).
SerieNo
CodigoNo
NumeroNo
UfFiscoNoSigla da UF do órgão fiscalizador (obrigatório quando TipoEmitente=0). Se não preenchido, usa a UF da empresa emissora.
RemetenteYesPessoa física/jurídica que está enviando o pacote. OBRIGATÓRIO. Exige Endereco completo (validado por ValidaPessoaDCe).
ValorTotalNoValor total declarado da DC-e. Se omitido, soma dos ValorTotal dos itens. Deve ser > 0.
XOrgaoFiscoNoNome do órgão fiscalizador (obrigatório quando TipoEmitente=0)
DestinatarioYesDestinatário do pacote. OBRIGATÓRIO. Exige Endereco completo.
TipoAmbienteYesTipo de ambiente. Valores: 1 - Produção (emissão real); 2 - Homologação (teste)
TipoEmitenteNoTipo do emitente: Valores: 0 - App Fisco; 1 - Marketplace; 2 - Emissor próprio; 3 - Transportadora; 4 - ECT (Correios)
SiteMarketplaceNoURL do site do marketplace (obrigatório quando TipoEmitente=1)
CnpjTransportadoraNoCNPJ da transportadora que leva a carga. Opcional. Quando informado, é usado no XML; quando vazio, mantém o CNPJ da empresa emissora.
IdentificadorInternoNo
ModalidadeTransporteNoModalidade de transporte: Valores: 0 - Correios; 1 - Conta própria; 2 - Transportadora
DeclaracaoCrimeTributarioYesTexto da declaração de crime tributário (xObs2). OBRIGATÓRIO, até 5000 caracteres. Texto padrão sugerido: "Declaro, sob as penas da lei, que o conteúdo desta declaração é verdadeiro e que não estou cometendo crime contra a ordem tributária."
InformacoesComplementaresNoInformações complementares (opcional, até 5000 caracteres).
DeclaracaoContribuinteICMSYesTexto da declaração de contribuinte ICMS (xObs1). OBRIGATÓRIO, até 2000 caracteres. Texto padrão sugerido: "Declaro, sob as penas da lei, que não sou contribuinte do ICMS."
InformacoesAdicionaisFiscoNoInformações adicionais de interesse do fisco (opcional, até 2000 caracteres).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
chaveNo
errosNoLista de erros quando a operação falha. Vazia em caso de sucesso. Cada item traz codigo, descricao e correcao.
serieNo
avisosNoAvisos não bloqueantes. Pode vir preenchida mesmo em sucesso.
numeroNo
statusNoStatus do resultado da operação: 1 = sucesso; 2 = erro (a lista erros é preenchida).
base64XmlNo
protocoloNo
base64DACENo
tipoAmbienteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed58 schema fields changed
    • changedInput schema / properties / CnpjTransportadora / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Codigo / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Contato / properties / Email / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Contato / properties / Fax / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Contato / properties / Telefone / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Contato / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / CpfCnpj / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Endereco / properties / Bairro / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Endereco / properties / Cep / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Endereco / properties / CodMunicipio / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Endereco / properties / Complemento / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Endereco / properties / Logradouro / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Endereco / properties / Municipio / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Endereco / properties / Numero / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Endereco / properties / Pais / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Endereco / properties / Uf / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Endereco / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedInput schema / properties / Destinatario / properties / Nome / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / IdentificadorInterno / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / InformacoesAdicionaisFisco / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / InformacoesComplementares / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Itens / items / properties / InformacoesAdicionais / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Itens / items / properties / NCM / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Itens / items / properties / Quantidade / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedInput schema / properties / Itens / items / properties / ValorUnitario / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedInput schema / properties / Lote / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / Numero / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Contato / properties / Email / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Contato / properties / Fax / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Contato / properties / Telefone / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Contato / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / CpfCnpj / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Endereco / properties / Bairro / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Endereco / properties / Cep / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Endereco / properties / CodMunicipio / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Endereco / properties / Complemento / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Endereco / properties / Logradouro / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Endereco / properties / Municipio / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Endereco / properties / Numero / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Endereco / properties / Pais / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Endereco / properties / Uf / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Endereco / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedInput schema / properties / Remetente / properties / Nome / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / Serie / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / SiteMarketplace / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / UfFisco / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / ValorTotal / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedInput schema / properties / XOrgaoFisco / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / avisos / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / base64DACE / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / base64Xml / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / chave / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / erros / items / properties / codigo / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / erros / items / properties / correcao / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / erros / items / properties / descricao / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / erros / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / protocolo / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / tipoAmbiente / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and openWorldHint=true, so the mutating/irreversible nature is covered structurally. The description adds a real behavioral constraint — the tool only covers non-fiscal content shipped by an individual or MEI, and requires prior service enablement — but says nothing about production vs test impact, ID return, or authorization flow.

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?

Two sentences, zero padding, and the identifying scope is front-loaded before the prerequisite. Every clause earns its place.

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

Completeness3/5

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

For a 20-parameter, nested-object, enum-bearing emission tool, the description is thin: it omits the ambient (1/2) choice consequence, the mandatory declaration texts, and any note on what a successful emission returns, even though an output schema exists for the last point. Purpose and one prerequisite are the only gaps it closes.

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

Parameters2/5

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

With 20 parameters at 75% schema coverage, the description must contribute something, and it contributes nothing: not one parameter name, format, enum, default, or required-field caveat (e.g. UfFisco/XOrgaoFisco when TipoEmitente=0) appears in the text. All semantics live in the schema alone.

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?

States a specific verb ('Emite') and resource ('DC-e'), spells out the acronym's meaning, and scopes it to 'transporte de itens não-fiscais por pessoa física ou MEI'. That scope implicitly separates it from fiscal-document siblings like nfe_emitir/cte_emitir, though no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives one hard prerequisite ('Requer serviço DC-e habilitado no cadastro'), which is useful. But it never says when to prefer this over nfe_emitir/cte_emitir/mdfe_emitir for a given shipment, nor any exclusions or environment guidance, leaving selection largely to inference.

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.