Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_arp_saldo_item

Check the remaining balance per item in a Brazilian government procurement agreement (ARP). Aggregates registered, committed, and available quantities by item to determine if a valid balance exists for adherence.

Instructions

Devolve o saldo (quantidade ainda disponível) por item da ARP.

Endpoint Dados Abertos /modulo-arp/4_consultarEmpenhosSaldoItem. Crítico para adesão: a ata pode estar vigente mas com saldo zerado. Sem saldo, não há como aderir.

Estrutura do payload: o upstream retorna 1 linha por (numeroItem, unidade, tipo) — onde tipo pode ser GERENCIADORA, PARTICIPANTE etc. O mesmo numeroItem aparece várias vezes quando há múltiplas unidades alocadas (carona ou rateio). Não é duplicação — são alocações distintas dentro da mesma ata.

Para evitar confusão (achado bateria A v0.3.5), além do resultado cru, anexamos resumo_por_item: dicionário agregando por numeroItem com soma das quantidades registradas/empenhadas e saldo total — pronto para decisão de adesão.

Cache 15 min (saldo muda ao longo do dia).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paginaNoPágina de resultados (1-based). Padrão 1.
numero_ataYesNúmero simples da ata (ex.: '00001/2024').
tamanho_paginaNoQuantidade de registros por página. Padrão 50, máximo 500.
unidade_gerenciadoraYesCódigo da UASG gerenciadora da ata.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations were provided, so the description carries full burden. It discloses the upstream endpoint, the one-row-per-combination structure, the non-duplicative nature of multiple rows per numeroItem, the inclusion of a resumo_por_item aggregated dict, a cache duration of 15 minutes, and a mention of a bug fix. This is comprehensive behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with bolded key terms, bullet points, and clear sections. It is informative without being overly verbose. Each sentence adds value, including the bug fix note and cache info. Slightly more concise than typical, but still thorough.

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 that an output schema exists, the description does not need to detail return values. It explains the data model, aggregation, critical usage scenario, and cache behavior. This provides complete context for an agent to use the tool correctly. No gaps identified.

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% with all parameters documented. The description does not add significant extra meaning beyond the schema—it mentions the required parameters but doesn't elaborate on their semantics or usage. The baseline of 3 is appropriate as the schema already handles parameter description adequately.

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 the tool returns the balance (quantidade ainda disponível) per item of an ARP. It specifies the endpoint and distinguishes from sibling ARP tools by focusing on 'saldo', which is a distinct concept from listing, consulting, or other operations.

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 provides explicit context: 'Crítico para adesão: a ata pode estar vigente mas com saldo zerado. Sem saldo, não há como aderir.' This tells when to use the tool. It also explains the data structure and cache behavior. However, it does not directly name alternative tools for different scenarios, though the sibling set is large and the purpose is clear enough.

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