mx_law_get
Pack: mexico-law · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/mx_law_get for the schema, then POST the same URL with its arguments for the data.
Fetch one Mexican federal law or code by law_id (from mx_law_search, e.g. “lfpdppp”, “cpeum” for the Constitution) or by exact name. Returns the name, which list it is on (vigente or abrogada, as the publisher lists it), original DOF publication date, last reform or abrogation date, any note the list carries, the reform decrees with their DOF dates, and the text. Pass article (e.g. “7” or “7 Bis”) for one article, with any Se deroga marker the text carries; otherwise text is capped at max_chars. The text is read from the publisher’s PDF, so tables are flattened.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
law_id | string | no | Law id from mx_law_search, e.g. “lfpdppp” |
name | string | no | Exact law name, in place of law_id |
article | string | no | Article number, e.g. “7” or “7 Bis” |
max_chars | number | no | Cap on text when no article is given (default 12000, max 60000) |
Example call
Arguments
{
"law_id": "lfpdppp",
"article": "7"
}
curl
curl -X POST https://gateway.pipeworx.io/mexico-law/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"mx_law_get","arguments":{"law_id":"lfpdppp","article":"7"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('mx_law_get', {
"law_id": "lfpdppp",
"article": "7"
});
Response shape
| Field | Type | Description |
|---|---|---|
found | boolean | |
law_id | string | |
name | string | |
status | string | |
status_note | string | |
original_dof | string | |
last_reform_dof | string | |
list_note | null | |
url | string | |
source | string | |
data_as_of | string | |
reform_decrees | array | |
article | string | |
article_marked_derogated | boolean | |
text | string |
Full JSON Schema
{
"type": "object",
"properties": {
"found": {
"type": "boolean"
},
"law_id": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"status_note": {
"type": "string"
},
"original_dof": {
"type": "string"
},
"last_reform_dof": {
"type": "string"
},
"list_note": {
"type": "null"
},
"url": {
"type": "string"
},
"source": {
"type": "string"
},
"data_as_of": {
"type": "string"
},
"reform_decrees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"dof": {
"type": "string"
}
},
"additionalProperties": true
}
},
"article": {
"type": "string"
},
"article_marked_derogated": {
"type": "boolean"
},
"text": {
"type": "string"
}
},
"additionalProperties": true
}
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the mexico-law pack
{
"mcpServers": {
"mexico-law": {
"url": "https://gateway.pipeworx.io/mexico-law/mcp"
}
}
}
See Getting Started for client-specific install steps.