Skip to main content
Glama

Gerar arquivo NF-EnerCom

nfenercom_gerar_arquivo

Gera o arquivo da Nota Fiscal de Energia (NF-EnerCom). Pré-requisito para nfenercom_emitir.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anoNoAno de emissão das notas (4 dígitos). Obrigatório quando tipoGeracao = 1.
mesNoMês de emissão das notas (1-12). Obrigatório quando tipoGeracao = 1.
notasNoNotas Fiscais de Energia/Comunicação/Telecomunicação a incluir no arquivo. Obrigatório quando tipoGeracao = 2.
tipoGeracaoYesTipo de geração do arquivo. Valores: 1 - Gera o arquivo a partir das notas já emitidas no período (mes + ano informados); 2 - Gera o arquivo a partir da lista de notas informada em "notas"
tipoAmbienteYesTipo de ambiente. Valores: 1 - Produção; 2 - Homologação

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed49 schema fields changed
    • changedInput schema / properties / ano / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / mes / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / 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 / notas / items / properties / comunicao / properties / tipoAssinante / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / 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 / notas / items / properties / comunicao / properties / tipoUtilizacao / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / comunicao / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • removedInput schema / properties / notas / items / properties / dataEmissao / format
      Removed value: -"date-time"
    • changedInput schema / properties / notas / items / properties / destinatario / properties / codigo / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / contato / properties / email / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / contato / properties / fax / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / contato / properties / telefone / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / contato / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / cpfCnpj / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / endereco / properties / bairro / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / endereco / properties / cep / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / endereco / properties / codMunicipio / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / endereco / properties / complemento / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / endereco / properties / logradouro / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / endereco / properties / municipio / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / endereco / properties / numero / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / endereco / properties / pais / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / endereco / properties / uf / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / endereco / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / ie / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / destinatario / properties / razaoSocial / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / 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 / notas / items / properties / energia / properties / classeConsumo / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • addedInput schema / properties / notas / items / properties / energia / properties / dataLeituraAnterior / description
      Added value: +"Data/hora ISO 8601 (ex: 2026-07-22T13:45:00-03:00)"
    • removedInput schema / properties / notas / items / properties / energia / properties / dataLeituraAnterior / format
      Removed value: -"date-time"
    • changedInput schema / properties / notas / items / properties / energia / properties / dataLeituraAnterior / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedInput schema / properties / notas / items / properties / energia / properties / dataLeituraAtual / description
      Added value: +"Data/hora ISO 8601 (ex: 2026-07-22T13:45:00-03:00)"
    • removedInput schema / properties / notas / items / properties / energia / properties / dataLeituraAtual / format
      Removed value: -"date-time"
    • changedInput schema / properties / notas / items / properties / energia / properties / dataLeituraAtual / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / energia / properties / grupoTensao / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / energia / properties / subClasseConsumo / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / energia / properties / tarifaAplicada / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / energia / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / identificadorInterno / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / numero / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / produtos / items / properties / codClassificacao / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / produtos / items / properties / codTributacao / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / produtos / items / properties / codigo / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / produtos / items / properties / desconto / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / produtos / items / properties / descricao / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / produtos / items / properties / outrasDespesas / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / produtos / items / properties / unidadeMedida / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / items / properties / serie / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / notas / 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 already declare readOnlyHint=false with destructiveHint=false, so the agent knows this writes something without being destructive. The description adds that it is a prerequisite step for emission, but says nothing about whether the generated file is persisted, whether calls are idempotent, or what happens on repeated generation for the same period.

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 short sentences, front-loaded with the action and resource, with the dependency stated last. Zero filler.

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?

For a tool with a deeply nested notas payload and a two-mode tipoGeracao switch, the description never mentions the two generation modes or the notes-vs-period distinction. With no output schema and no explanation of what the generated file is or where it goes, an agent lacks enough context to call this confidently beyond the simplest path.

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 two required parameters (tipoGeracao, tipoAmbiente) and the nested notas payload are fully documented in the schema itself. The description contributes no additional parameter semantics, which is the expected baseline when the schema does the heavy lifting.

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 ('Gera') and resource ('arquivo da Nota Fiscal de Energia (NF-EnerCom)'), and explicitly names the sibling it precedes (nfenercom_emitir), which helps distinguish it. The term 'arquivo' remains somewhat abstract (file content vs. stored artifact) but the intent is clear.

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?

'Pré-requisito para nfenercom_emitir' gives an implied ordering constraint, which is useful context for sequencing. However, there is no explicit when-to-use guidance, no statement of when NOT to use it, and no mention of the arquivo_baixar* siblings that handle the resulting file.

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.