Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_comparar_periodos_contratacoes

Read-onlyIdempotent

Compare contract awards for a given modality between two periods, retrieving counts or monetary values and calculating absolute and percent differences to spot procurement spikes or declines.

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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.3.14

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false. The description adds valuable behavioral details beyond those annotations: implicit granularity='ano', aggregation into one bucket per period, and the specific outputs (totals A/B + absolute delta + percentage delta). No contradiction with annotations.

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 tight and well-structured: a one-sentence purpose, implementation note, output summary, and two illustrative use cases. Every sentence contributes information without redundancy or fluff.

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 rich input schema, an output schema, and comprehensive annotations, the description is complete enough for an agent to invoke the tool correctly. It explains the comparison semantics, the aggregation behavior, the return calculation, and gives realistic example queries, leaving no obvious selection or invocation gap.

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 all 10 parameters are documented. The description adds little parameter-specific meaning beyond what the schema already provides, except reinforcing that only one modality is compared and giving domain examples. This is the expected baseline when the schema does the heavy lifting.

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 uses a specific verb ('Compara') and states the resource and scope: comparing two periods side-by-side for the same modality. It also positions itself as a wrapper over a sibling tool, making its distinct role immediately clear relative to the large sibling list.

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 it is a wrapper over compras_aggregate_contratacoes_por_periodo called twice, which implies when the simpler aggregate would be used. It also gives concrete typical use-case questions. It lacks an explicit 'use sibling X instead when Y' exclusion, but the wrapper statement and examples provide clear selection 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