Skip to main content
Glama
opedrosoares

MCP Compras.gov.br

by opedrosoares

compras_pncp_contratacao_arquivos

Read-onlyIdempotent

Lists attached files of a PNCP procurement contract, returning direct download URLs for PDF/ZIP documents such as edital and termo de referência.

Instructions

Lista os ARQUIVOS anexos de uma contratação no PNCP (Edital, TR, ETP...).

Endpoint /v1/orgaos/{cnpj}/compras/{ano}/{sequencial}/arquivos da API pública de arquivos do PNCP (host /api/pncp, sem chave — diferente de /api/consulta, que exige chave-api-dadosabertos e não expõe anexos).

Cada item traz url (download direto do PDF/ZIP), sequencialDocumento, titulo, tipoDocumentoNome (Edital, Termo de Referência, Projeto Básico, Estudo Técnico Preliminar...). Atenção: o arquivo do Edital vem frequentemente como ZIP (por vezes ZIP dentro de ZIP) contendo o TR. Baixe com GET simples na url — não é necessário navegador.

Cache 15 min.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anoYesAno da contratação (4 dígitos).
cnpjYesCNPJ do órgão (14 dígitos, com ou sem pontuação).
sequencialYesSequencial da contratação, SEM zeros à esquerda (ex.: 2101, não 002101).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.17

TDQS

A5/5.0
Behavior5/5

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

The description adds behavioral details beyond annotations: explains it's public (no key), describes the download of files via simple GET, and warns about frequent ZIP (sometimes nested) formats. This complements the readOnly/idempotent hints.

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 well-structured and dense: endpoint, contrast with sibling, output fields, download note, and cache. Every sentence adds meaningful information without redundancy.

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 the output schema exists, the description appropriately summarizes output fields and adds critical operational context (ZIP handling, download method, cache). It is complete for an agent to call correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of parameters with clear descriptions. The description additionally clarifies the 'sequencial' parameter format (no leading zeros), which is valuable and not present in the schema.

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 lists attached files of a contracting process in PNCP, with a specific endpoint. It also distinguishes this public endpoint from the authenticated /api/consulta that doesn't expose attachments.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit usage guidance: it contrasts with the authenticated endpoint, explains the ZI/PDF download process, notes the file types included, and mentions the 15-minute cache. This helps the agent decide when and how 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