Skip to main content
Glama
pipaacebedo

seace-mcp

by pipaacebedo

buscar_contratos

Search Peru SEACE published public contracts by year plus filters like text, entity, provider, contract number, or dates. Always narrow results because the API returns the full year otherwise.

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

TableJSON 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.3/5.0
Behavior4/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 well: it discloses the non-pagination gotcha, the ~50k-row default volume, server-side filtering, and the row cap (1..300). It stops short of auth requirements, rate limits, or error behavior, so it is strong but not complete.

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 critical warning is front-loaded in caps, followed by clean Args and Devuelve sections. It is long, but the length is justified by 15 undocumented parameters and the absence of an output schema; little is redundant.

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 tool with no annotations and no output schema, the definition covers parameters, return shape, volume/pagination behavior, and cross-tool routing. An agent has everything needed to invoke it 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?

Schema coverage is 0% and the description compensates fully, documenting all 15 parameters: required 'anio', the effectiveness ranking of 'texto', name-or-RUC semantics for entidad/proveedor, the objeto code map ('62' Bien, '63' Consultoria, '64' Obra, '65' Servicio), 'depa' '0'=todos, dd/mm/aaaa date formats, and the maximo 1..300 bound.

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+resource with scope: 'Busca CONTRATOS PUBLICADOS en la API de contratos del SEACE.' An agent can tell this is a search tool for published contracts, distinct from detail-oriented siblings like detalle_contrato or detalles_contratos, though those siblings are not named explicitly.

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 clear operating context: the API does not paginate and unfiltered calls return the whole year (~50k records), so a narrowing filter should ALWAYS be passed, with 'texto' flagged as most effective. It also routes to sibling tools (listar_filtros for cod_seleccion, url_documento_contrato for id_documento), but does not state when to prefer whole-tool alternatives like buscar_procesos.

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