Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_uasg_consultar

Look up a specific UASG by its numeric code to retrieve name, CNPJ, and address, solving the need to verify unit details before running filtered procurement queries.

Instructions

Consulta uma UASG específica pelo código.

Devolve nome, sigla, CNPJ vinculado, órgão superior e endereço. Útil para resolver codigo_uasg antes de consultas filtradas.

✅ Restaurada em 2026-08-05 — ver compras_uasg_listar para o diagnóstico do 404 que afetava toda a família /modulo-uasg/*.

Busca primeiro entre as ativas; se não achar, repete entre as inativas (o upstream exige statusUasg e não aceita "ambas"), devolvendo ativa: false para UASGs extintas.

Cache 24h.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codigo_uasgYesCódigo numérico da UASG.

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 provided, the description fully carries the behavioral disclosure burden. It explains the search strategy (active first, then inactive), the 'ativa: false' output for extinct UASGs, the 24-hour cache, and a historical bug fix date, providing rich behavioral context.

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 multi-sentence but each sentence adds value: purpose, return data, use case, behavioral detail, cache. The historical bug note is slightly extraneous but relevant for context. It is well-structured and front-loaded with the core purpose.

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?

For a tool with one parameter, output schema present, and low complexity, the description is exceptionally complete: it covers return fields, search logic, caching, a bug reference, and a use case. The sibling link aids contextual understanding.

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?

The sole parameter 'codigo_uasg' is described in the schema as 'Código numérico da UASG.' The description adds 'consulta pelo código' and its utility for resolution, but does not provide additional semantics such as range, examples, or format beyond the schema. With 100% schema coverage, baseline 3 is appropriate.

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 verb ('consulta') and resource ('uma UASG específica pelo código'), lists the returned fields (nome, sigla, CNPJ, etc.), and distinguishes itself from siblings like compras_uasg_listar by specifying that it is a single-UASG lookup by code.

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 explicitly says it is useful for resolving 'codigo_uasg' before filtered queries, and directs to compras_uasg_listar for diagnosing a past 404 issue. It does not explicitly list when not to use, but the context implies alternative tools for listing or searching.

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