Skip to main content
Glama

Buscando con filtros avanzados

busqueda_avanzada

Search Peruvian Constitutional Court rulings from two merged inventories using full-text, case number, parties, dates, chamber, district, and keyword filters; returns deduplicated results.

Instructions

Busqueda AVANZADA del TC: texto, expediente, partes, fecha o RANGO, sentido, distrito, sala, tipo y palabras claves por id. COMBINA los dos inventarios del TC en una vista unica: los filtros aplican a ambos cuando tienen equivalente (expediente, partes, año de publicacion, tipo de proceso) y al inventario sistematizado cuando son avanzados (sentido, distrito, sala, palabras).

Args: search: texto completo (server quita tildes). Si se pasa, el inventario historico se consulta SOLO por texto (su motor no acepta otras combinaciones con texto) y 'modo' define su semantica. numero_expediente: ej '00148-2026-HC'. nombre_demandante: nombre EXACTO de la parte (ej 'Fernando Catalan Contreras'). nombre_demandado: nombre EXACTO de la entidad demandada. fecha_publicacion: 'YYYY-MM-DD' o RANGO con comas ('2020-01-01,2020-12-31'). VERIFICADO: una fecha EXACTA opera como el ANIO COMPLETO (el backend la degrada); para un dia exacto usa rango '2020-01-01,2020-01-01'. sentencia_sentido: id o nombre EXACTO ('Improcedente', 'Fundada en parte'; catalogo listar_filtros categoria='sentidos'). Solo aplica al inventario sistematizado. id_sentencia_distrito: id o nombre ('Lima'; servir listar_filtros categoria='distritos'). Solo aplica a la sistematizacion. id_sentencia_sala: id o nombre ('Sala 1'; categoria='salas'). Solo sistematizacion. id_sentencia_tipo: id o nombre ('Sentencia'; categoria='tipo'). Solo sistematizacion. palabras: ids (o nombres exactos) del catalogo de palabras (listar_palabras), separados por coma ('1,3'). Solo sistematizacion. proceso: tipo de proceso del inventario historico ('Amparo', 'Habeas Corpus', 'Cumplimiento', 'Inconstitucionalidad', 'Conflicto de Competencia', 'Habeas Data', 'Queja'; catalogo listar_filtros categoria='procesos'). Se ignora si 'search' esta presente. modo: 'todas' | 'algunas' | 'frase' (para el texto en el inventario historico; default 'todas'). page: pagina 1-based (sin cap practico en la sistematizacion; el inventario historico no pasa de 1000 paginas).

Devuelve: {'ok', 'total' (suma de inventarios), 'pagina', 'tamano_pagina' (variable), 'paginas', 'siguiente_pagina', 'filas': [{index GLOBAL, slug, numero_expediente, numero_sentencia, demandante, demandado, fecha_publicacion, fecha_sentencia?, fecha_ingreso?, sentido?, tipo?, distrito?, sala?, sistematizacion?, tesaurio?, tipo_resolucion?, url_pdf, texto? (inventario historico: sin 'extracto')}], 'ms', 'nota'?}: bloque con filas de la sistematizacion primero y del inventario historico despues; dups omitidos ('nota').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modoNo
pageNo
searchNo
procesoNo
palabrasNo
nombre_demandadoNo
fecha_publicacionNo
id_sentencia_salaNo
id_sentencia_tipoNo
nombre_demandanteNo
numero_expedienteNo
sentencia_sentidoNo
id_sentencia_distritoNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.3/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 behavioral burden and does so well: it discloses that the server strips accents, that the historic inventory can only be queried by text when 'search' is present (its engine rejects other text combinations), that an EXACT fecha_publicacion is silently degraded to the whole year (with the range workaround), that the historic inventory caps at 1000 pages, and that duplicate rows are dropped with a 'nota'. These are exactly the non-obvious traits an agent needs.

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 with a two-sentence summary of scope and inventory-merging before the parameter list, and the Args section is dense but well organized. The main cost is the lengthy 'Devuelve' block spelling out the return payload, which duplicates information already carried by the output schema and could be trimmed.

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 13-parameter merge tool with zero annotation and zero schema-description coverage, the description supplies everything an agent needs: filter applicability per inventory, format rules, catalog references, pagination limits, dedup behavior, and response shape. Nothing material for correct invocation 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 for all 13 parameters, and it does: every argument gets format, example, catalog source, and applicability scope (e.g. '00148-2026-HC' for expediente, comma ranges for fecha_publicacion, exact names for demandante/demandado, 'todas'|'algunas'|'frase' for modo, 1-based page). This meaning is entirely absent from the schema and is fully supplied here.

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: an AVANZADA search of the TC that merges the two inventories into a single unified view, with filters applying to both when equivalents exist. The scope is concrete and an agent can picture the operation. It does not distinguish itself from near-siblings such as buscar_sentencias, so it stops short of a 5.

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?

The description explains in detail which filters apply to which inventory (both when equivalent, sistematizacion-only when advanced) and notes that 'proceso' is ignored when 'search' is present, which is genuine conditional guidance. However, it never states when to choose this tool over the sibling tools (buscar_sentencias, resultados_sistematizacion, etc.); it only routes to the catalog helpers listar_filtros and listar_palabras for id values. Tool-selection guidance is implied rather than explicit.

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