Skip to main content
Glama

Preparar emissão de NFS-e (prévia)

emitir_nota

Prepara uma NFS-e e devolve a prévia (tomador, valor, serviço e tributação exatos) com um confirmacao_token. Não emite: a nota só sai quando confirmar_emissao recebe esse token. Tomador: tomador_id (salvo) ou tomador_doc + tomador_razao.

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": {
      "valor": "<valor>",
      "discriminacao": "<discriminacao>"
    },
    "name": "emitir_nota"
  }
}

Input Schema

NameRequiredDescriptionDefault
valorYesValor do serviço em reais, ex.: "1250,00".
tomador_idNoId de um tomador salvo (listar_tomadores).
competenciaNoMês de referência YYYY-MM. Vazio = mês atual.
tomador_docNoCNPJ (14 dígitos) ou CPF (11) do tomador.
configuracaoNoConfiguração fiscal só desta nota. Campos omitidos herdam o cadastro/configuracao_id. Códigos fiscais vêm do emitente ou do contador.
tomador_paisNoPaís ISO2 do tomador estrangeiro (ex.: "SG").
tomador_tipoNo"exterior" para tomador estrangeiro.
discriminacaoYesDescrição do serviço, como sai impressa na nota.
tomador_razaoNoRazão social ou nome do tomador.
configuracao_idNoId de uma combinação devolvida por listar_configuracoes.
competencia_fiscalNoMês de competência fiscal no documento (dCompet, YYYY-MM). Vazio = mês da emissão.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, so the description's main added value is the two-step preview/confirm flow and the token contract, which is genuinely useful behavior beyond structured fields. It does not address idempotentHint=false — e.g., whether repeated calls mint multiple previews/tokens or whether previews expire — so it falls short of full disclosure.

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?

Three short sentences with zero filler: capability and return value first, the non-emission constraint second, the parameter convention last. Every clause carries information an agent needs before invoking.

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 an 11-parameter, nested-object tool with no output schema, the description covers what the preview contains and how confirmation works, which is the essential picture. Minor gaps remain on preview lifetime and on whether calling twice produces two tokens, but nothing blocking is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by stating the cross-field rule that tomador is identified either by tomador_id or by tomador_doc plus tomador_razao, a constraint not evident from the per-field descriptions. It adds no guidance on competencia vs. competencia_fiscal or on the nested configuracao overrides beyond what the schema already says.

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 and resource ("Prepara uma NFS-e") and immediately clarifies the output is a preview plus a confirmacao_token, which separates it from confirmar_emissao without the agent needing to open either 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?

Explicitly says "Não emite" and names the exact condition that triggers real emission (confirmar_emissao receiving the returned token), and it also states the alternative tomador identification paths (tomador_id vs. tomador_doc + tomador_razao). The when/when-not pair and the sibling handoff are both spelled out.

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