Skip to main content
Glama

Preparar nota de produto (NF-e ou NFC-e)

emitir_nota_produto

Prepara uma NF-e (tipo "nfe", venda para empresa ou pessoa com entrega) ou NFC-e (tipo "nfce", venda no balcão ao consumidor). NÃO emite: valida o documento de verdade (monta, assina e confere no leiaute) e devolve uma prévia com confirmacao_token; a nota só sai quando confirmar_emissao recebe esse token. Não há cálculo de imposto: emitente do Simples Nacional ou MEI pode omitir icms, pis e cofins nos itens; no regime normal o usuário (ou o contador) precisa informar cada grupo. NCM, CFOP e CST vêm do emitente ou do contador. "ambiente": "homologacao" testa sem valor fiscal e sem custo.

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": {
      "itens": "<itens>"
    },
    "name": "emitir_nota_produto"
  }
}

Input Schema

NameRequiredDescriptionDefault
tipoNo
extraNo
itensYes
serieNo
trocoNo
numeroNo
ambienteNo
cobrancaNo
presencaNo
finalidadeNo
pagamentosNo
transporteNo
destinatarioNo
intermediadorNo
autorizados_xmlNo
consumidor_finalNo
informacoes_fiscoNo
natureza_operacaoNo
notas_referenciadasNo
informacoes_complementaresNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false. The description adds substantial context beyond that: the call validates/mounts/signs/checks the layout and returns a preview plus token rather than emitting, tax calculation is not performed (Simples Nacional/MEI may omit icms, pis, cofins; normal regime must supply each group), and NCM/CFOP/CST come from the emitente or accountant.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence, followed by the emission caveat, tax caveats, and environment note. Five dense sentences with no filler; the tax-regime sentence is long but each clause carries decision-relevant information.

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 tool with no output schema, the description covers the essential workflow (preview → token → confirmar_emissao), the tax-input expectations, and the environment semantics. It omits token lifetime, error behavior, and whether repeated calls reuse or invalidate a preview, which are minor gaps for a first-call decision.

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 0% across 20 parameters, so the description must carry the load. It adds genuine meaning for tipo (nfe vs nfce), ambiente (homologacao = test without fiscal value or cost), and the icms/pis/cofins groups' regime-dependent optionality, but the remaining parameters (destinatario, transporte, pagamentos, cobranca, serie, numero, presenca, etc.) are left entirely to the schema.

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 opens with a specific verb and resource ("Prepara uma NF-e ... ou NFC-e") and immediately disambiguates the two document types by scenario: "nfe" for company/consumer sales with delivery, "nfce" for counter sales. It also explicitly negates the emission action, so the agent can tell this apart from the sibling confirmar_emissao without opening a 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?

It states the follow-up path clearly: nothing is emitted until confirmar_emissao receives the returned confirmacao_token, and "ambiente": "homologacao" is flagged as the no-cost, no-fiscal-value test path. It does not explicitly say when to choose this over the sibling emitir_nota or spell out when-not-to-use cases, so guidance is strong but not exhaustive.

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.

Resources