Skip to main content
Glama

Consultar NFS-e

nfse_consultar
Read-onlyIdempotent

Consulta status e dados de uma NFS-e já enviada por número, série e ambiente.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
RpsNoRps para retornar (Se não enviar retorna todos)
codLoteNoCódigo do lote

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed22 schema fields changed
    • changedInput schema / properties / Rps / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedInput schema / properties / codLote / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Avisos / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / Base64XmlLote / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / CodLote / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / DataRecebimento / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / DsTipoAmbiente / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Error / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / MunicipioEnvio / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Notas / items / properties / Base64Doc / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Notas / items / properties / Base64Xml / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Notas / items / properties / Chave / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Notas / items / properties / CodVerificacao / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Notas / items / properties / CpfCnpjPrestador / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Notas / items / properties / CpfCnpjTomador / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / Notas / items / properties / DtEmissao / format
      Removed value: -"date-time"
    • changedOutput schema / properties / Notas / items / properties / Erro / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Notas / items / properties / IdentificadorInterno / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Notas / items / properties / NumeroNFSe / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / Notas / items / properties / Valores / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / Notas / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / Protocolo / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  2. First observed

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered by structured data. The description adds only the qualifier that the NFS-e must have already been sent, which is modest but genuine context beyond the annotations.

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?

A single front-loaded sentence with no filler, and the resource is stated before the qualifying clause. It is tight, though it wastes its one clause on parameters that do not match the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and the one-parameter-plus-optional list is small. Still, the description omits the actual parameter semantics (Rps selector, lote code) and gives no usage routing, leaving the agent to reconcile a mismatch between prose and schema.

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

Parameters2/5

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

Schema description coverage is 100%, which normally sets a baseline of 3. However, the description cites lookup keys ('por número, série e ambiente') that do not exist among the actual parameters (Rps, codLote), so it actively misdescribes the input rather than reinforcing it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (consulta) and resource (NFS-e) plus scope ('já enviada'), which separates it from the write-oriented siblings nfse_emitir and nota_listar. The purpose is unmistakable, though it never names a sibling or alternative by name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no guidance on when to use this versus nfse_emitir, nota_listar, or any other read tool in the sibling list. An agent must infer usage entirely from the one-line purpose statement.

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.