spij-mcp
This MCP server lets you search and read Peruvian legal norms and jurisprudence from the SPIJ through MCP tools.
List exact SPIJ filter values: dispositivos, agrupaciones, tomos, materias, and sectores.
Search legal norms full-text with filters for sumilla, dispositivo, sector, agrupación, número, and publication dates.
Search jurisprudence (TC, courts, precedents, sentencias), including local filtering by organismo emisor.
Map a norm’s structure with header/article offsets.
Search inside a specific norm for words or phrases and get occurrences with context and offsets.
Read metadata and plain text of a norm by ID, using offsets or tail reading for long documents.
Retrieve guaranteed full text, including subscriber-only jurisprudence, with progressive range reading.
Paginate and navigate results via IDs, URLs, offsets, suggestions, and next-page indicators.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@spij-mcpbusca normas sobre protección de datos personales en Perú"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Sistema Peruano de Información jurídica - SPIJ (Conector MCP No oficial)

Servidor MCP local para buscar y leer el SPIJ — Sistema Peruano de Información Jurídica (normas legales, resoluciones, jurisprudencia del Tribunal Constitucional y más) — desde tu harness MCP.
Herramienta no oficial: sin afiliación con MINJUS ni con el SPIJ.
Aspecto | Detalle |
Fuente de datos | spij.minjus.gob.pe (público) |
Autenticación | Implícita: usa la misma sesión pública del sitio web y se renueva sola (JWT de 24 h) |
Almacenamiento | Ninguno — el servidor nunca guarda archivos; devuelve contenido limpio |
Transporte | stdio (Claude Desktop, Claude Code, agentes compatibles con MCP) |
Instalación
Opción A — Un click (sin terminal)
Descarga
spij-mcp-0.6.2.mcpbdesde Releases.Abre Claude Desktop → Ajustes → Extensiones → Instalar desde archivo.
Selecciona el
.mcpby listo.
No requiere Python instalado: el instalador resuelve el runtime y las dependencias automáticamente (runtime UV de MCPB).
Opción B — Manual (CLI y otros agentes)
Primero instala uv si no lo tienes:
# Windows (PowerShell)
irm https://astral.sh/uv/install.ps1 | iex# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh(o pip install uv si prefieres).
Luego, en la carpeta del proyecto:
uv syncY añade a la configuración de servidores MCP de tu agente:
{
"mcpServers": {
"spij": {
"command": "uv",
"args": ["--directory", "RUTA/spij-mcp-OSS", "run", "spij-mcp", "serve"]
}
}
}El servidor envía sus instrucciones de uso por el handshake MCP: el agente sabe cómo buscar y leer sin prompts adicionales.
Related MCP server: mcp-abogadoenquilmes
Actualizaciones
El servidor se auto-chequea en cada arranque: si publicamos una versión más nueva que la tuya, tu agente verá el aviso
UPDATE DISPONIBLEy te pedirá descargarspij-mcp.mcpbde Releases e instalarlo de nuevo (arrástralo como la primera vez). Se desactiva conSPIJ_UPDATE_CHECK=0.Cada versión reemplaza el mismo archivo (
spij-mcp.mcpb): la página de Releases siempre muestra una sola tarjeta con la última.
Tools
Tool | Qué hace |
| Búsqueda full-text con filtros (dispositivo, sector, agrupación, número, fechas) y paginación |
| Igual, para jurisprudencia; |
| Índice de encabezados de una norma (TÍTULO, CAPÍTULO, Artículo N.) con offsets navegables |
| Salta a las ocurrencias de una palabra o frase dentro de una norma |
| Metadatos + texto plano de una norma por |
| Texto completo garantizado, incluido el acervo de suscriptores |
| Valores exactos para los filtros (dispositivos, sectores, tomos, materias, agrupaciones) |
Cómo se lee (4 niveles)
Descubrir —
buscar_normas/buscar_jurisprudencia: cada resultado traeid,url_webysumilla.Mapear —
estructura_norma(id): índice de encabezados con offsets.Saltar —
buscar_en_norma(id, texto): ocurrencias con offsets.Leer —
texto_completo(id, offset, max_chars): lectura por rangos;desde_final=Truelee la decisión de una sentencia directo.
Los offsets son consistentes entre tools: se puede empezar a leer justo donde interesa sin traer textos completos de más.
Notas de uso
El buscador del SPIJ hace AND implícito con todas las palabras y no acepta comillas ni operadores OR/NOT. Acepta comodines de Lucene (
presupuest*).Si una búsqueda da 0 resultados, la respuesta incluye
sugerenciascon conteos de consultas más cortas; si un número de norma no está indexado, la respuesta trae los documentos que lo mencionan.Los textos legales pueden ser extensos: la lectura progresiva (offsets) evita llenar el contexto con lo que no se necesita.
Pruebas de concepto del servicio
El SPIJ es un servicio público de MINJUS. Este cliente lo consulta como lo hace su propia interfaz web, sin abuso: cache local, concurrencia limitada y re-autenticación automática.
Aviso legal
Proyecto independiente, no oficial, sin relación con MINJUS, el SPIJ ni ninguna entidad del Estado peruano.
Sin garantía de disponibilidad del servicio upstream ni de exactitud de los textos; para uso jurídico serio, verifica siempre en la fuente oficial.
La autoría normativa pertenece al Estado Peruano.
Licencia
Available Tools
7 toolsbuscar_en_normaBuscando dentro de la normaA
Busca una palabra o frase DENTRO del texto completo de una norma del SPIJ, y devuelve cada ocurrencia con su offset (para leer alrededor con texto_completo(id, offset=X, max_chars=N)). Ideal para saltar a secciones concretas (ej 'RATIFICAN', 'Artículo 8', 'DISPOSICIONES FINALES') sin leer todo el texto. La busqueda ignora acentos y mayusculas.
Args: id: identificador del SPIJ, ej 'H1385488'. texto: palabra o frase a buscar dentro de la norma (1-8 palabras). contexto: caracteres de contexto alrededor de cada ocurrencia (50-500, default 200). max_matches: maximo de ocurrencias a devolver (1-25, default 10).
Devuelve: ok, id, url_web, total_caracteres, matches: lista de {offset, extracto}, hay_mas (si quedan ocurrencias).
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| texto | Yes | ||
| contexto | No | ||
| max_matches | No |
TDQS
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 that search ignores accents and capitalization, that offsets enable targeted reading, and that hay_mas signals truncation. It does not mention access/permission requirements or result-size limits beyond max_matches, but for a read-only lookup this is solid disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well front-loaded: purpose and usage come first, followed by Args and Devuelve blocks. The text is longer than average but nearly every line carries usable information; the Args/Devuelve headers make it scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, yet the description enumerates the return shape (ok, id, url_web, total_caracteres, matches[].{offset, extracto}, hay_mas), so an agent can chain calls to texto_completo without guessing. Combined with full parameter documentation, nothing essential is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description fully compensates: it documents all four parameters with meaning, accepted ranges and defaults (contexto 50-500 default 200; max_matches 1-25 default 10), the id format example ('H1385488'), and that texto is 1-8 words.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource+scope: search a word/phrase DENTRO del texto completo de una norma (not across norms), returning each occurrence with its offset. It is clearly distinguishable from siblings such as buscar_normas (search across norms) and buscar_jurisprudencia.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives an explicit use case and workflow: 'Ideal para saltar a secciones concretas... sin leer todo el texto', and names the companion tool texto_completo(id, offset=X, max_chars=N) for reading around a hit. It lacks an explicit when-not statement (e.g. use buscar_normas when you don't know the id), which keeps it from a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
buscar_jurisprudenciaBuscando jurisprudenciaA
Busca jurisprudencia en el SPIJ (TC, cortes, precedentes, sentencias).
Args: consulta: texto libre (AND implicito, sin comillas ni OR; comodin * ok). Empieza con 1-2 palabras. tomo: tomo de jurisprudencia, ej 'TRIBUNAL CONSTITUCIONAL'. OJO: se envia al SPIJ pero el indice NO lo aplica (verificado: los totales son identicos con y sin tomo) - filtra con la consulta y/o fechas. materia: especialidad dentro del tomo, ej 'JURISPRUDENCIA ADMINISTRATIVA' del tomo del TC. Ver listar_filtros(categoria='materias'). organismo: filtra LOCALMENTE por organismo emisor, ej 'TC', 'CORTE SUPREMA', 'OSIPTEL', 'CGD' (coincide contra codigo/sector/dispositivo, sin acentos). El servidor escanea hasta 5 paginas del SPIJ y devuelve solo los coincidentes (con 'filtrados' y 'escaneadas'). Es la via correcta: el indice no filtra por tomo. numero: numero de expediente o codigo, ej '03209-2024-PA/TC' (expediente completo del TC funciona). fecha_ini / fecha_fin: rango de publicacion AAAA-MM-DD. orden: '1' = fecha (default), '2'/'3'/'4' = relevancia. start / paginas: igual que buscar_normas (por cada pagina devuelta el servidor puede escanear varias internamente). sumilla_chars: maximo de caracteres de la sumilla por documento (0 = sin limite).
Devuelve: ok, total (del indice), organismo, escaneadas (paginas escaneadas), filtrados (coincidencias encontradas), normas, siguiente_start (si quedan paginas por escanear). Si la consulta base arroja 0 resultados incluye 'sugerencias'; si el indice arroja resultados pero ninguno del organismo pedido, incluye 'organismos_disponibles' (los organismos presentes en lo escaneado). El texto se obtiene con detalle_norma(id) o texto_completo(id).
| Name | Required | Description | Default |
|---|---|---|---|
| tomo | No | ||
| orden | No | 1 | |
| start | No | ||
| numero | No | ||
| materia | No | ||
| paginas | No | ||
| consulta | No | ||
| fecha_fin | No | ||
| fecha_ini | No | ||
| organismo | No | ||
| sumilla_chars | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations this description carries the full burden, and it delivers: it discloses that the SPIJ index ignores 'tomo' (verified), that 'organismo' filters locally by scanning up to 5 pages, that internal page scanning happens per returned page, and the fallback fields ('sugerencias', 'organismos_disponibles'). That is unusually rich behavioral disclosure about partial results and limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the purpose then organizes the rest into clear Args/Devuelve blocks, and nearly every line conveys actionable information (param syntax, verified limitation, return fields). It is long, but the length is justified by 11 undocumented parameters, keeping it dense rather than padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the Devuelve block explains the return shape (ok, total, organismo, escaneadas, filtrados, siguiente_start, and conditional sugerencias/organismos_disponibles) and points to detalle_norma/texto_completo for full text. Combined with per-parameter guidance, an agent has everything needed to invoke and interpret this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across 11 parameters, so the description must compensate – and it near-fully does. Every parameter is documented: consulta query syntax (implicit AND, no OR/quotes, '*' wildcard, start with 1-2 words), tomo, materia, organismo matching behavior, numero format, date range format, orden codes, start/paginas, and sumilla_chars limit semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Busca jurisprudencia en el SPIJ') and the parenthetical '(TC, cortes, precedentes, sentencias)' scopes exactly what kinds of documents are returned. This cleanly separates it from the norms-oriented siblings such as buscar_normas and buscar_en_norma.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives strong operational guidance: warns that 'tomo' is sent but NOT applied at index level, and explicitly calls 'organismo' 'la via correcta' for filtering, plus routes to listar_filtros for materias values. It lacks an explicit statement of when to prefer this tool over buscar_normas/buscar_en_norma, so it is clear context rather than full when/when-not framing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
buscar_normasBuscando normasA
Busca normas legales en el SPIJ (normas generales, administrativas, etc).
Args: consulta: texto libre en el contenido. El buscador hace AND implicito con TODAS las palabras (ej 'transferencia partidas'). OJO: NO acepta comillas ni OR. Si acepta comodin al final de una raiz, ej 'presupuest*'. Empieza con 1-2 palabras. sumilla: texto a buscar solo en la sumilla (resumen) de la norma. dispositivo: tipo de dispositivo legal, ej 'DECRETO SUPREMO'. Acepta parcial ('decreto sup') y se resuelve solo; si es ambiguo devuelve candidatos. Ver listar_filtros. sector: entidad emisora, ej 'ECONOMIA Y FINANZAS'. Acepta parcial. agrupacion: grupo del acervo, ej 'LEGISLACION SUPRANACIONAL'. numero: numero del dispositivo, ej '200-2026-EF' o '31068' (sin prefijo 'Nº'). OJO: algunas leyes no estan indexadas como registro propio; en ese caso la respuesta trae los documentos que lo mencionan (con una nota que lo explica). fecha_ini / fecha_fin: rango de publicacion, formato AAAA-MM-DD. orden: '1' = fecha (recientes primero, default), '2'/'3'/'4' = relevancia. start: desplazamiento (multiplo de 10). Pagina N -> start = (N-1)*10. paginas: paginas consecutivas a traer en una sola llamada (cada pagina = 10 resultados, max 10 paginas). sumilla_chars: maximo de caracteres de la sumilla por documento (0 = sin limite). Para leer la sumilla completa usa detalle_norma(id).
Devuelve: ok, total, desde, hasta, siguiente_start (si hay mas paginas), normas: lista de {id, url_web, codigoNorma, dispositivoLegal, sector, fechaPublicacion, sumilla} (con 'sumilla_total' si se acoto). Ante 0 resultados devuelve 'nota' y 'sugerencias' ({param, consulta, total} de versiones mas cortas de la consulta o de la sumilla, sin filtros categoricos).
| Name | Required | Description | Default |
|---|---|---|---|
| orden | No | 1 | |
| start | No | ||
| numero | No | ||
| sector | No | ||
| paginas | No | ||
| sumilla | No | ||
| consulta | No | ||
| fecha_fin | No | ||
| fecha_ini | No | ||
| agrupacion | No | ||
| dispositivo | No | ||
| sumilla_chars | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose real behavior: implicit AND over all words, no quotes or OR allowed, trailing wildcard support, partial-value resolution for 'dispositivo' returning candidates when ambiguous, the indexing gap where some laws surface only as referencing documents, and the nota/sugerencias fallback on zero results. It omits any auth/permission or rate-limit context, which for a public search corpus is a minor gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the one-line purpose, then a dense Args block and a Devuelve block; nearly every line earns its place given the 0% schema coverage. It is long, but the length is driven by real per-parameter quirks rather than padding, so only marginally verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description fully covers the return shape (ok, total, desde, hasta, siguiente_start, the norms record fields, sumilla_total truncation) plus the zero-result nota/sugerencias structure. An agent has everything needed to call it and interpret the response correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 12 parameters is documented with format and semantics (free-text syntax rules, number without 'Nº' prefix, AAAA-MM-DD dates, orden codes 1-4, start as a multiple of 10 with the (N-1)*10 formula, paginas cap of 10). This is meaning the schema alone could never convey.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource with its corpus: 'Busca normas legales en el SPIJ (normas generales, administrativas, etc)'. That immediately separates it from buscar_jurisprudencia and from within-document tools like buscar_en_norma, and it explicitly points to two siblings (listar_filtros, detalle_norma) for adjacent needs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives concrete operating guidance: start with 1-2 words, use detalle_norma(id) for the full sumilla, and consult listar_filtros when 'dispositivo' is ambiguous. It does not explicitly state when to prefer this over buscar_jurisprudencia or buscar_en_norma, so routing between the closest siblings 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.
detalle_normaObteniendo detalle de la normaA
Devuelve los METADATOS y el TEXTO de una norma del SPIJ por su id.
Args: id: identificador del SPIJ, ej 'H1453062' (lo devuelve buscar_normas). offset: desde que caracter del texto empezar (0 = inicio). max_chars: maximo de caracteres de texto a devolver en esta llamada (0 = usa el limite por defecto). Si el texto es mas largo, 'siguiente_offset' indica por donde continuar. desde_final: si es True, devuelve los ULTIMOS max_chars caracteres (en sentencias judiciales la decision 'RESUELVE' esta al final).
Devuelve: ok, id, url_web (para abrir la norma en el sitio SPIJ), codigoNorma, dispositivoLegal, sector, fechaPublicacion, ruta, titulo, sumilla, texto (texto plano, sin HTML), total_caracteres, texto_truncado, siguiente_offset (si hay mas texto).
Nota: si el texto es muy largo para tu contexto, lee por rangos con offset (ej offset=20000) o la cola con desde_final=True.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| offset | No | ||
| max_chars | No | ||
| desde_final | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it discloses meaningful behavior: text is returned as plain text without HTML, truncation is signalled via texto_truncado/siguiente_offset, and a url_web is provided for opening in SPIJ. It does not cover auth requirements, rate limits, or error behavior, which are the remaining gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Organized into Args / Devuelve / Nota sections and front-loaded with the core purpose. The paging mechanism is restated across max_chars, siguiente_offset, and the closing Nota, which is mild redundancy but aids readability rather than harming it.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, yet the description enumerates the returned fields (ok, id, url_web, codigoNorma, texto, total_caracteres, siguiente_offset, etc.) and explains the pagination contract, so an agent can consume the result correctly. Missing only ancillary details like permissions or failure modes.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 four parameters is explained with meaning beyond its type — id with format example and provenance, offset (0 = start), max_chars (0 = default) with the truncation contract, and desde_final with the rationale for the 'RESUELVE' tail case.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Devuelve los METADATOS y el TEXTO de una norma del SPIJ por su id'), so the agent knows exactly what it returns. It does not, however, distinguish itself from overlapping siblings such as texto_completo or estructura_norma, which likely also surface norm content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives clear operating context: the id comes from buscar_normas, long texts should be read by ranges with offset, and the tail can be fetched with desde_final for judicial decisions where 'RESUELVE' sits at the end. It stops short of explaining when to choose this over the overlapping siblings (texto_completo, estructura_norma).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
estructura_normaMapeando la estructura de la normaA
Devuelve el INDICE de encabezados de una norma del SPIJ, con el offset de cada uno para leer secciones concretas con texto_completo(id, offset=X, max_chars=N).
Args: id: identificador del SPIJ, ej 'H1453062' (lo dan buscar_*).
Devuelve: ok, id, url_web, fuente, total_caracteres, total_encabezados, encabezados: lista de {tipo: 'seccion'|'articulo', titulo, offset} (hasta 150; con 'siguiente_encabezado' si hay mas). Los offsets apuntan al mismo texto canonico que sirve texto_completo. Si la norma no tiene encabezados (sentencias del TC son prosa), 'encabezados' viene vacia: usa buscar_en_norma o lectura por rangos.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full load, and it does so well: it discloses the return payload (ok, id, url_web, fuente, total_caracteres, encabezados), pagination (hasta 150 with siguiente_encabezado), and the edge case of empty encabezados. It does not explicitly state read-only semantics or auth requirements, which is the only gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core purpose, then clearly sectioned into Args and Devuelve. Slightly verbose, but essentially every sentence (pagination limit, offset canonical alignment, empty-headers fallback) earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description fully specifies the return fields, the pagination behavior, the offset semantics, and the degenerate case. An agent has everything needed to call it and to act on the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the single parameter 'id' has no schema description, but the description compensates by giving the format ('ej H1453062') and provenance ('lo dan buscar_*'), which is meaningfully more than the schema alone provides. Only one param, so little else is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Devuelve el INDICE de encabezados de una norma del SPIJ') and immediately qualifies scope with the offset mechanism. This clearly distinguishes it from siblings like texto_completo and detalle_norma, which an agent can tell apart without opening schemas.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It not only says what it returns but routes the agent: use this to get offsets, then call texto_completo(id, offset=X, max_chars=N) to read specific sections. It also names a fallback (buscar_en_norma or reading by ranges) for norms with no headers such as TC sentencias. Explicit when-to-use and alternative paths.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
listar_filtrosListando filtrosA
Lista los valores validos para los filtros del SPIJ.
Args: categoria: una de 'dispositivos', 'agrupaciones', 'tomos', 'materias', 'sectores'. Si se omite, devuelve un resumen con conteos y ejemplos de cada categoria. tomo: solo para categoria='materias': el tomo de jurisprudencia del que se quieren las especialidades, ej 'TRIBUNAL CONSTITUCIONAL'.
'dispositivos': tipos de dispositivo legal (ej DECRETO SUPREMO). 'agrupaciones': grupos del acervo (ej LEGISLACION SUPRANACIONAL). 'tomos': tomos de jurisprudencia (ej TRIBUNAL CONSTITUCIONAL). 'materias': especialidades de un tomo de jurisprudencia (requiere 'tomo'). 'sectores': entidades emisoras (hay cientos; si el tuyo no esta en la lista puedes escribir parte del nombre en buscar_normas y se resuelve automaticamente).
Devuelve: dict con 'ok' y la lista 'valores': son los strings EXACTOS que aceptan buscar_normas y buscar_jurisprudencia.
| Name | Required | Description | Default |
|---|---|---|---|
| tomo | No | ||
| categoria | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the return shape (dict with 'ok' and a 'valores' list), the default behavior when no category is given, and the caveat that 'sectores' has hundreds of entries. It does not explicitly state read-only/harmless nature, but for a pure lookup tool the disclosed behavior is nearly complete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with purpose, then organized into Args/Devuelve. Slightly long and the per-category definitions partially restate the earlier list, but every block earns its place by naming example values an agent needs.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, so the description must explain returns — and it does ('valores' are the exact strings accepted by the sibling search tools). With both params documented, the omission default covered, and the sectores fallback given, 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.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and neither param has an enum, yet the description supplies the five allowed categoria values, explains the conditional relationship (tomo only applies to categoria='materias'), and gives example values. This fully compensates for the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Starts with a specific verb+resource: 'Lista los valores validos para los filtros del SPIJ'. It also ties the output to its consumers, naming the sibling tools (buscar_normas, buscar_jurisprudencia) whose accepted strings these are, so an agent can place it in the workflow immediately.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states what happens when categoria is omitted (returns a summary with counts and examples), that 'materias' requires 'tomo', and offers a concrete alternative when a sector is missing ('escribe parte del nombre en buscar_normas y se resuelve automaticamente'). This is exactly the when-to-use/when-not guidance the dimension asks for.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
texto_completoLeyendo el texto completoA
Devuelve el TEXTO COMPLETO de una norma o jurisprudencia del SPIJ.
Ruta robusta: obtiene el documento word del SPIJ (ruta que incluye el acervo completo de jurisprudencia) y devuelve texto plano. Si esa ruta falla, usa el texto del detalle.
Args: id: identificador del SPIJ, ej 'H1352213' (lo dan buscar_*). offset: desde que caracter del texto empezar (0 = inicio). max_chars: maximo de caracteres a devolver en esta llamada (0 = usa el limite por defecto). Si hay mas texto, 'siguiente_offset' indica por donde continuar. desde_final: si es True, devuelve los ULTIMOS max_chars caracteres (en sentencias judiciales la decision 'RESUELVE' esta al final; combinado con max_chars=3000 la lees directo).
Devuelve: ok, id, url_web, codigoNorma, fechaPublicacion, dispositivoLegal, texto (texto plano), total_caracteres, texto_truncado, siguiente_offset (si hay mas; None con desde_final).
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| offset | No | ||
| max_chars | No | ||
| desde_final | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does substantial work: it discloses the two-path retrieval (primary word-document route, fallback to detail text), the pagination model (total_caracteres, texto_truncado, siguiente_offset), and the desde_final shortcut. It does not state permissions, rate limits, or cost, but read-only behavior is clearly implied by 'Devuelve'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the purpose, then organized into clear 'Args' and 'Devuelve' sections. Some prose is chatty in Spanish, but every line conveys operative information (fallback logic, truncation, the RESUELVE hint) rather than filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description must explain return values, and it enumerates them precisely (ok, id, url_web, codigoNorma, fechaPublicacion, dispositivoLegal, texto, total_caracteres, texto_truncado, siguiente_offset). For a paginated full-text retrieval tool this is complete enough for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 fully and it does: 'id' includes the format example 'H1352213' and its source; 'offset' is defined as the starting character; 'max_chars' explains the 0=default sentinel; 'desde_final' is fully explained with a motivating example. Every parameter is documented beyond the bare schema types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'Devuelve el TEXTO COMPLETO de una norma o jurisprudencia del SPIJ'. It also discloses the retrieval strategy (SPIJ word document with fallback to detail text), which distinguishes it from metadata-oriented siblings like detalle_norma and estructura_norma.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives useful operational context: 'id... lo dan buscar_*' and a concrete use case for desde_final ('en sentencias judiciales la decision RESUELVE esta al final; combinado con max_chars=3000 la lees directo'). However it never states when to choose this tool over siblings such as detalle_norma, estructura_norma, or buscar_en_norma, leaving the routing to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v0.6.1- First observed
buscar_en_norma - First observed
buscar_jurisprudencia - First observed
buscar_normas - First observed
detalle_norma - First observed
estructura_norma - First observed
listar_filtros - First observed
texto_completo
TDQS
Scored across 7 tools
Most tools have clearly distinct purposes: listar_filtros discovers filter values, buscar_jurisprudencia and buscar_normas target different legal corpora, and buscar_en_norma vs estructura_norma are distinct operations. However, texto_completo and detalle_norma both retrieve document text with the same argument shape and overlapping returns, which could lead to misselection.
All tool names use consistent Spanish snake_case, with action verbs (buscar_, listar_) for searches and noun phrases for retrieval. The pattern is mostly predictable, though the verb_noun convention is not universal because three tools use noun-based names.
Seven tools is well-scoped for a read-only SPIJ legal research server. Each tool earns its place by covering a distinct stage of discovery, search, or document access, with no unnecessary duplication.
The set covers filter discovery, norm and jurisprudence search, document structure, in-document search, full text, and metadata. Minor gaps exist, such as a dedicated metadata-only endpoint or citation resolver, but agents can work around them using existing tools.
Maintenance
Related MCP Connectors
- LegalizeOAuthdev.legalize
Official MCP connector for Legalize: read and search its whole open corpus, at any point in time.
Brazilian legal stack in one MCP: lawsuits, court publications, case law, tenders, certificates.
Public Indian legal search MCP for Roop judgments, statutes, and corpus grounding.
Resolve, search and verify legal citations against the official sources, with provenance.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for accessing Uruguay's IMPO open data API with SQLite caching. Provides tools to retrieve legal norms, search regulations, and access schema documentation from Uruguay's official legal database.4MIT
- FlicenseNot gradedqualityDmaintenanceRemote MCP server that provides access to over 285K Argentine court rulings and user's own case files via Streamable HTTP transport.-
- FlicenseAqualityBmaintenanceMCP server that provides access to Argentine legal documents (legislation, CSJN jurisprudence, international treaties) with verifiable provenance including SHA256 hashes and source URLs, enabling legal professionals to search and verify citations.13-
- FlicenseNot gradedqualityDmaintenanceMCP server for Peruvian government data, enabling search and anomaly detection in public procurement (OSCE) and legislative tracking (Congress), plus semantic search over both domains.-