Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_healthcheck

Probe real upstream routes of Compras.gov.br to detect silent API breakages. Returns per-module status (ok/degraded/fora) in ~30 seconds, preventing surprises during demonstrations or process execution.

Instructions

Diz, em ~30 segundos, o que está de pé neste servidor agora.

Estende compras_versao: além de versão e configuração, dispara um probe paralelo (timeout curto) contra as rotas upstream reais e devolve a situação por módulo funcional.

Por que existe: em 04/08/2026 a tool de pesquisa de preço de material estava quebrada havia semanas e ninguém sabia — a SEGES trocou a assinatura da rota sem versionar. A descoberta veio de um analista tentando usar a ferramenta. Antes de uma demonstração ou de instruir processo, rode isto: o objetivo é que a descoberta aconteça aqui, não no palco.

Args: profundidade: basico responde só versão/config (instantâneo); rotas (padrão) executa o probe upstream. modulo: restringe o probe a um módulo (ex.: pesquisa_preco, atas, pncp). Sem isso, testa todos.

Situação por módulo: - ok: todas as rotas responderam com os campos esperados. - degradado: alguma rota caiu, ou respondeu 200 sem os campos do contrato (ex.: rota de preço sem precoUnitario) — o modo de falha silencioso que só o contrato de campos pega. - fora: todas as rotas testáveis do módulo falharam. - pulado: faltou credencial (ex.: TRANSPARENCIA_API_KEY).

Rota que estoura o relógio é reexecutada em série antes de virar fora: com dezenas de rotas em paralelo, uma rota apenas lenta seria reportada como quebrada. Quando passa na segunda tentativa, o campo problemas do módulo registra "lenta sob carga" em vez de escondê-lo.

O campo pronto_para_uso é o resumo honesto: False quando existe qualquer módulo fora ou degradado.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
moduloNoRestringe o probe a um módulo funcional: 'pesquisa_preco', 'catalogo', 'organizacoes', 'atas', 'contratacoes', 'contratos', 'fornecedores', 'indicadores', 'legado', 'planejamento', 'pncp', 'sancoes', 'comprasnet', 'enriquecimento'. Sem valor, testa todos.
profundidadeNo'rotas' (padrão) testa as rotas upstream reais em paralelo e devolve situação por módulo (ok/degradado/fora) em ~30s. 'basico' devolve só versão e configuração, sem tocar a rede.rotas

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Since no annotations are provided, the description carries full burden. It excels by explaining in detail: the parallel probe with short timeout, retry logic for slow routes ('Rota que estoura o relógio é reexecutada em série antes de virar `fora`'), the `pronto_para_uso` summary field, and each possible status (`ok`, `degradado`, `fora`, `pulado`) with precise meaning. No contradictions.

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 well-structured: a clear opening summary, a motivating backstory (why it exists), explicit Args section, and a detailed explanation of statuses and retry logic. Every sentence adds unique value, and the information is front-loaded. It is appropriately sized for the complexity.

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

Completeness5/5

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

Given the tool has 2 parameters, full schema coverage, and an output schema, the description is complete. It explains the purpose, behavior, parameters, statuses, and edge-case handling (retries, silent failures). The output schema documentation is not needed here because the description sufficiently describes the return values and fields.

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 description coverage is 100%, so the schema already documents both parameters well. The description adds significant value by providing context on the `rotas` mode behavior and the list of possible `modulo` values, and by explaining the trade-off between speed (`basico`) and depth (`rotas`). However, the core parameter definitions are already in the schema, so a slight deduction.

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 it checks what is currently running on the server ('o que está de pé neste servidor agora') and extends `compras_versao` by adding a parallel probe against upstream routes. It also distinctly differentiates itself from the many sibling tools by emphasizing its health-check/monitoring role, unlike any other tool listed.

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?

The description provides explicit guidance on when to use this tool ('Antes de uma demonstração ou de instruir processo, rode isto') and gives a concrete real-world example of a situation it prevents. It also clearly explains the two modes (`basico` vs `rotas`) and the optional `modulo` filter, ensuring the agent knows exactly how to run it in different scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/opedrosoares/MCP_Compras'

If you have feedback or need assistance with the MCP directory API, please join our Discord server