Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_montar_dossie_arp

Fetch a complete ARP dossier: header and, if an item is specified, its balance, adhesions, and participating units. Prevents silent null responses by validating the PNCP identifier format.

Instructions

Dossiê completo de uma ARP em uma chamada.

Composição: cabeçalho via /modulo-arp/1.1 (id PNCP) e — se numero_item informado — saldo (4), adesões (5) e unidades participantes (3) em paralelo. Os 3 últimos endpoints usam a chave composta numeroAta + unidadeGerenciadora.

Os 3 IDs vêm naturalmente do retorno de compras_arp_listar ou compras_arp_itens_listar (campos: numeroControlePncpAta, numeroAta, unidadeGerenciadora, numeroItem). Cache 10 min.

Quando numero_controle_pncp_ata vem no formato de compra (sem sufixo -NNNNNN), devolvemos diagnóstico explícito antes de bater no upstream — caminho que retornava cabecalho: null silencioso.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numero_ataYesNúmero simples da ata (ex.: '00001/2024'). Usado nos endpoints de saldo, adesões e unidades participantes.
numero_itemNoNúmero do item dentro da ata. Se informado, traz também saldo, adesões e unidades participantes daquele item. Se omitido, apenas o cabeçalho é consultado.
unidade_gerenciadoraYesCódigo UASG da unidade gerenciadora da ata.
numero_controle_pncp_ataYesIdentificador PNCP completo da **ata** (formato `cnpj14-1-sequencial/ano-NNNNNN`, com sufixo numerando a ata SRP dentro da compra). Ex.: `00394452000103-1-004729/2024-000006`. NÃO confundir com ID de compra (sem o sufixo). Retornado em `compras_arp_por_fim_vigencia` como `numeroControlePncpAta`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries full burden. It discloses a 10-minute cache, parallel execution of sub-endpoints, composite-key requirements, and a specific diagnostic handling when the input ID is a compra (without suffix) instead of an ata. This is strong behavioral disclosure.

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 compact yet information-dense, using a structured list-like format to enumerate the dossier composition. Every sentence provides relevant technical context, including cache and error behavior, with no wasted words.

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 an aggregator tool with an output schema, the description covers composition, optionality, input sourcing, cache, and error handling. It lacks explicit comparison to individual sibling endpoints but otherwise gives enough context for correct invocation.

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 coverage is 100%, so the baseline is 3. The description adds value by explaining the origin of the three IDs (from other ARP tools) and the composite key used by the sub-endpoints, going beyond the schema's field descriptions.

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 'Dossiê completo de uma ARP em uma chamada' and enumerates the composition: header plus optional saldo, adesões, and unidades participantes. This specific verb+resource+scope distinguishes it from sibling tools that handle individual components.

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 the tool composes multiple endpoints in parallel and that the IDs come from compras_arp_listar or compras_arp_itens_listar. It also notes that omitting numero_item restricts the call to the header, providing clear usage context. However, it does not explicitly state when to prefer this over individual item tools.

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