Skip to main content
Glama

Consultar GNRE

gnre_consultar
Read-only

Consulta uma GNRE pelo Id ou pelo identificador interno: situação, linha digitável, PIX copia e cola e o PDF oficial em base64.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gnre_consultar"
  }
}

Input Schema

NameRequiredDescriptionDefault
IdNoId da guia devolvido em EnviarGnre. Se não informado, busca pelo IdentificadorInterno.
IncluirPdfNoDevolve o PDF oficial da guia em base64 quando ela já foi gerada.
TipoAmbienteNo
IdentificadorInternoNo

Output Schema

NameRequiredDescriptionDefault
IdNo
ValorNo
errosNoLista de erros quando a operação falha. Vazia em caso de sucesso. Cada item traz codigo, descricao e correcao.
avisosNoAvisos não bloqueantes. Pode vir preenchida mesmo em sucesso.
statusNoStatus do resultado da operação: 1 = sucesso; 2 = erro (a lista erros é preenchida).
SituacaoNo
Base64PdfNoPDF oficial gerado pelo Portal GNRE.
NossoNumeroNo
CodigoBarrasNo
NumeroReciboNoRecibo do lote no Portal GNRE; vem vazio enquanto o portal ainda não recebeu o lote.
TipoAmbienteNo
UfFavorecidaNo
PixCopiaEColaNoPIX copia e cola, quando a UF e a receita aceitam pagamento via PIX.
DataVencimentoNoData/hora ISO 8601 (ex: 2026-07-22T13:45:00-03:00)
LinhaDigitavelNo
NumeroControleNo
DataLimitePagamentoNoÚltimo dia em que o banco recebe a guia.
IdentificadorInternoNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / description
      Previous value: -"status: 1 - Guia gerada; 2 - Rejeitada (ver erros); 3 - Processando no Portal GNRE (consulte com ConsultarGnre em alguns segundos)."New value: +"status: 1 - Guia gerada; 2 - Rejeitada (ver erros); 3 - Processando no Portal GNRE (consulte com ConsultarGnre em cerca de 1 minuto ou aguarde o webhook gnre.processada)."
    • addedOutput schema / properties / NumeroRecibo / description
      Added value: +"Recibo do lote no Portal GNRE; vem vazio enquanto o portal ainda não recebeu o lote."
  2. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. The description's added context is essentially the payload contents (linha digitável, PIX, PDF base64), which is largely duplicated by the existing output schema rather than disclosing new behavior like auth needs or the cost of fetching the PDF.

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 that leads with the verb and resource and then lists outputs; nothing is padded or repeated. It is slightly over-packed, since the return-field enumeration is redundant given a dedicated output 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?

Because an output schema exists, the description need not explain return values, yet it spends most of its length doing so. The genuine gap is TipoAmbiente, which is undocumented in both the schema and the description, leaving the environment-selection parameter ambiguous.

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?

Schema coverage is 50%: Id and IncluirPdf are documented in the schema, while TipoAmbiente and IdentificadorInterno have no descriptions. The sentence 'pelo Id ou pelo identificador interno' reinforces the Id fallback logic but gives no meaning for TipoAmbiente, so it only partially compensates for the coverage gap.

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?

The description names a specific verb ('Consulta') and resource ('GNRE'), and enumerates the lookup keys (Id or identificador interno) plus the returned payload. It does not explicitly contrast itself with gnre_emitir or gnre_configuracao, but the verb+resource pairing is sufficiently distinct for an agent to identify it as the read-side tool.

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?

It implies the two alternative lookup paths (by Id, or by internal identifier), which gives some context for choosing inputs. However, it states no when-to-use or when-not-to-use conditions, no prerequisites, and no pointer to sibling tools such as gnre_emitir for creating a guia.

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.