Skip to main content
Glama

Emitir NF-EnerCom

nfenercom_emitir

Envia a NF-EnerCom (Nota Fiscal de Energia Comercializada) para autorização na SEFAZ.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serieNoSérie da nota fiscal. Quando não informado é controlado pelo Painel
numeroNoNúmero da nota fiscal. Quando não informado é controlado pelo Painel
energiaNoInformações referente a nota de Energia
produtosYesItens da nota (mínimo 1). Cada item exige codigo, descricao, unidadeMedida, quantidade, valor, CFOP.
situacaoNoSituação do documento (Padrão 4) Valores: 1 - documento fiscal cancelado dentro do mesmo período de apuração;; 2 - documento fiscal emitido em substituição a um documento fiscal cancelado dentro do mesmo período de apuração; 3 - documento fiscal complementar; 4 - demais casos
comunicaoNoInformações referente a nota de comunicação e Telecomunicação
dataEmissaoYesData de emissão do documento. Obrigatória.
destinatarioYesInformações do destinatário (cliente). OBRIGATÓRIO.
tipoAmbienteYesTipo de ambiente. Valores: 1 - Produção; 2 - Homologação
modeloDocumentoYesModelo do documento. Valores: 6 - Energia elétrica; 21 - Comunicação; 22 - Telecomunicação
valorTotalFaturaYesValor total da fatura comercial. Deve ser > 0.
identificadorInternoNoCódigo de controle interno unico da venda. Evita duplicidades, caso configurado.

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed51 schema fields changed
    • changedInput schema / properties / comunicao / properties / tipoAssinante / enum
      Previous value: -[
      -  1,
      -  2,
      -  3,
      -  4,
      -  5,
      -  6
      -]New value: +[
      +  1,
      +  2,
      +  3,
      +  4,
      +  5,
      +  6,
      +  null
      +]
    • changedInput schema / properties / comunicao / properties / tipoAssinante / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / comunicao / properties / tipoUtilizacao / enum
      Previous value: -[
      -  1,
      -  2,
      -  3,
      -  4,
      -  5,
      -  6
      -]New value: +[
      +  1,
      +  2,
      +  3,
      +  4,
      +  5,
      +  6,
      +  null
      +]
    • changedInput schema / properties / comunicao / properties / tipoUtilizacao / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / comunicao / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • removedInput schema / properties / dataEmissao / format
      Removed value: -"date-time"
    • changedInput schema / properties / destinatario / properties / codigo / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "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 / ie / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / destinatario / properties / razaoSocial / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / energia / properties / classeConsumo / enum
      Previous value: -[
      -  1,
      -  2,
      -  3,
      -  4,
      -  5,
      -  6,
      -  7,
      -  8
      -]New value: +[
      +  1,
      +  2,
      +  3,
      +  4,
      +  5,
      +  6,
      +  7,
      +  8,
      +  null
      +]
    • changedInput schema / properties / energia / properties / classeConsumo / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • addedInput schema / properties / energia / properties / dataLeituraAnterior / description
      Added value: +"Data/hora ISO 8601 (ex: 2026-07-22T13:45:00-03:00)"
    • removedInput schema / properties / energia / properties / dataLeituraAnterior / format
      Removed value: -"date-time"
    • changedInput schema / properties / energia / properties / dataLeituraAnterior / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedInput schema / properties / energia / properties / dataLeituraAtual / description
      Added value: +"Data/hora ISO 8601 (ex: 2026-07-22T13:45:00-03:00)"
    • removedInput schema / properties / energia / properties / dataLeituraAtual / format
      Removed value: -"date-time"
    • changedInput schema / properties / energia / properties / dataLeituraAtual / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / energia / properties / grupoTensao / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / energia / properties / subClasseConsumo / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / energia / properties / tarifaAplicada / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedInput schema / properties / energia / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedInput schema / properties / identificadorInterno / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / numero / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / produtos / items / properties / codClassificacao / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / produtos / items / properties / codTributacao / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / produtos / items / properties / codigo / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / produtos / items / properties / desconto / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedInput schema / properties / produtos / items / properties / descricao / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / produtos / items / properties / outrasDespesas / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedInput schema / properties / produtos / items / properties / unidadeMedida / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / serie / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / avisos / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "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"
      +]
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations only include openWorldHint=true, so the description carries the burden. It discloses that the tool sends to SEFAZ (external system), implying network dependency and authorization. However, it does not mention synchronous vs. asynchronous behavior, potential errors, or side effects beyond sending. Lacks detail for a mutation tool with external interaction.

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?

Single sentence, no redundancy, front-loaded with the core action. Every word contributes to understanding the tool's purpose.

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 complexity (12 parameters, required fields, nested objects, and external authorization), the description is too sparse. It lacks prerequisites (e.g., required certificates, SEFAZ configuration), error handling notes, and any mention of idempotency or duplication control (despite the 'identificadorInterno' parameter hinting at it). While an output schema may explain return values, the description fails to provide sufficient context for correct invocation.

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 the schema already documents all parameters. The tool description adds no additional meaning to any parameter. Baseline of 3 is appropriate given full schema coverage.

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 tool sends the NF-EnerCom to SEFAZ for authorization, distinguishing it from sibling tools like nfenercom_gerar_arquivo (which only generates the file) and nfe_emitir (general NF-e emission). The verb 'Envia' plus the explicit target 'autorização na SEFAZ' leaves no ambiguity.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool vs. alternatives (e.g., nfenercom_gerar_arquivo for file generation without sending, or nfe_emitir for other document models). The description does not state prerequisites, context requirements, or when not to use 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.