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. Mostre a prévia e chame confirmar_emissao só depois do OK explícito do usuário. 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. Nunca invente NCM, CFOP ou CST: pergunte. Para testar sem valor fiscal e sem custo, use "ambiente": "homologacao".

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. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), it discloses that the tool assembles, signs and validates but never transmits, and that it returns a preview plus confirmacao_token — a key two-step safety behavior. It also discloses the absence of tax calculation and the regime-dependent obligation to supply icms/pis/cofins, plus an explicit instruction never to invent NCM/CFOP/CST.

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?

Roughly five dense sentences, all front-loaded with the most decision-relevant facts (what it does, that it does not emit, the confirmation gate) before the tax-regime caveats. No filler or restatement 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 tool with no output schema, the definition covers the workflow, the fiscal environment, and the tax-field obligations that most often cause errors. Gaps remain on the other parameter groups (destinatario requirements for NF-e, pagamentos, transporte) and on what the preview contains, but the essentials for calling it correctly are present.

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?

With 0% schema description coverage across 20 top-level params, the description compensates partially: it explains the tipo enum, the ambiente enum, and which item tax groups (icms, pis, cofins) may be omitted under Simples Nacional/MEI. It says nothing about destinatario, transporte, pagamentos, cobranca, numero/serie, presenca or finalidade, so most of the schema's surface remains semantically unexplained.

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 names a precise verb and resource ("Prepara uma NF-e... ou NFC-e"), distinguishes the two document types by their enum values, and immediately scopes what it is not ("NÃO emite"). An agent can tell it apart from confirmar_emissao without opening 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 Guidelines5/5

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

It gives an explicit workflow: show the preview and call confirmar_emissao only after the user's explicit OK, naming the exact sibling to use next. It also names an alternative mode for testing ("ambiente": "homologacao") with the condition that selects it (no fiscal value, no cost).

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