Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_buscar_contratacoes_similares

Find similar government contracts from Brazilian public procurement databases using CATMAT or CATSER codes to support price benchmarking and procurement planning.

Instructions

Federa Dados Abertos + PNCP buscando contratações similares.

Composição: consulta resultados homologados (Dados Abertos 14.133) + publicações PNCP filtrando pelo CATMAT/CATSER do item alvo, deduplica por CNPJ órgão + ano + sequencial e devolve os max_resultados mais recentes. Insumo para mapear benchmarks de outros órgãos.

Atenção latência: chama o PNCP em 3 modalidades (Pregão, Dispensa, Concorrência) em paralelo. Cada chamada PNCP costuma levar 30-60s — o tempo total da composta tende a 60-90s quando o cache está frio. Com Redis configurado as chamadas seguintes voltam em <1s.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ufNoFiltro opcional por UF.
codigo_catmatNoCódigo CATMAT do item. Mutuamente exclusivo com codigo_catser.
codigo_catserNoCódigo CATSER do serviço. Mutuamente exclusivo com codigo_catmat.
periodo_mesesNoJanela de busca em meses contados de hoje para trás.
max_resultadosNoMáximo de contratações similares a retornar (deduplicadas).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries full burden and does well: it discloses the federated data sources, deduplication logic, and importantly warns about latency (60-90s cold cache, <1s warm with Redis). This is a critical behavioral trait. However, it does not mention other potential side effects like rate limits or auth requirements, leaving minor gaps.

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?

The description is well-structured: first paragraph states purpose and composition, second gives use case, third warns about latency. It is front-loaded and efficient. The latency warning is valuable but adds a third paragraph; could be slightly more concise, but overall effective.

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

Completeness4/5

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

Given the tool's complexity (federated search, deduplication, 5 optional params, output schema exists), the description covers the main aspects: data sources, deduplication key, result count, and latency. It does not mention data freshness or what happens when no matches are found, but these are minor omissions.

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 description coverage is 100%, so baseline is 3. The description mentions filtering by CATMAT/CATSER and deduplication, which aligns with parameters but adds no new semantic information beyond the schema's own descriptions (e.g., mutual exclusivity is already stated in the schema). No improvement over schema.

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 tool federates two data sources (Dados Abertos and PNCP) to search for similar contracts, explains the composition (homologated results + PNCP publications filtered by CATMAT/CATSER), and distinguishes it from other contract search tools by focusing on similarity and deduplication. It leaves no ambiguity about what the tool does.

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 provides a use case ('Insumo para mapear benchmarks de outros órgãos') but does not explicitly state when to use this tool versus alternatives like compras_contratacoes_14133_consultar or compras_pncp_contratacao_por_orgao. The context is clear but lacks exclusions or comparative guidance.

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