Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_pesquisar_precos_para_etp

Aggregate unit prices from government procurement records using IN SEGES/ME 65/2021 methodology, calculating median, mean, quartiles, and outlier-free sample for ETP (Term of Reference).

Instructions

Agrega preços praticados aplicando metodologia IN SEGES/ME 65/2021.

Composição: percorre compras_pesquisar_preco_material ou _servico em até max_paginas, agrega os valores unitários e calcula: mediana, média, desvio padrão, mínimo, máximo, quartis (Q1, Q3) e descarte de outliers por IQR (1.5×IQR — Tukey).

Saída pronta para colagem em ETP: lista detalhada + sumário estatístico

  • amostra recomendada (sem outliers). Cache 10 min.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ufNoFiltro opcional por UF (ex.: 'DF').
tipoYesTipo do item: 'material' (consulta CATMAT) ou 'servico' (consulta CATSER).
max_paginasNoNúmero máximo de páginas a percorrer ao agregar. Cada página tem 500 registros. Default 5 (até 2500 contratações). Aumente para amostras maiores.
periodo_mesesNoJanela de pesquisa em meses contados de hoje para trás. Default 12 (prazo recomendado pela IN SEGES/ME 65/2021 art. 5).
codigo_item_catalogoYesCódigo CATMAT (material) ou CATSER (serviço).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries full behavioral burden. It transparently explains the methodology (IQR outlier discard, Tukey), the calculation results (median, mean, quartiles, etc.), cache duration (10 min), and the output readiness for ETP. However, it does not disclose whether the tool is read-only or destructive, nor does it mention any required permissions or side effects. The absence of annotations makes this a 'satisfactory' but not 'excellent' disclosure.

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 concise (three short paragraphs) and front-loaded with the core purpose and methodology. Every sentence adds value: methodology, composition, calculations, and output format. The only minor inefficiency is the mix of Portuguese and English terms (e.g., 'Cache 10 min') but this is not a structural flaw.

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 (5 parameters, aggregation logic, statistical calculations), the description covers the main behavioral aspects: methodology, composition, cache, and output readiness. An output schema exists, so the description does not need to explain return values. The description is largely complete, though it could mention that the 'uf' parameter is optional and its effect on results.

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 coverage is 100%, so the baseline is 3. The description adds meaning by clarifying the max_paginas default (5 pages = 2500 contracts) and the periodo_meses default (12 months recommended by IN SEGES/ME 65/2021). However, the description does not elaborate on 'tipo', 'uf', or 'codigo_item_catalogo' beyond what the schema already says. Overall, the description adds marginal value over the 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 provides a specific verb ('Agrega preços praticados aplicando metodologia'), clearly identifies the resource (prices for ETP preparation), and explains the composition by aggregating results from two sibling tools ('compras_pesquisar_preco_material' or '_servico'). This distinguishes it well from its siblings, as it focuses on statistical aggregation for ETP, not raw price queries.

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 implies when to use this tool (for ETP price aggregation using IN SEGES/ME 65/2021 methodology) but lacks explicit guidance on when NOT to use it or what alternatives to choose. It references underlying tools but does not clarify when to call those directly instead. The sibling list includes many price-related tools, but no exclusions or conditions are stated.

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