Skip to main content
Glama

spij-mcp

spij-mcp

Licencia Python MCP Local

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)

  1. Descarga spij-mcp-0.6.1.mcpb desde Releases.

  2. Abre Claude Desktop → Ajustes → Extensiones → Instalar desde archivo.

  3. Selecciona el .mcpb y listo.

Requisito: Python 3.10+ instalado en el sistema (el .mcpb trae el código; las dependencias se instalan la primera vez que arranca).

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 sync

Y 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

Tools

Tool

Qué hace

buscar_normas

Búsqueda full-text con filtros (dispositivo, sector, agrupación, número, fechas) y paginación

buscar_jurisprudencia

Igual, para jurisprudencia; organismo="TC" filtra localmente por organismo emisor

estructura_norma

Índice de encabezados de una norma (TÍTULO, CAPÍTULO, Artículo N.) con offsets navegables

buscar_en_norma

Salta a las ocurrencias de una palabra o frase dentro de una norma

detalle_norma

Metadatos + texto plano de una norma por id (lectura por rangos)

texto_completo

Texto completo garantizado, incluido el acervo de suscriptores

listar_filtros

Valores exactos para los filtros (dispositivos, sectores, tomos, materias, agrupaciones)

Cómo se lee (4 niveles)

  1. Descubrir — buscar_normas / buscar_jurisprudencia: cada resultado trae id, url_web y sumilla.

  2. Mapear — estructura_norma(id): índice de encabezados con offsets.

  3. Saltar — buscar_en_norma(id, texto): ocurrencias con offsets.

  4. Leer — texto_completo(id, offset, max_chars): lectura por rangos; desde_final=True lee 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 sugerencias con 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.

  • 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

Apache-2.0

Available Tools

7 tools
buscar_en_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).

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
textoYes
contextoNo
max_matchesNo

TDQS

A4.6/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 discloses useful behavior: search ignores accents and capitalization, returns offsets and extracts, enforces context and match limits, and indicates hay_mas when more occurrences remain. It does not mention authentication, rate limits, or error behavior, but those are less critical for this read-only search tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core behavior before the argument and return details, and the Args/Devuelve structure makes scanning easy. The examples and range details earn their place by removing ambiguity.

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?

Covers what the tool does, all parameters, and the return shape even though there is no output schema. It also supplies the offset-to-texto_completo workflow, which is the key operational context for using the results.

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: it documents all four parameters with meaning, examples, and constraints, including id format, texto length, contexto range and default, and max_matches range and default.

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

Purpose5/5

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

States a specific verb and resource: searching a word or phrase inside the full text of a specific SPIJ norm. It also distinguishes itself from reading the whole text by explaining the offset-based occurrence result and referencing texto_completo for surrounding context.

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?

Makes the intended use clear: ideal for jumping to specific sections without reading all text. It names texto_completo as the follow-up tool for reading around a match, but it does not explicitly say when to prefer buscar_normas or other siblings instead.

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

buscar_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).

ParametersJSON Schema
NameRequiredDescriptionDefault
tomoNo
ordenNo1
startNo
numeroNo
materiaNo
paginasNo
consultaNo
fecha_finNo
fecha_iniNo
organismoNo
sumilla_charsNo

TDQS

A4.9/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: it discloses that tomo is ignored by the index, that organismo filters locally by scanning up to 5 SPIJ pages, and it documents practical failure modes ('sugerencias' on zero results, 'organismos_disponibles' when no match under the requested organismo). This is unusually thorough behavioral context beyond a bare verb+resource statement.

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 well-separated Args and Devuelve blocks make it easy to scan. It is long, but the length is justified by the 11 undocumented parameters and absent output schema; only minor redundancy between the tomo/organismo notes.

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?

With no output schema, the description supplies the return contract itself (ok, total, organismo, escaneadas, filtrados, normas, siguiente_start, plus conditional sugerencias / organismos_disponibles). Combined with per-parameter guidance, an agent has everything needed to invoke and interpret the call.

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% and there are 11 parameters, so the description must compensate fully. It documents essentially every parameter with format hints and quirks: consulta syntax rules (implicit AND, no quotes/OR, wildcard *, start with 1-2 words), expediente formats like '03209-2024-PA/TC', AAAA-MM-DD dates, orden codes, and sumilla_chars=0 meaning unlimited.

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

Purpose5/5

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

States a specific verb (Busca) and resource (jurisprudencia en el SPIJ), and scopes it with concrete content types (TC, cortes, precedentes, sentencias). An agent can distinguish it from the sibling buscar_normas without opening either schema.

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

Usage Guidelines5/5

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

Explicitly routes usage: warns that 'tomo' is not applied by the index and that organismo is the correct filter path, and points to listar_filtros(categoria='materias') for enumerating values. It also names detalle_norma / texto_completo as the follow-up tools for retrieving full text, giving clear when-to-use and next-step guidance.

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

buscar_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).

ParametersJSON Schema
NameRequiredDescriptionDefault
ordenNo1
startNo
numeroNo
sectorNo
paginasNo
sumillaNo
consultaNo
fecha_finNo
fecha_iniNo
agrupacionNo
dispositivoNo
sumilla_charsNo

TDQS

A4.9/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden, and it does: ordering defaults, pagination semantics (start multiples of 10, paginas up to 10), the exact shape of the zero-result response (nota + sugerencias with shortened queries), and the ambiguity/candidate behavior for partial dispositivo values.

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 one-line purpose followed by clearly separated Args and Devuelve sections; nearly every sentence adds an example or a warning. It is dense and long, but the length is justified by 12 undocumented parameters and no output schema.

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?

With no annotations, no output schema, and 0% schema coverage across 12 parameters, the description supplies everything an agent needs: input semantics, return fields, pagination, ordering, and error/empty-result behavior.

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%, yet every one of the 12 parameters is documented with format, examples, and pitfalls ('200-2026-EF', 'sin prefijo Nº', AAAA-MM-DD, sumilla_chars=0 means no limit, start=(N-1)*10). This fully compensates for the empty schema.

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

Purpose5/5

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

States a specific verb and resource ('Busca normas legales en el SPIJ') with the scope of the corpus (normas generales, administrativas). The resource distinction from buscar_jurisprudencia is implicit in the terminology, and it explicitly points to detalle_norma and listar_filtros 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.

Usage Guidelines5/5

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

Gives concrete query-construction rules (AND semantics, no quotes/OR, trailing wildcard, start with 1-2 words) and routes the agent to siblings: listar_filtros for ambiguous dispositivo, detalle_norma for the full sumilla. It also explains fallback behavior when a numeric law is not indexed as its own record.

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

detalle_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
offsetNo
max_charsNo
desde_finalNo

TDQS

A4.2/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 behavioral burden and does well: it discloses the return shape (texto sans HTML, total_caracteres, texto_truncado, siguiente_offset) and the truncation/continuation behavior. It stops short of stating permissions or rate limits, but for a read tool that is minor.

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?

Structured as Args/Devuelve/Nota with the core action front-loaded. Each section earns its place, though the closing 'Nota' partly repeats the offset/desde_final guidance already given in Args, adding mild redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/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, yet the description documents parameters, return fields, and pagination. It is self-sufficient for correct invocation; only the lack of differentiation from the texto_completo sibling leaves a small gap.

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 fully: id format example 'H1453062' plus its source, offset as character index with 0=start, max_chars with 0=default limit and truncation behavior, and desde_final semantics with a rationale for judicial sentences.

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 ('Devuelve los METADATOS y el TEXTO de una norma del SPIJ por su id') and clarifies where the id comes from (buscar_normas). It is clear what the tool does, though it does not explicitly differentiate itself from the similar sibling texto_completo.

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 guidance: how to page long texts via offset/desde_final, that desde_final targets the trailing 'RESUELVE' of judicial sentences, and a closing note to read in ranges when the text exceeds context. No explicit when-not-to-use versus siblings, but the pagination context is clear.

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

estructura_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes

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 150-heading cap, the 'siguiente_encabezado' pagination key, that offsets index the same canonical text as texto_completo, and the empty-result case for prose (TC sentencias). It omits auth/rate-limit or cost context, keeping it below a 5.

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, then Args and Devuelve sections. The return listing is somewhat verbose but earns its place given there is no output schema. Little waste overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

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 correctly documents the return shape (ok, id, url_web, fuente, totals, encabezados list) and the truncated/empty cases. Combined with the sibling routing hint, an agent has everything needed to call and interpret it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single required param is undocumented in the schema, but the description compensates: 'id' is defined as the SPIJ identifier with an example ('H1453062') and it notes the id comes from buscar_* tools. That is enough to call the tool correctly.

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

Purpose5/5

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

States a specific verb and resource: returns the index of headings of a SPIJ norm, including each heading's offset. It is clearly distinguishable from siblings like texto_completo (full text) and buscar_en_norma (search), so an agent can route correctly.

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?

Explains the intended workflow — use the returned offsets to read specific sections via texto_completo(id, offset=X, max_chars=N) — and names fallbacks (buscar_en_norma or range reading) for prose norms with no headings. It does not explicitly contrast with detalle_norma or say when not to use it, so it stops 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.

listar_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
tomoNo
categoriaNo

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden and does well: it discloses the return shape ('ok' plus 'valores'), conditional behavior for omitted categoria and required tomo, and the exact-string nature of results. It does not explicitly state that the operation is read-only or mention error behavior, but the listed behavior is clear.

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 description is front-loaded with its purpose and then structured into Args, category explanations, and return values. It is appropriately detailed for a discovery tool, though the tomo requirement is repeated slightly between the Args section and the categoria breakdown.

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?

Given 0% schema description coverage, no output schema, and a two-param tool with conditional behavior, the description is complete. It documents both parameters, the return structure, valid category values, and how the output connects to sibling search tools.

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 both parameters. It fully enumerates valid categoria values, explains the dependency of tomo on categoria='materias', gives an example tomo value, and describes the special summary behavior when categoria is omitted.

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

Purpose5/5

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

States a specific verb and resource: listing valid filter values for SPIJ. It also clarifies that returned strings are exactly the values accepted by buscar_normas and buscar_jurisprudencia, so an agent can distinguish this discovery tool from the sibling search tools.

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?

Explains when each categoria is relevant, that tomo is only used with categoria='materias', and that omitting categoria returns a summary. It also gives an alternative path for sectores when a value is missing. However, it does not explicitly frame the overall when-to-use versus when-not-to-use relationship with all siblings.

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

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
offsetNo
max_charsNo
desde_finalNo

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 primary route (documento word), the fallback route (texto del detalle), truncation behavior with siguiente_offset, and that desde_final returns the tail. It omits any note on permissions, rate limits, or failure modes beyond the word/detalle fallback.

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 the core purpose, then structured Args/Devuelve sections that each earn their place. Slightly verbose in the route explanation, but no sentence is pure filler.

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?

With no output schema and no annotations, the description enumerates every return field (ok, id, url_web, codigoNorma, fechaPublicacion, dispositivoLegal, texto, total_caracteres, texto_truncado, siguiente_offset) and explains pagination end-to-end. An agent has everything needed to call and consume this reliably.

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 fully document the four parameters — and it does: id format with an example, offset as start character, max_chars with 0 = default and its link to siguiente_offset, and desde_final with the reviewing-decision rationale. This fully compensates for the empty schema descriptions.

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: returns the FULL TEXT of a norm or jurisprudence from SPIJ, which is clearly more than a summary. It distinguishes itself from the search siblings by noting the 'id' comes from buscar_*, but it never contrasts itself with closer siblings like detalle_norma or estructura_norma, leaving that boundary implicit.

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?

Clear context: use it after buscar_* to fetch an id and retrieve the whole document. It also gives a concrete usage tip (combinar desde_final=True con max_chars=3000 para leer el RESUELVE de una sentencia). No explicit when-not guidance or statement about when detalle_norma would be preferable.

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.

  1. 7 tool updatesv0.6.1
    • First observedbuscar_en_norma
    • First observedbuscar_jurisprudencia
    • First observedbuscar_normas
    • First observeddetalle_norma
    • First observedestructura_norma
    • First observedlistar_filtros
    • First observedtexto_completo

TDQS

A4.2/5.0

Scored across 7 tools

Disambiguation3/5

Buscar_normas and buscar_jurisprudencia are clearly split by domain, and estructura_norma versus buscar_en_norma serve distinct navigation purposes. However, detalle_norma and texto_completo heavily overlap: both retrieve text by id with offset/max_chars/desde_final, and the agent may hesitate which to use for a given document.

Naming Consistency3/5

All names use consistent snake_case and Spanish, which is readable. But the pattern mixes verb-first (listar_filtros, buscar_normas, buscar_jurisprudencia) with noun-first (estructura_norma, detalle_norma, texto_completo) and a prepositional form (buscar_en_norma), so there is no single predictable convention.

Tool Count5/5

Seven tools is well within the ideal 3–15 range for a read-only legal search server. Each tool has a distinct role (filter discovery, two search domains, outline, within-document search, retrieval), and none appears superfluous.

Completeness4/5

The read-only lifecycle is largely covered: filter discovery, norm and jurisprudence search, document structure, within-document search, and text retrieval via metadata or full-text routes. Minor gaps include no explicit batch retrieval or dedicated jurisprudence metadata tool, but the existing tools offer workarounds.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    MCP 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.
    4
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    MCP 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
    -