Skip to main content
Glama

compras_buscar_contratacoes_similares

Read-onlyIdempotent

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

Composição: consulta os itens de contratações 14.133 no Dados Abertos (/modulo-contratacoes/2_, filtrando por codItemCatalogo e só itens com resultado) + publicações PNCP do período, deduplica pelo número de controle PNCP e devolve os max_resultados mais recentes. Insumo para mapear benchmarks de outros órgãos.

O recorte por CATMAT/CATSER vale para a perna Dados Abertos. A perna PNCP é best-effort por modalidade e não aceita filtro por item de catálogo — por isso amostra_dados_abertos e amostra_pncp vêm separadas no payload.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly, openWorld, idempotent, and non-destructive. The description adds substantial behavioral context beyond that: it discloses the high latency (30-60s per PNCP call, 60-90s total on cold cache, <1s with Redis), explains the parallel execution across three modalities, and reveals that the PNCP leg is best-effort and cannot filter by catalog item. It also specifies the separate payload fields. This is exactly the kind of extra behavioral transparency that helps an agent set expectations.

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 structured into a purpose statement, a composition explanation, a limitation note, and a latency warning, with bolded key terms. It is somewhat longer than average but every sentence carries information (sources, filters, deduplication, performance). It is not padded, and the most critical detail (latency) is clearly highlighted. Slightly more concision would be possible, but it is well-organized and front-loaded.

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 federated search tool with five parameters and no required fields, the description covers all essential operational details: data sources, how the search works, filter limitations, deduplication logic, latency behavior, and the separation of result sets. An output schema exists, so return values are defined. Nothing an agent needs to decide when and how to call this tool is missing.

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?

The input schema has 100% description coverage, with each parameter already documented (e.g., mutual exclusivity, default values, meaning). The tool description adds little beyond the schema: it mentions max_resultados and the CATMAT/CATSER scoping, but these are already in the schema. Given the high schema coverage, the baseline of 3 is appropriate; the description does not meaningfully enrich parameter semantics.

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 opens with a clear, specific purpose: federates Dados Abertos + PNCP to search for similar contracts ('Federa Dados Abertos + PNCP buscando contratações similares'). It details the composition (queries items from Dados Abertos, adds PNCP publications, deduplicates) and names the intended use case ('Insumo para mapear benchmarks de outros órgãos'). This distinguishes it from sibling contract-search tools that target single sources or specific phases.

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 explains the unique value proposition and the scenarios it serves (benchmarking against other agencies). It clarifies the scope of filters (CATMAT/CATSER applies only to the Dados Abertos leg, PNCP is best-effort) and how results are split. However, it does not explicitly contrast with alternative tools or state when not to use it, so it stops short of full when/when-not guidance.

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.

Resources