Skip to main content
Glama

Emitir NFS-e (serviços)

nfse_emitir

Emite NFS-e (Nota Fiscal de Serviços Eletrônica). Cada município brasileiro tem regras e webservices próprios - confira o município emissor antes. Pode usar Portal Nacional NFS-e ou prefeitura específica conforme cadastro da empresa.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
LoteNo
nFSInfoYesLista de NFS-e a emitir no lote. Mínimo 1 item.
TipoAmbienteYesIdentificação do ambiente da prefeitura/portal nacional. Valores: 1 - Produção (emissão REAL, com valor fiscal); 2 - Homologação (teste)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
LoteNoNúmero do lote enviado;
ErrorNoMensagem de erro da operação. Vazia ("") quando foi bem-sucedida.
NotasNo
AvisosNoAvisos não bloqueantes. Pode vir preenchida mesmo em emissão bem-sucedida.
CodLoteNoCódigo atrelado ao lote; - Usado para busca de lotes
ProtocoloNoNúmero de protocolo do lote
StatusLoteNo1 - Lote processado; 2 - Aguardando processamento; 3 - Ocorreu um erro ao processar o lote; 4 - Ocorreu um erro ao analisar as informações do lote
Base64XmlLoteNoDados xml do lote, bytes em base64
DsTipoAmbienteNoDescrição do ambiente de envio
MunicipioEnvioNoMunicipio onde foi enviado
CodTipoAmbienteNoCódigo do ambiente de envio
DataRecebimentoNoData de recebimento do lote;
TempoRequisicaoPrefeituraNoTempo total da transmissão para prefeitura em milisegundos

TDQS

A4/5.0
Behavior3/5

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

With only an openWorldHint annotation and no readOnly/destructive hints, the description carries the burden of behavioral disclosure. It adds useful context about municipal variation and routing ('Pode usar Portal Nacional NFS-e ou prefeitura específica conforme cadastro da empresa'), but it does not explicitly warn that emission is a real fiscal act, that production mode has legal effect, or that authorization/credentials may be required. The schema's TipoAmbiente description covers production vs. homologation, but the tool description itself stays at a general level.

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?

The description is two sentences, front-loaded with the primary verb and resource, and every sentence adds value: the first states the action, the second warns about municipal variability and routing options. No filler or tautology.

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?

Given the high complexity of NFS-e emission, the description is brief but includes the most critical operational caveat (per-municipality rules/webservices) and the routing choice. The input schema fills in parameter details and the output schema covers return values. A more thorough description could mention environment safety and prerequisites, but the combination of description plus schema is sufficient for an informed agent.

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?

The tool description provides no parameter-level guidance, but the input schema is rich and covers the required parameters (TipoAmbiente, nFSInfo) with detailed nested descriptions. Schema description coverage is 67%, so the schema carries most of the semantic weight. The description does not add meaning beyond the schema, but it also does not conflict with it; a baseline 3 is appropriate.

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 starts with 'Emite NFS-e (Nota Fiscal de Serviços Eletrônica)' which is a specific verb+resource pairing that immediately distinguishes this tool from siblings like nfse_consultar, nfe_emitir, and cte_emitir. It also clarifies scope by mentioning the National Portal and specific city halls.

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?

The description gives clear context on when to use the tool: to emit an electronic service invoice, and it warns that each Brazilian municipality has its own rules and webservices. It does not explicitly name alternative tools or exclusion criteria, but the guidance to 'confira o município emissor antes' and the distinction between Portal Nacional and prefeitura específica provides practical usage context.

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.

TDQS

A3.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose, with thorough descriptions that clarify overlaps (e.g., cliente_consultar vs cadastro_consultar). Even similar operations like arquivo_baixar variants have explicit scope differences.

Naming Consistency4/5

Most tools follow a noun_verb pattern (e.g., cliente_consultar, evento_cancelar, produto_criar), but a few deviate (e.g., 'health', 'cte_desacordo'). Overall consistent enough for easy recognition.

Tool Count4/5

34 tools is high but justified given the complexity of fiscal document management across multiple document types (NF-e, NFS-e, CT-e, MDF-e, etc.) and required CRUD, events, and auxiliary operations.

Completeness4/5

The tool set covers create/read/update/delete for clients, products, and tax rules, plus emission, cancellation, correction, and status checks for various documents. Minor gaps like dedicated NFS-e cancellation are handled by generic event tools.