Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_contratos_consultar

Read-onlyIdempotent

Fetch contract data from Compras.gov.br open data using a purchase ID or PNCP contract control number. Supports idCompra and numeroControlePncpContrato types for flexible queries.

Instructions

Consulta um contrato no Dados Abertos (endpoint 1.1).

O upstream exige codigo + tipo. Tipos aceitos pela API: idCompra e numeroControlePncpContrato.

Cache 15 min.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tipoNoComo interpretar `codigo`: 'idCompra' (id interno da compra) ou 'numeroControlePncpContrato' (identificador PNCP).numeroControlePncpContrato
codigoYesIdentificador do contrato no upstream — interpretação depende de `tipo`. Para tipo='idCompra' é o id da compra (string numérica). Para tipo='numeroControlePncpContrato' é o número de controle PNCP completo (ex.: '00000000000000-1-000001/2024').

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

A3.9/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior. The description adds useful non-obvious context: the upstream requires both codigo and tipo, and responses are cached for 15 minutes. No contradiction with the 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 definition is compact and front-loaded: purpose first, then the critical parameter requirement, then the cache behavior. Every sentence earns its place with no filler.

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?

For a two-parameter, read-only lookup with full schema coverage and an output schema, the description covers purpose, required parameter pairing, accepted tipos, and caching. It could be more complete by explaining the Dados Abertos endpoint context or routing versus sibling consult tools, but nothing essential to calling it correctly is missing.

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?

The schema already fully documents both parameters, including the enum and default. The description adds value by warning that the upstream requires codigo + tipo despite tipo having a schema default, and by clarifying that the accepted type values change how codigo is interpreted.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names the action ('consulta') and the object ('um contrato') and scopes it to 'Dados Abertos (endpoint 1.1)'. This is specific enough to separate it from list and mutation tools, though it does not explicitly contrast with sibling contract-consulting tools like compras_contrato_comprasnet_consultar.

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 the tool applies: looking up a contract in Dados Abertos endpoint 1.1. It provides the upstream's required parameter combination and accepted tipos, but it does not state when to prefer this tool over sibling contract-consulting tools or call out exclusions.

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