Skip to main content
Glama
pipaacebedo

seace-mcp

by pipaacebedo

Buscando contratos

buscar_contratos

Search published public procurement contracts in Peru's SEACE by year and filters like entity, supplier, contract number, or description, returning structured records and document links.

Instructions

Busca CONTRATOS PUBLICADOS en la API de contratos del SEACE. IMPORTANTE: la API no pagina y sin filtros trae el anio completo (~50k registros); pasa SIEMPRE un filtro acotador (texto, descripcion, proveedor, contrato, nomenclatura, expediente o entidad).

Args: anio: anio del contrato (OBLIGATORIO; ej '2026'). texto: palabra libre filtrada server-side (la mas efectiva; ej 'tuberia'). entidad: nombre o RUC de la entidad contratante. descripcion: texto dentro de la descripcion del contrato. proveedor: nombre o RUC del proveedor o consorcio. contrato: numero del contrato. proyecto: texto del proyecto de inversion. expediente: id del expediente (idExpediente de otro resultado). nomenclatura: nomenclatura del proceso (ej 'LP-SM-13-2025-SEDAPAL-1'). depa: departamento ('0' = todos). objeto: '0' todos, '62' Bien, '63' Consultoria, '64' Obra, '65' Servicio. cod_seleccion: codigo del tipo de seleccion (listar_filtros(categoria='tipos_contrato')). desde: fecha inicial de suscripcion dd/mm/aaaa. hasta: fecha final de suscripcion dd/mm/aaaa. maximo: filas a devolver (1..300).

Devuelve: {'ok', 'total_recibidos', 'mostrados', 'contratos': [{id_contrato, numero_contrato, descripcion, nomenclatura, id_expediente, entidad, ruc_entidad, contratista, ruc_contratista, consorcio, monto, monto_presupuesto, moneda, anio, fecha_suscripcion, fecha_inicio, fecha_fin, objeto, objeto_codigo, estado, id_documento}]}. Con 'id_documento' usa url_documento_contrato.

Input Schema

NameRequiredDescriptionDefault
anioYes
depaNo
desdeNo
hastaNo
textoNo
maximoNo
objetoNo
entidadNo
contratoNo
proyectoNo
proveedorNo
expedienteNo
descripcionNo
nomenclaturaNo
cod_seleccionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well, disclosing the critical non-obvious trait that the API does not paginate and returns the full year (~50k records) without filters, plus the maximo cap of 1..300. It also documents the full return shape and routes the caller onward via id_documento to url_documento_contrato.

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?

Front-loads the purpose and the pagination warning before the argument list and return shape, and every line of the Args/Devuelve blocks is load-bearing given 15 undocumented parameters. It is long, but the length is justified rather than padded.

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 15-parameter, filter-heavy search tool with no output schema and no annotations, the description covers purpose, mandatory filtering behavior, all parameter semantics, and the return structure, including the cross-tool handoff for id_documento. Nothing essential an agent needs before calling it is missing.

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?

Schema description coverage is 0%, so the description must compensate, and it does: every one of the 15 parameters gets meaning, including enum semantics for 'objeto' (0/62/63/64/65), date format hints (dd/mm/aaaa) for desde/hasta, format examples ('LP-SM-13-2025-SEDAPAL-1'), and how to source cod_seleccion. This is far beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Busca CONTRATOS PUBLICADOS en la API de contratos del SEACE'), so the agent knows it searches published contracts. However it does not explicitly differentiate itself from close siblings like detalles_contratos, detalle_contrato, or contratos_expediente; that separation is only implied.

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?

Gives strong operational context: the API does not paginate, an unfiltered call returns ~50k records, and a narrowing filter should always be passed, with 'texto' flagged as most effective. It also points to listar_filtros(categoria='tipos_contrato') for cod_seleccion values. It lacks explicit when-to-use-vs-alternative sibling routing, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.