Skip to main content
Glama

Emitir NFCom

nfcom_emitir
Destructive

Emite a NFCom (modelo 62, Nota Fiscal Fatura de Serviço de Comunicação Eletrônica) de provedor de internet, TV por assinatura ou telefonia: assinante, itens com cClass e fatura. Requer serviço NFCom habilitado e a empresa credenciada na SEFAZ. Cancelamento por evento_cancelar com a chave.

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": {
      "TipoAmbiente": "<TipoAmbiente>",
      "Destinatario": "<Destinatario>",
      "Assinante": "<Assinante>",
      "Itens": "<Itens>"
    },
    "name": "nfcom_emitir"
  }
}

Input Schema

NameRequiredDescriptionDefault
ItensYesItens da fatura (1 a 990).
SerieNoSérie (0 a 999). Quando não informada, usa a numeração padrão do painel.
CodigoNoCódigo numérico da chave de acesso (até 7 dígitos). Quando não informado, usa o id interno da nota.
FaturaNoDados da fatura (vencimento, código de barras, PIX). Obrigatório no faturamento normal, exceto pré-pago e cessão de meios de rede.
NumeroNoNúmero da NFCom. Quando não informado, usa a numeração padrão do painel.
PrePagoNoServiço pré-pago (obrigatório quando houver item de cClass do grupo 050).
AssinanteYesDados do assinante/contrato. OBRIGATÓRIO.
FinalidadeNoFinalidade da NFCom. Valores: 0 - Normal; 3 - Substituição (exige Substituicao); 4 - Ajuste (todos os itens com ChaveNFComAnterior e ItemAnterior; sem fatura)
NotaEntradaNoNFCom de entrada.
DestinatarioYesDestinatário (assinante) da fatura. OBRIGATÓRIO, com endereço completo.
SubstituicaoNoNFCom ou nota de papel (modelo 21/22) substituída. Obrigatório quando Finalidade = 3.
TipoAmbienteYes1 - Produção; 2 - Homologação
CofaturamentoNoNFCom da operadora local. Obrigatório quando TipoFaturamento = 2.
CessaoMeiosRedeNoCessão de meios de rede entre operadoras (dispensa a fatura).
TipoFaturamentoNoTipo de faturamento. Valores: 0 - Normal (exige Fatura, salvo pré-pago ou cessão de meios de rede); 1 - Centralizado (exige FaturamentoCentralizado); 2 - Cofaturamento (exige Cofaturamento; sem fatura)
IdentificadorInternoNoCódigo de controle do seu sistema. Com a verificação do identificador interno ligada, não aceita repetir o de uma nota autorizada.
CodMunicipioFatoGeradorNoCódigo IBGE do município do fato gerador. Quando não informado, usa o município da empresa.
FaturamentoCentralizadoNoEstabelecimento centralizador (mesma raiz de CNPJ). Obrigatório quando TipoFaturamento = 1.
InformacoesComplementaresNoInformações complementares de interesse do contribuinte (até 5 blocos de 3000 caracteres; textos maiores são quebrados).
InformacoesAdicionaisFiscoNoInformações adicionais de interesse do fisco (até 2000 caracteres).

Output 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
protocoloNoVazio na NFCom emitida em contingência off-line (status 1 com o aviso em avisos): a SEFAZ autoriza depois, pela transmissão automática.
tipoAmbienteNo
base64DANFECOMNoPDF do DANFE-COM em Base64.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / protocolo / description
      Added value: +"Vazio na NFCom emitida em contingência off-line (status 1 com o aviso em avisos): a SEFAZ autoriza depois, pela transmissão automática."
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the mutation/external-submission profile is covered structurally; the description adds the enabling and SEFAZ-credentialing prerequisites plus the fact that reversal is a separate tool call. It stops short of saying the call is synchronous or what happens on rejection, but the output schema covers the response.

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 dense sentences: what is emitted and for whom first, then prerequisites and the cancellation alternative. No filler and no repetition of the title.

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 20-parameter, deeply nested fiscal emission tool with full schema coverage, annotations, and an output schema, the description supplies the prerequisites and the escape hatch (evento_cancelar) that structured fields cannot express. A note on failure/rejection behavior would close the remaining gap.

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%, so every parameter including nested tax groups is already documented. The description only names the top-level groups (assinante, itens com cClass, fatura), adding no meaning beyond the schema — baseline 3.

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 ("Emite") and resource ("NFCom, modelo 62"), and scopes it to internet/TV/telecom providers with the three payload groups (assinante, itens com cClass, fatura). This clearly separates it from nfe_emitir, cte_emitir, nfse_emitir and mdfe_emitir without needing the 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?

Gives concrete preconditions ("Requer serviço NFCom habilitado e a empresa credenciada na SEFAZ") and routes the cancellation case to evento_cancelar with the chave. It does not explicitly state when to prefer NFCom over NFSe/NFe for a given revenue type, but the provider-scope sentence implies it.

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.