Skip to main content
Glama
elimorals

legalize-mx-mcp

by elimorals

legalize-mx-mcp

MCP server y CLI para que agentes de IA consulten la legislación mexicana federal, estatal y municipal, con su historial de reformas.

Busca en el catálogo, lee el texto vigente o el que regía en una fecha, compara versiones y devuelve siempre el enlace oficial para citar.

Corre en tu máquina, sin servidor propio:

  • Índice de búsqueda: se baja una vez del dataset elimoralsmendox/legalize-mx en Hugging Face (~90 MB) y se actualiza solo.

  • Texto e historial: se piden por norma al repo público elimorals/legalize-mx, con un archivo Markdown por ley y un commit por reforma.

  • Documentos oficiales: cuando una norma solo está catalogada, se bajan y se extraen en vivo del portal oficial (SCJN, congresos, periódicos oficiales, municipios). El DOF del día también se consulta en vivo.

Qué contiene

Normas en el índice

~191,000, de 53 fuentes oficiales

Con texto e historial versionado

~34,000, y creciendo

Fuentes

Catálogo de la SCJN (federal, 32 entidades, tratados), 31 congresos y la Consejería de CDMX, Cámara de Diputados, DOF (NOM, lineamientos, acuerdos), periódicos oficiales estatales y ~600 portales municipales

Cobertura municipal

Censo de los 2,478 municipios: cuál es la fuente de cada uno, o por qué no la hay

Cuándo no hay texto. No todas las normas tienen texto procesado todavía. En esos casos leer_norma lo dice y devuelve los documentos oficiales. Con extraer_en_vivo=true baja el documento y extrae su texto en ese momento. Un PDF escaneado sale vacío, porque necesita OCR.

Related MCP server: KriteriusMX

Instalación

Necesitas uv. Para extraer PDF en vivo hace falta además pdftotext (brew install poppler o apt install poppler-utils), o instalar el extra [pdf].

Claude Code: plugin con el MCP y la skill (recomendado)

/plugin install legalize-mx --marketplace elimorals/legalize-mx-mcp

Instala el MCP y la skill legalize-mx. La skill le enseña al agente cuándo consultarlo y en qué orden usar las herramientas, cómo citar la fuente y versión, y qué no cubre. Con Claude Code anterior a 2.1.275: /plugin marketplace add elimorals/legalize-mx-mcp y luego /plugin install legalize-mx.

Claude Code: solo el MCP

claude mcp add legalize-mx -- uvx --from git+https://github.com/elimorals/legalize-mx-mcp legalize-mx-mcp

Otros clientes MCP (.mcp.json, Claude Desktop, Cursor…)

{
  "mcpServers": {
    "legalize-mx": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/elimorals/legalize-mx-mcp", "legalize-mx-mcp"],
      "env": { "GITHUB_TOKEN": "" }
    }
  }
}

Sin token, GitHub permite 60 consultas de historial por hora. El historial se guarda en caché 24 h. Con un GITHUB_TOKEN el límite sube a 5,000.

CLI

uvx --from git+https://github.com/elimorals/legalize-mx-mcp legalize-mx buscar "jornada laboral" --estado federal

Herramientas

Herramienta

Qué hace

buscar_norma(texto, estado?, municipio?, tipo?, vigente?, con_texto?, fuente?)

Búsqueda de texto completo en títulos y contenido, con filtros

leer_norma(id, fecha?, desde?, extraer_en_vivo?)

Texto vigente, o el que regía en una fecha. Va por partes si es largo

articulo(id, numero, fecha?)

Un artículo: "27", "3 bis", "primero"

historial(id)

Reformas: fecha, decreto, artículos afectados

diff(id, fecha_a, fecha_b?)

Artículos reformados, adicionados y derogados entre dos fechas, más el diff

fuentes(id)

Enlaces oficiales para citar o verificar

cobertura(estado?, municipio?)

Qué hay y qué falta: normas por fuente y tipo, y la fuente de cada municipio

dof_del_dia(fecha?, solo_normativas?)

Lo que publicó el DOF ese día (en vivo)

leer_nota_dof(codigo)

Texto completo de una nota del DOF (en vivo)

actualizar_indice()

Baja ya el índice más reciente, sin reiniciar

En el CLI son los subcomandos buscar, leer, articulo, historial, diff, fuentes, cobertura, dof, nota-dof, actualizar e info.

Mantenerlo al día

El índice se publica de nuevo conforme entran normas y reformas. Tu copia local se mantiene así:

  • Al arrancar: si pasaron más de 24 h desde la última revisión, el MCP consulta index/latest.json, que pesa unos bytes, y baja el índice solo si hay versión nueva.

  • Mientras corre: si se publica un índice nuevo, buscar_norma, cobertura e info agregan a su respuesta un campo aviso_indice con el mensaje para el usuario. Con actualizar_indice() o legalize-mx actualizar se cambia a la versión nueva sin reiniciar.

  • Si tu copia tiene más de 7 días, también aparece aviso_indice, porque lo publicado esos días puede faltar. Lo más reciente se confirma con dof_del_dia(), que consulta el DOF en vivo.

  • El texto y el historial de cada ley siempre se leen del repo de GitHub, así que reflejan la última publicación aunque el índice sea de unos días antes.

Ejemplos

legalize-mx articulo CPEUM 27 --fecha 1920-01-01     # el artículo 27 original de 1917
legalize-mx diff LFT 2025-01-01                      # qué cambió en la LFT desde enero de 2025
legalize-mx buscar "protección civil" --municipio Zapopan
legalize-mx leer "muni-html:jal-zapopan:f30bbb480326df84" --en-vivo
legalize-mx cobertura --estado OAX
legalize-mx dof

Identificadores

  • Leyes federales: usan su abreviatura de Diputados (CPEUM, LFT, LAMP…).

  • Resto del catálogo de la SCJN: {ESTADO}-{titulo}-{id}.

  • Otras fuentes: {fuente}:{id}, por ejemplo congreso-jal:… o dof:5801377.

buscar_norma siempre devuelve el id.

Más ejemplos, con respuestas reales y flujos completos de un agente: EJEMPLOS.md. Qué falta y en qué orden: ROADMAP.md.

Servidor HTTP (opcional)

Para agentes que no pueden lanzar procesos locales:

legalize-mx-mcp --http --host 0.0.0.0 --port 8000     # streamable HTTP en /mcp

Corre igual en Hugging Face Spaces, Fly.io o cualquier VPS. No necesita base de datos: baja el mismo índice.

Variables de entorno

Variable

Para qué

GITHUB_TOKEN

Sube el límite de consultas de historial

LEGALIZE_MX_REPO

Ruta a un clon local de legalize-mx: texto e historial sin red

LEGALIZE_MX_INDEX

Ruta a un índice local (no lo descarga)

LEGALIZE_MX_CACHE

Carpeta de caché (por defecto ~/.cache/legalize-mx)

Actualizar el índice (mantenedores)

python3 scripts/build_index.py --data …/data-mx --repo …/legalize-mx --censo …/research-censo \
  --municipios …/municipios.json --out dist
scripts/publish_index.sh dist          # sube index/ al dataset de Hugging Face

Advertencia

Es una herramienta de consulta, no asesoría legal. El texto se obtiene automáticamente de fuentes oficiales y puede contener errores de origen o de conversión. Verifica siempre con la fuente oficial que devuelve fuentes() antes de usarlo en un asunto real.

Licencia

MIT para el código. Los textos legales son de dominio público: el art. 14, fr. VIII, de la Ley Federal del Derecho de Autor excluye de protección los textos legislativos y administrativos.

Available Tools

10 tools
actualizar_indiceA

Baja ahora el índice más reciente publicado y lo usa. Úsalo cuando una respuesta traiga aviso_indice, o si buscas algo publicado en los últimos días.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses that the tool fetches the latest index 'now' and applies it, and gives a trigger signal, but says nothing about side effects, whether it overwrites a cached index, duration, or idempotency.

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?

Two tight sentences with zero waste; the action is front-loaded and the usage trigger follows immediately.

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?

For a simple zero-parameter refresh tool with no output schema, the description covers what it does and when to invoke it. It could say more about what changes after the refresh, but it is largely sufficient for correct invocation.

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?

The tool takes zero parameters, so there is nothing for the description to disambiguate. Baseline 4 applies.

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 in Spanish: downloads the most recent published index and uses it. Clear what the tool does, though it does not explicitly differentiate itself from siblings like buscar_norma or dof_del_dia, leaving the agent to infer the index-refresh role.

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 explicit trigger conditions: use it when a response contains `aviso_indice`, or when looking for material published in the last few days. This is clear when-to-use context, but it names no exclusions and points to no alternative sibling tool.

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

articuloC

Un artículo específico ("27", "3 bis", "primero"), vigente o a una fecha.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
fechaNo
numeroYes

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses only that the lookup may be temporal (current or as-of a date); there is no indication of read-only nature, behavior for non-existent articles, required permissions, or return shape.

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?

A single tight fragment with no filler. It is front-loaded and wastes nothing, though its brevity is partly under-specification rather than deliberate economy.

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

Completeness2/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 description coverage across three parameters, the description is too thin for a tool whose correct invocation depends on knowing what 'id' means and what an invalid 'numero' or 'fecha' yields. It covers only the surface of the resource.

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

Parameters3/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. It does partially: the examples ('27', '3 bis', 'primero') clarify the expected format of 'numero', and 'vigente o a una fecha' explains the nullable 'fecha' parameter's purpose. The required 'id' parameter remains completely undocumented, leaving a real gap.

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

Purpose3/5

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

Names a specific resource ( single article) and illustrates the numbering formats it accepts, which is concrete. However there is no verb (retrieve/fetch) and no differentiation from siblings such as leer_norma (whole norm) or buscar_norma, so the agent must infer the scope contrast.

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

Usage Guidelines2/5

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

No statement of when to use this tool versus alternatives like leer_norma, buscar_norma, or historial. The temporal qualifier ('vigente o a una fecha') hints at a use case but no condition or exclusion is spelled out.

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

buscar_normaA

Busca normas por texto (título y contenido) con filtros.

estado: clave de 3 letras (JAL, NLE, CMX…) o "federal". municipio: nombre o clave INEGI. tipo: ley, ley_federal, ley_general, codigo, reglamento, bando, ley_de_ingresos, presupuesto, acuerdo, decreto, lineamientos, tratado, nom… vigente: true/false. con_texto: solo las que tienen texto procesado. fuente: "scjn" o el slug de una fuente (congreso-jal, dof, muni-html…).

ParametersJSON Schema
NameRequiredDescriptionDefault
tipoNo
desdeNo
textoNo
estadoNo
fuenteNo
limiteNo
vigenteNo
con_textoNo
municipioNo

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description bears the full behavioral burden. It is obviously a read-only search and discloses nothing dangerous, but it never explains pagination or result-window behavior (desde/limite, default limit of 20) or what a result contains, which is a real gap for a 9-param tool.

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 purpose, then a compact per-filter glossary in one sentence. Some stray whitespace and a dense run-on list of tipo values, but no wasted sentences.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 9 parameters, zero schema descriptions and no output schema, the description is expected to carry everything. It covers the filter vocabulary well but omits text-query behavior, offset/limit pagination semantics, and any hint about returned results or their ordering.

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 description coverage is 0%, so the description must compensate, and it does for most filters: estado (3-letter key or 'federal'), municipio (name or INEGI key), tipo (full enumeration), vigente, con_texto, and fuente (scjn or source slugs). It leaves texto, desde, and limite unexplained, but the majority of ambiguous filters are decoded with concrete accepted values.

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 concrete verb+resource in the first clause: search norms by text over title and body, with filters. It is clearly distinguishable from reading-oriented siblings (leer_norma, articulo, diff), though it never names an alternative search path to differentiate itself.

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?

Filter semantics imply the intended usage context, but there is no explicit statement of when to use this tool versus leer_norma/articulo, nor of prerequisites. The agent must infer the routing from the sibling names alone.

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

coberturaC

Qué hay y qué falta: normas por fuente y tipo, y la fuente municipal de cada municipio.

ParametersJSON Schema
NameRequiredDescriptionDefault
estadoNo
municipioNo

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It hints at the content of the report (norms by source and type, municipal sources) but says nothing about read-only nature, scope limits, cost, or whether results are aggregated counts versus raw listings. This is thin for a tool with zero annotation coverage.

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?

A single compact sentence with no filler. However, it is not front-loaded with a verb, starting instead with a colon-led clause, which slightly reduces scannability.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With two undescribed optional parameters, no annotations, and no output schema, the description should clarify both accepted filters and what the report returns. It gestures at the return content but omits parameter behavior and any scoping semantics, leaving meaningful gaps.

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

Parameters2/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 explain 'estado' and 'municipio'. It only mentions 'municipio' as content ('la fuente municipal de cada municipio'), not as a filter parameter, and never addresses 'estado' or the fact that both are optional and nullable. It fails to compensate for the coverage gap.

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

Purpose3/5

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

The description conveys that the tool reports coverage — what norms exist and what is missing, broken down by source and type, plus the municipal source per municipality. That is more specific than the bare name 'cobertura', but it is a noun-phrase fragment with no verb and no explicit contrast against siblings like 'fuentes' or 'buscar_norma', leaving the exact operation somewhat vague.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus the ten siblings, nor of prerequisites or conditions. An agent must infer that this is an inventory/coverage report, with no guidance on whether it is a starting point or a last-resort check.

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

diffB

Qué cambió entre la versión vigente en fecha_a y la de fecha_b (por omisión, la actual).

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
fecha_aYes
fecha_bNo
max_caracteresNo

TDQS

B3/5.0
Behavior3/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 it does disclose one useful trait: fecha_b defaults to the current in-force version ('por omisión, la actual'). It says nothing about permissions, response shape, or limits, leaving meaningful gaps for an unannotated 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?

A single front-loaded sentence with zero filler; the core operation and the default behavior are both stated immediately.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter tool with no annotations, no output schema, and 0% schema coverage, the description is too thin: it omits the required id, the truncation parameter, and any notion of what the diff returns.

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

Parameters2/5

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

Schema description coverage is 0% across 4 parameters. The description clarifies fecha_b's default-to-current semantics but never explains the required 'id' or the 'max_caracteres' (default 40000) parameter, so half the parameters remain opaque in both description and schema.

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 operation (what changed / diff) between the versions in force at fecha_a and fecha_b, which is a clear verb+resource pairing. It does not, however, distinguish itself from siblings like historial or leer_norma, so an agent must infer the boundary.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance and no alternative tool is named. The agent can infer that this is for comparing two dated versions, but nothing states when to prefer diff over historial or leer_norma.

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

dof_del_diaC

Lo que publicó hoy (o en fecha) el Diario Oficial de la Federación, en vivo.

ParametersJSON Schema
NameRequiredDescriptionDefault
fechaNo
solo_normativasNo

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description must carry the full behavioral burden. It adds only 'en vivo' (live) and the date override, but omits auth requirements, rate limits, read-only confirmation, return format, and pagination—all relevant for a live DOF feed.

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?

One front-loaded sentence with no filler. It is appropriately terse, though its brevity comes at the cost of the missing details noted elsewhere.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with no annotations and no output schema, the description is under-specified. It omits the `solo_normativas` parameter, does not explain the live behavior or return shape, and gives no usage context.

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

Parameters2/5

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

Schema coverage is 0%: neither parameter has a description. The description explains `fecha` as an alternative to today but says nothing about `solo_normativas`, the boolean that defaults to true, leaving an important filter undocumented.

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 the resource (Diario Oficial de la Federación publication) and scope (today or given `fecha`), implying retrieval of that day's content. However, it uses no explicit verb and does not differentiate from siblings like `buscar_norma` or `leer_nota_dof`.

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

Usage Guidelines2/5

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

Offers no when-to-use guidance, no when-not-to-use, and never names alternatives among the nine sibling tools. The optional date is mentioned only as an input variation, not as a routing condition.

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

fuentesC

Enlaces oficiales a los documentos originales (para citar o verificar).

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It implies a read-only lookup of links, but does not state that explicitly, nor does it disclose what the id refers to, whether results can be empty, or any auth/rate constraints.

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?

A single short, front-loaded sentence with no filler or redundancy. It is efficient, though its brevity borders on under-specification rather than optimal conciseness.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one required parameter and no output schema, the description should clarify what 'id' means and what the links point to. It gives only a generic output hint, leaving the key input semantics and the relationship to sibling norm-reading tools unaddressed.

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

Parameters2/5

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

Schema coverage is 0% and the single required 'id' parameter has no description in either schema or description. The description does not explain what the id identifies (norm, article, DOF note), so it fails to compensate for the coverage gap.

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

Purpose3/5

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

The description states the resource it returns (official links to original documents), which is a reasonably specific noun phrase, but it never names an action/verb or says what entity the links correspond to. It does not distinguish itself from siblings like leer_norma or articulo, which also deal with norm content.

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?

'para citar o verificar' implies the use case (citation or verification), giving implied usage rather than explicit when/when-not guidance. No alternatives are named and no condition for choosing this over buscar_norma or leer_norma is given.

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

historialC

Reformas de una norma: fecha, tipo de cambio, decreto y artículos afectados.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes

TDQS

C2.7/5.0
Behavior3/5

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 usefully discloses the shape of the result (dates, change types, decrees, affected articles), which substitutes for the missing output schema, but it says nothing about read-only nature, permissions, or completeness of the history.

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?

A single terse sentence with no filler; the most informative content (that this is about reforms) is front-loaded. It is efficient, though the fragmentary style borders on under-specification.

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

Completeness2/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 an undocumented required parameter, the description should do more. It partially compensates by listing returned fields, but it omits what the id identifies and gives no routing relative to sibling tools.

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

Parameters2/5

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

The schema has one required parameter (id) at 0% description coverage, and the description never mentions it. It is unclear whether the id is a norm identifier, an article identifier, or a decree identifier, so the description fails to compensate for the coverage gap.

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

Purpose3/5

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

The description names a specific resource — the reform history of a norm — and enumerates the fields returned (date, change type, decree, affected articles). However, it is a bare noun phrase with no verb and does not distinguish itself from siblings such as diff, leer_norma, or articulo, which also deal with norm content.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus alternatives. Given siblings like diff (differences) and leer_norma (read the norm), an agent has no guidance on whether historial is the right choice for tracking amendments.

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

leer_normaB

Texto de una norma: el vigente, o el que regía en fecha (AAAA-MM-DD).

Textos largos vienen por partes: usa desde con el valor siguiente_desde. Si la norma solo está catalogada, devuelve sus documentos oficiales; con extraer_en_vivo=true los baja y extrae.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
desdeNo
fechaNo
max_caracteresNo
extraer_en_vivoNo

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries full burden and does disclose meaningful behavior: pagination via `siguiente_desde`, a fallback that returns official documents for merely-catalogued norms, and live download/extraction with extraer_en_vivo. It omits error behavior, permissions, and rate limits, so it is useful but incomplete.

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?

Two tight paragraphs with the core purpose front-loaded, then pagination and extraction behavior. No filler, though the second paragraph crams three distinct behaviors together.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter tool with no annotations and no output schema, the description covers pagination and the catalogued/live-extraction paths well but leaves `id` and `max_caracteres` unexplained and never clarifies the return shape. Adequate but with clear gaps.

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

Parameters3/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. It explains three of five parameters (`desde` as a pagination cursor, `fecha` as an as-of date, `extraer_en_vivo` as download-and-extract), but leaves `id` and `max_caracteres` undocumented in both schema and description.

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?

The description states a specific verb and resource ('Texto de una norma') and clarifies scope: the current version or the version in force on `fecha`. This distinguishes it implicitly from sibling `buscar_norma` (search) by framing it as a retrieval of the actual text, though it never names the siblings explicitly.

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?

It gives concrete guidance on two parameters – use `desde` with the `siguiente_desde` value for long texts, and set extraer_en_vivo=true when a norm is only catalogued. However it offers no explicit when-to-use-vs-alternative guidance against siblings like `buscar_norma`, `articulo`, or `diff`.

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

leer_nota_dofC

Texto completo de una nota del DOF por su código (de dof_del_dia), en vivo.

ParametersJSON Schema
NameRequiredDescriptionDefault
desdeNo
codigoYes
max_caracteresNo

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It adds only 'texto completo' and 'en vivo' (full text, live fetch), but says nothing about truncation, pagination behavior, rate limits, or error handling — all relevant given the 'desde'/'max_caracteres' parameters imply paged or capped retrieval.

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?

A single tight sentence with the resource and lookup key front-loaded and no filler. It is efficient, though its brevity contributes to the gaps elsewhere.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No annotations, no output schema, and 0% parameter coverage leave the description doing too little: it does not explain how to page through long notes, what the character cap means, or what the return looks like for a 3-parameter tool.

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

Parameters2/5

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

Schema description coverage is 0% for 3 parameters. The description only accounts for 'codigo' implicitly via 'por su código'; 'desde' (offset) and 'max_caracteres' (default 60000) are never explained, so an agent must guess their semantics and how they interact.

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: retrieving the full text of a DOF note identified by its code. It also hints at the sibling relationship by noting the code comes 'de dof_del_dia', which helps separate it from leer_norma/buscar_norma, though the differentiation is implicit rather than stated.

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 parenthetical '(de dof_del_dia)' implies you should obtain the code from that sibling tool first, which is useful context. However, there is no explicit when-to-use vs leer_norma, no when-not, and no stated prerequisites beyond the code source.

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. 10 tool updatesv0.1.0
    • First observedactualizar_indice
    • First observedarticulo
    • First observedbuscar_norma
    • First observedcobertura
    • First observeddiff
    • First observeddof_del_dia
    • First observedfuentes
    • First observedhistorial
    • First observedleer_norma
    • First observedleer_nota_dof

TDQS

B3.2/5.0

Scored across 10 tools

Disambiguation4/5

Each tool targets a fairly distinct operation: search (buscar_norma), full read (leer_norma), single article (articulo), reform history (historial), version comparison (diff), official sources (fuentes), coverage metadata (cobertura), and DOF live tools. Minor overlap exists between leer_norma/articulo (both return text) and between fuentes and leer_norma's catalog fallback, but descriptions clarify the boundaries.

Naming Consistency3/5

All names are snake_case and readable, but the convention is mixed: some use verb_noun (buscar_norma, leer_norma, leer_nota_dof, actualizar_indice) while others are bare nouns (articulo, historial, diff, fuentes, cobertura, dof_del_dia). Readable but not a predictable single pattern.

Tool Count5/5

10 tools is well-scoped for a legal-norm research server, with each tool earning a distinct role across search, retrieval, provenance, and freshness workflows. No redundant or filler tools.

Completeness4/5

The surface covers the research lifecycle well: discovery, reading (full/partial/by article), historical versions, diffs, citation sources, coverage reporting, and live DOF retrieval plus index refresh. Minor gaps like a bulk/export or citation-formatting tool are absent but workable around.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables querying Mexican federal legislation (316 laws indexed) through natural language, with tools for legal consultation, pricing, and law catalog browsing.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables Claude to search and retrieve legal sources from Mexican and inter-American courts (SCJN, TFJA, DOF, Corte IDH) with complete citations and official links.
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to search Mexican federal and state statutes, Supreme Court theses, and precedents, returning verifiable citations with dated validity, public URLs, and explicit indication of whether case law is binding jurisprudence or merely persuasive.
    -
  • A
    license
    C
    quality
    A
    maintenance
    Exposes 55 forensic tools over the Model Context Protocol so agents can query Chilean statutes, jurisprudence, administrative dicta and doctrine from official state sources such as BCN, PJUD, CGR and DT, while running locally for confidential casework. It also supports citation-validated drafting, deadline and docket monitoring, judgment deconstruction, OCR dossier compilation and legal knowledge-graph analysis for civil-law practice, teaching and research.
    87
    190 PyPI
    5
    Apache 2.0