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

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint, so the description's disclosure of 'consulta status e dados' adds little beyond that. No behavioral traits beyond annotations are revealed.

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 a single, concise sentence that front-loads the purpose. No redundant information.

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?

Given the existence of an output schema and clear annotations, the description is adequate but fails to explain how the parameters relate to the query criteria mentioned. Missing detail on what exactly is returned.

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 coverage is 100%, but the description mentions 'número, série e ambiente' which are not present as parameter names; the actual parameters are 'Rps' and 'codLote'. This mismatch adds confusion rather than clarity.

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 clearly states the verb 'consulta' and the resource 'NFS-e já enviada', specifying query criteria (número, série e ambiente). It effectively distinguishes from sibling tool 'nfse_emitir' which is for emission.

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

Usage Guidelines3/5

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

The description implies the tool is for already-sent NFS-e but provides no explicit guidance on when to use it vs. other tools, nor exclusion criteria. Usage context is implied but not explicit.

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.