Skip to main content
Glama

Buscando dispositivos

buscar_dispositivos

Search Peru's Official Gazette for legal devices and booklets using free-text queries, date ranges, sector, and publication type, returning unique matches and PDF links.

Instructions

Busca dispositivos y cuadernillos en El Peruano.

Args: consulta: texto libre; frases exactas entre comillas dobles, ej: '"prescripcion adquisitiva de dominio"'. El sitio combina palabras por coincidencia de texto y no garantiza un AND estricto entre todas. cuadernillo: sigla del tipo de publicacion (ver listar_tipos_publicacion): NL, BO, EX, PC, DJ, JU, SE, CA, IN, TU. Opcional. sector: post-filtro por subcadena sobre el campo sector de los resultados obtenidos (ej: "salud"). NO filtra todo el corpus: solo la pagina(s) de resultados actual. fecha: dia puntual YYYYMMDD. fecha_ini, fecha_fin: rango de fechas YYYYMMDD. start: desplazamiento de resultados (pagina N -> start = N*20). paginas: paginas consecutivas a traer en una sola llamada (1 = 20 resultados).

Nota de latencia: sin filtro de cuadernillo, el sitio puede tardar 10-40 s en generar la respuesta (con filtro NL/BO es mas rapido). El sitio pagina por coincidencias de texto y puede repetir dispositivos entre paginas: usa paginas (deduplica internamente) en lugar de start manual.

Devuelve: coincidencias_texto: contador del sitio (coincidencias de texto, no dispositivos unicos). dispositivos_unicos: cantidad de dispositivos individuales devueltos. ms: duracion de la llamada en milisegundos. data: dispositivos con pagina individual (sector, tipo, numero, fecha, titulo, url). cuadernillos_con_coincidencias: cuando las coincidencias caen en cuadernillos SIN pagina individual (PC/DJ/JU/CA/IN/TU) el resultado son cuadernillos (compacto): codigo, fecha, paginas y pdf_url; el texto integral esta en el PDF. siguiente_start: start para la proxima pagina, si hay mas. cacheado: true si la respuesta vino de la cache de resultados. sin_resultados_motivo + nota: cuando no hay resultados, con la causa y sugerencias.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fechaNo
startNo
sectorNo
paginasNo
consultaNo
fecha_finNo
fecha_iniNo
cuadernilloNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries full burden and does so well: it discloses the 10-40s latency without a cuadernillo filter, cross-page duplicate results, internal deduplication, caching via `cacheado`, and a structured no-results path (`sin_resultados_motivo` + `nota`). It omits auth/rate-limit context, but the operational behavior is unusually well disclosed.

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-loaded purpose followed by clearly headed Args and Devuelve blocks, so an agent can scan to the relevant field. It is long, but for an 8-parameter tool with zero schema documentation every section earns its place; only marginal tightening is possible.

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?

No output schema and no annotations exist, so the description must carry everything, and it does: it enumerates return fields (coincidencias_texto vs dispositivos_unicos, data, cuadernillos_con_coincidencias, siguiente_start, cacheado, sin_resultados_motivo), explains the compact-cuadernillo case, and covers pagination and latency. Nothing needed to call it correctly 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 coverage is 0%, so the description must compensate for all 8 parameters and it does: `consulta` explains quoting for exact phrases and non-strict AND, `cuadernillo` lists valid siglas and points to listar_tipos_publicacion, `sector` clarifies substring post-filtering scope, `start` gives the page-to-offset formula, and `paginas` explains batching and dedup. This is exemplary coverage of otherwise undocumented parameters.

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 dispositivos y cuadernillos en El Peruano"), immediately telling the agent what corpus is searched. It references one sibling (listar_tipos_publicacion) as a lookup aid, but never disambiguates itself from buscar_por_op or the obtener_* tools, so routing is only partially enabled.

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

Usage Guidelines3/5

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

Gives concrete in-tool guidance (use `paginas` instead of manual `start` due to duplicate devices, `sector` is only a post-filter on the current page), which is genuinely useful. However, it never states when to choose this tool over buscar_por_op or when the obtener_* tools are the right follow-up, so alternative selection is left to inference.

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