Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_uasg_buscar

Read-onlyIdempotent

Search Brazilian UASG procurement units by partial name match (accent/case-insensitive) to locate specific units for procurement analysis and planning.

Instructions

Busca UASGs por trecho do nome (match parcial, ignora acento e caixa).

✅ Restaurada em 2026-08-05, com busca local. Duas correções:

  1. A rota exige statusUasg; sem ele devolvia 404 (mesma causa de compras_uasg_listar).

  2. O parâmetro nome não existe no contrato da rota e era ignorado pelo upstream — enviá-lo devolvia o universo inteiro (~22 mil UASGs) como se fossem resultados de busca. Corrigir só o item 1 teria trocado um erro visível (404) por um erro silencioso, que é pior: o analista receberia "TCU - SECRETARIA DE INFORMATICA" como 1º resultado de qualquer termo.

Como não há filtro textual upstream, a busca é feita localmente: a tool varre as páginas da rota (500 registros cada, ~8s no universo completo), filtra por termo e pagina o resultado filtrado. O varrido fica em cache por 24h, então só a primeira busca do dia paga o custo.

O payload informa _busca_local, _paginas_varridas e _universo_varrido — se a varredura for truncada, isso fica explícito em vez de virar silêncio.

Cache 24h.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termoYesTrecho do nome da UASG (match literal, ignora acento e caixa). Ex.: 'aquaviarios', 'tribunal regional', 'exercito'. Siglas raramente funcionam — os nomes vêm por extenso no cadastro ('AGÊNCIA NACIONAL DE TRANSPORTES AQUAVIÁRIOS', não 'ANTAQ').
paginaNoPágina de resultados (1-based). Padrão 1.
tamanho_paginaNoQuantidade de registros por página. Padrão 50, máximo 500.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.3.14

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description reveals that search is executed locally by scanning upstream pages, that results are cached for 24h, that pagination applies after local filtering, and that the payload includes `_busca_local`, `_paginas_varridas`, and `_universo_varrido` to expose truncation. It also documents the upstream `nome` parameter quirk that could cause silent universe-wide results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is front-loaded with an excellent one-sentence purpose and uses structured sections, which helps readability. However, it contains changelog noise such as '✅ Restaurada em 2026-08-05', a counterfactual rationale, and repeated cache information that could be condensed into a few concise operational notes.

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?

For a tool with unusual local-search behavior, this description covers performance cost, cache duration, truncation visibility, upstream contract pitfalls, and result filtering semantics. An output schema exists, so the description does not need to enumerate return fields, and the mention of debug payload fields is a useful supplement.

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?

The schema already covers all three parameters, so the baseline is 3. The description adds valuable meaning by clarifying that `pagina` and `tamanho_pagina` paginate the locally filtered result set, not the upstream API pages, which changes how an agent should interpret those parameters.

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 first sentence states a specific verb and resource: 'Busca UASGs por trecho do nome (match parcial, ignora acento e caixa).' This clearly distinguishes it from sibling tools like compras_uasg_listar and compras_uasg_consultar.

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 makes it clear that this tool is for searching UASGs by a name fragment, which tells an agent when to call it. It does not explicitly name alternatives or exclusions, but the introductory phrase provides enough contextual guidance for routine selection.

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