Skip to main content
Glama

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

emitir_nota

Prepara uma NFS-e e devolve a PRÉVIA + confirmacao_token. NÃO emite nada. Mostre a prévia ao usuário e chame confirmar_emissao só depois do OK explícito dele. Tomador: informe 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. Nunca invente códigos fiscais.
tomador_paisNoPaís ISO2 do tomador estrangeiro (ex.: "SG").
tomador_tipoNoUse "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.

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 but cannot convey that this tool deliberately performs no emission; the description supplies that crucial nuance and names the confirmation token it hands back. It does not cover token lifetime or whether the preview persists server-side, which keeps it short of a 5.

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, front-loaded with the non-emission guarantee, then the required human-in-the-loop step, then the tomador rule. No filler.

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?

With 10 parameters, a nested fiscal config object, and no output schema, the description still covers the return shape and the mandatory confirmation flow. What remains unstated — what the prévia contains and how long the token is valid — is minor but not nothing.

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, but the description adds a cross-parameter constraint not expressible in the schema: identify the tomador either by saved id or by document plus razão social. That is real added meaning beyond the field-level descriptions.

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) plus the concrete return (PRÉVIA + confirmacao_token), and explicitly negates the naive reading of the name with 'NÃO emite nada'. This cleanly separates it from the sibling confirmar_emissao.

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?

Gives an explicit workflow: show the preview to the user, then call confirmar_emissao only after explicit approval. It also gives a selection rule for the tomador path (tomador_id OR tomador_doc + tomador_razao), so the agent knows which parameters to choose between.

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