Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_comparar_periodos_contratacoes

Compare two procurement periods side by side for any modality and get absolute and percentage deltas. Detect shifts in contract counts or values, such as pre-election bid increases.

Instructions

Compara dois períodos lado a lado para a mesma modalidade.

Wrapper sobre compras_aggregate_contratacoes_por_periodo chamado duas vezes (granularidade='ano' implícita — soma todo o período em 1 bucket).

Retorna totais de A e B + delta absoluto + delta percentual.

Caso de uso típico: "Houve antecipação de licitações em Jun/2024 (ano eleitoral) comparado a Jun/2025?" Ou "As dispensas em Dez/2024 foram maiores que Dez/2023 no mesmo órgão?".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ufNoUF opcional.
esferaNoEsfera federativa. Requer métrica de valor (modo paginado).
label_aNoRótulo amigável do período A (ex.: 'Jun/2024').Periodo A
label_bNoRótulo amigável do período B (ex.: 'Jun/2025').Periodo B
metricaNoMétrica a comparar: 'count' (rápido) ou 'valor_estimado' / 'valor_homologado' (paginado).count
periodo_a_fimYesData final do período A (YYYY-MM-DD).
periodo_b_fimYesData final do período B (YYYY-MM-DD).
periodo_a_inicioYesData inicial do período A (YYYY-MM-DD).
periodo_b_inicioYesData inicial do período B (YYYY-MM-DD).
codigo_modalidadeYesModalidade PNCP a comparar. Comuns: 6=Pregão Eletrônico, 8=Dispensa, 4=Concorrência Eletrônica.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations provided, so description carries the burden. It discloses that granularity is implicitly yearly ('ano' implícita — soma todo o período em 1 bucket') and that metric 'count' is fast while 'valor_estimado'/'valor_homologado' require paginated mode. However, it does not specify pagination behavior, error conditions, auth requirements, or what happens if periods have no data. Acceptable but not thorough.

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?

Extremely concise: 6 well-structured short lines. First line states core purpose, second explains it's a wrapper, third defines output, fourth gives use-case examples. Every sentence earns its place. No redundancy.

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 has an output schema (handles return value documentation) and 100% parameter schema coverage, the description is relatively complete. It explains the wrapper logic, output structure, and use cases. Could still benefit from noting pagination behavior for value metrics or clarifying timezone handling, but overall adequate for a comparison wrapper.

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 schema already documents all 10 parameters. The description adds no specific parameter-level details beyond listing the metric options and implicitly relating periods to use cases. The schema descriptions are already clear, so the description adds marginal value—baseline 3 is appropriate.

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?

Clearly states it compares two periods side-by-side for the same modality, defines it as a wrapper over `compras_aggregate_contratacoes_por_periodo` called twice with implicit yearly granularity, and specifies output (totals, delta, percent delta). Distinguishes well from its underlying tool and from other comparison tools like `compras_indicadores_por_periodo`.

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?

Provides concrete use case examples ('Houve antecipação de licitações em Jun/2024...?') that illustrate when to use. Mentions it's a wrapper over another tool, hinting at underlying complexity. Lacks explicit 'when not to use' or comparison to sibling tools like `compras_indicadores_por_periodo`, but the examples and wrapper description give reasonable usage context.

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