Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_obter_prompt

Read-onlyIdempotent

Render a prompt script that guides AI agents through Brazilian procurement workflows, then follow its instructions to call the appropriate MCP tools.

Instructions

Renderiza um MCP Prompt e devolve o texto pronto.

O texto retornado é o conteúdo da PromptMessage[0] — tipicamente um roteiro que orienta o LLM a executar um fluxo usando as tools deste servidor. Depois de obter o texto, o LLM normalmente segue as instruções dele, chamando outras tools conforme indicado.

Retorno: { "nome": str, "texto": str, # conteúdo renderizado pronto para usar "argumentos_usados": dict, }

Se o prompt não existir ou faltar argumento obrigatório, retorna _erro com diagnóstico em vez de propagar exception.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nomeYesNome do prompt a renderizar. Use `compras_listar_prompts` para descobrir nomes disponíveis. Exemplos: `analisar_contratacao_pncp`, `dossie_due_diligence_fornecedor`, `oportunidades_carona_arp`.
argumentosNoMapa de argumentos exigidos pelo prompt. Os nomes e tipos vêm de `compras_listar_prompts`. Ex.: {"cnpj_orgao": "00394460000141", "ano": 2025, "sequencial": 12345}.

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

A4.2/5.0
Behavior4/5

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

With annotations already declaring readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, the description adds useful behavior beyond them: it specifies the exact return fields, notes that missing prompts or required arguments produce an '_erro' diagnostic, and states that exceptions are not propagated. No contradiction with annotations.

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 front-loaded with the core action, followed by a compact return contract in a code block and a terse error-handling note. It is slightly repetitive ('devolve o texto pronto' / 'conteúdo renderizado pronto para usar') but well-organized and appropriately sized.

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 a 2-parameter tool with 100% schema coverage, an output schema, and rich annotations, the description is complete: it covers return shape, error semantics, and the downstream workflow. Nothing an agent needs to invoke the tool correctly is missing.

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%, so the baseline is 3. The description only confirms that missing required arguments trigger the error path, while the schema already documents 'nome' and 'argumentos' with examples, types, and constraints.

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 opens with a specific verb-resource pair ('Renderiza um MCP Prompt e devolve o texto pronto') and further defines the output as the content of PromptMessage[0]. This clearly distinguishes the tool from siblings like compras_listar_prompts, which enumerate prompts rather than render them.

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 gives clear context: after obtaining the rendered text, the LLM normally follows its instructions and invokes other tools. It does not explicitly name alternatives or exclusions, but the parameter schema points to compras_listar_prompts for discovering prompt names, which provides sufficient routing guidance.

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