legalize-mx-mcp
You can query Mexican federal, state, and municipal legislation, including current/historical text, reform history, diffs, and official sources.
Search laws by text and filters (state, municipality, type, current status, source).
Read a law’s text as of today or a date, paginated; optionally fetch and extract official documents live.
Retrieve a specific article by number.
View a law’s reform history (dates, decrees, affected articles).
Compare versions between two dates (
diff).Get official links for citation/verification (
fuentes).Check coverage by state/municipality and source.
Query the DOF for a day and read DOF notes live.
Update the local index on demand (
actualizar_indice).
Reads legal text and reform history from a public GitHub repository, with one Markdown file per law and one commit per reform. Uses GITHUB_TOKEN to raise API rate limits for history queries.
Downloads and periodically refreshes the search index (~90 MB) from a Hugging Face dataset, and can be deployed on Hugging Face Spaces via the optional HTTP server mode.
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., "@legalize-mx-mcpBusca el artículo 27 de la Constitución y su historial de reformas"
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.
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-mxen 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-mcpInstala 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-mcpOtros 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 federalHerramientas
Herramienta | Qué hace |
| Búsqueda de texto completo en títulos y contenido, con filtros |
| Texto vigente, o el que regía en una fecha. Va por partes si es largo |
| Un artículo: |
| Reformas: fecha, decreto, artículos afectados |
| Artículos reformados, adicionados y derogados entre dos fechas, más el diff |
| Enlaces oficiales para citar o verificar |
| Qué hay y qué falta: normas por fuente y tipo, y la fuente de cada municipio |
| Lo que publicó el DOF ese día (en vivo) |
| Texto completo de una nota del DOF (en vivo) |
| 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,coberturaeinfoagregan a su respuesta un campoaviso_indicecon el mensaje para el usuario. Conactualizar_indice()olegalize-mx actualizarse 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 condof_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 dofIdentificadores
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 ejemplocongreso-jal:…odof: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 /mcpCorre 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é |
| Sube el límite de consultas de historial |
| Ruta a un clon local de |
| Ruta a un índice local (no lo descarga) |
| Carpeta de caché (por defecto |
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 FaceAdvertencia
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 toolsactualizar_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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| fecha | No | ||
| numero | 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 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.
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.
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.
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.
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.
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…).
| Name | Required | Description | Default |
|---|---|---|---|
| tipo | No | ||
| desde | No | ||
| texto | No | ||
| estado | No | ||
| fuente | No | ||
| limite | No | ||
| vigente | No | ||
| con_texto | No | ||
| municipio | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| estado | No | ||
| municipio | 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 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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| fecha_a | Yes | ||
| fecha_b | No | ||
| max_caracteres | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| fecha | No | ||
| solo_normativas | No |
TDQS
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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| 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 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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| desde | No | ||
| fecha | No | ||
| max_caracteres | No | ||
| extraer_en_vivo | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| desde | No | ||
| codigo | Yes | ||
| max_caracteres | No |
TDQS
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.
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.
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.
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.
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.
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.
10 tool updates
v0.1.0- First observed
actualizar_indice - First observed
articulo - First observed
buscar_norma - First observed
cobertura - First observed
diff - First observed
dof_del_dia - First observed
fuentes - First observed
historial - First observed
leer_norma - First observed
leer_nota_dof
TDQS
Scored across 10 tools
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.
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.
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.
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
Related MCP Connectors
Resolve, search and verify legal citations against the official sources, with provenance.
Official Mexican data for AI agents: CURP, RFC, CFDI, postal codes, phone, SPEI/CEP, DOF, geocoding.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Structured access to 10 major Indian legal texts (BNS, IPC, etc) for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables querying Mexican federal legislation (316 laws indexed) through natural language, with tools for legal consultation, pricing, and law catalog browsing.-
- AlicenseNot gradedqualityBmaintenanceEnables 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
- FlicenseNot gradedqualityCmaintenanceEnables 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.-
- AlicenseCqualityAmaintenanceExposes 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.87190 PyPI5Apache 2.0