Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_contratos_consultar

Consult a contract from Brazilian Compras.gov.br open data using an internal purchase ID or a PNCP control number. Returns contract details.

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

Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses the 15-minute cache behavior and the dependency on two parameters even though 'codigo' is the only required one. It does not mention error behavior or rate limiting, but the cache note is valuable for expectation management.

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 extremely concise: three short lines covering purpose, upstream constraint, and caching. Every sentence adds unique value. No filler or repetition.

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 complexity (2 parameters, an output schema exists), the description is mostly complete for a simple contract lookup tool. It covers the key behavioral nuance (cache and parameter requirement) but could mention that the output schema documents the response structure, which is already covered by the output schema.

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 requirement for both parameters and giving context about accepted types, which goes beyond what the schema provides. It reinforces the relationship between codigo and tipo.

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 clearly states 'Consulta um contrato no Dados Abertos (endpoint 1.1)', specifying the verb (consulta), resource (contrato), and source system (Dados Abertos). It distinguishes from siblings like 'compras_contratos_listar' by indicating it queries a single contract via upstream endpoint.

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 that upstream requires 'codigo + tipo' and lists the accepted types, giving clear input guidance. However, it lacks explicit statements on when to use this tool versus siblings (e.g., when to use listar vs consultar) or when not to use it.

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