Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_catmat_buscar

Search CATMAT procurement items using textual terms or structural group/class filters to ensure accurate results even when upstream textual search fails.

Instructions

Busca itens CATMAT.

⚠️ Atenção upstream: o filtro textual descricao do Dados Abertos está ignorando o valor enviado e devolvendo o universo CATMAT inteiro (~340k itens, começando por arma de fogo) desde meados de 2026. Confirmado via probe direto. Os filtros estruturais (codigo_grupo, codigo_classe, codigo_pdm) continuam funcionando.

Workflow recomendado enquanto o filtro textual não voltar:

  1. compras_catmat_listar_grupos() → escolher o grupo (ex.: 71=Mobiliários).

  2. compras_catmat_listar_classes(codigo_grupo=71) → escolher a classe (ex.: 7110=Mobiliário para Escritório).

  3. compras_catmat_buscar(termo='cadeira', codigo_grupo=71, codigo_classe=7110) → o termo ainda é enviado (mantém compatibilidade), mas a redução real virá dos códigos estruturais.

Esta tool emite _aviso_filtro no payload quando detecta que o upstream devolveu o universo inteiro.

Cache 24h por (termo + filtros + página).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termoYesTermo de busca textual (descrição do material/serviço). Aceita fragmento — a API faz match parcial. Ex.: 'cadeira ergonomica'.
paginaNoPágina (1-based).
codigo_grupoNoFiltro estrutural por grupo CATMAT (1-99). **FORTEMENTE RECOMENDADO** porque o filtro textual upstream está quebrado (veja docstring). Obtenha o código em `compras_catmat_listar_grupos`.
codigo_classeNoFiltro estrutural por classe CATMAT (4 dígitos). Use em conjunto com `codigo_grupo` para focar a busca.
tamanho_paginaNoRegistros por página.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description carries full responsibility. It fully discloses the critical upstream bug (textual filter ignored, returning entire universe), confirms the behavior via probe, specifies that the `termo` parameter is still sent for compatibility but ineffective, mentions the emission of `_aviso_filtro` when the universe is returned, and notes 24-hour caching. This is exceptionally transparent.

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 front-loaded with the core purpose. It then uses a clear warning header, a bulleted workflow, and a concise note about behavior and caching. Every sentence is informative and necessary. No wasted words.

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 complexity (5 parameters, 1 required, output schema exists, 100% schema coverage), the description covers everything an agent needs: purpose, when to use, broken behavior, recommended approach, and caching policy. It is complete and self-contained.

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 baseline is 3. The description adds value by explaining the upstream bug and recommending structural filters strongly. It also clarifies that `termo` is still sent but not effective. These context-rich hints go beyond the schema's parameter descriptions, justifying a 4.

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 "Busca itens CATMAT." providing a clear verb+resource purpose. It also outlines a recommended workflow involving sibling tools (listar_grupos, listar_classes) to compensate for the broken textual filter, effectively distinguishing this search tool from listing and consultation tools.

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 explicitly recommends using structural filters (codigo_grupo, codigo_classe) instead of relying on the textual filter due to the upstream bug. It provides a step-by-step workflow using sibling tools to first obtain group and class codes, then use this tool with those filters. This is clear guidance on when and how to use the tool.

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