Docs
MCP serverAvailable tools

Read tax law

Read the full text of one article of an official Mexican tax law on a date, or what changed since a date.

MCP toolget_tax_law

Purpose

Use when
You know which article governs the question, or need to see what the law changed recently.
Do not use when
You do not know the article yet; search first with search_tax_law.
Required permissions
None
Side effects
None
Idempotency
Idempotent

Input schema

JSON Schema
{  "type": "object",  "properties": {    "input": {      "oneOf": [        {          "type": "object",          "properties": {            "operation": {              "const": "documents"            }          },          "required": [            "operation"          ],          "additionalProperties": false,          "description": "The laws and regulations held, with their reform dates"        },        {          "type": "object",          "properties": {            "operation": {              "const": "article"            },            "law": {              "$ref": "#/definitions/__schema2"            },            "article": {              "type": "string",              "minLength": 1,              "maxLength": 40,              "description": "Article as the law numbers it: 1o.-A, 29-A, 113-E, 3o-Bis, 17-H-Bis, Transitorios, Decreto-2019-12-09; an RMF rule: 2.7.1.34"            },            "asOf": {              "description": "The date whose text is wanted (YYYY-MM-DD, Mexico City); defaults to today. Past dates return the version that bound then, from the corpus's history",              "allOf": [                {                  "$ref": "#/definitions/__schema5"                }              ]            },            "offset": {              "description": "Character to start the text at; use nextOffset",              "allOf": [                {                  "type": "integer",                  "minimum": 0,                  "maximum": 9007199254740991                }              ]            },            "maxChars": {              "description": "Characters of text to return; defaults to 30000. A long article is read in windows",              "allOf": [                {                  "type": "integer",                  "minimum": 1000,                  "maximum": 60000                }              ]            }          },          "required": [            "operation",            "law",            "article"          ],          "additionalProperties": false,          "description": "One article, its text in force on a date"        },        {          "type": "object",          "properties": {            "operation": {              "const": "changes"            },            "since": {              "description": "Versions that took effect (validFrom) on or after this date",              "allOf": [                {                  "$ref": "#/definitions/__schema5"                }              ]            },            "law": {              "allOf": [                {                  "$ref": "#/definitions/__schema2"                }              ]            },            "kind": {              "description": "article: the numbered articles (RMF: its rules); transitory: the law’s own transitory provisions; decree: the transitory articles of each reform decree, laws and regulations only (where commencement dates are)",              "allOf": [                {                  "enum": [                    "article",                    "transitory",                    "decree"                  ]                }              ]            },            "cursor": {              "description": "nextCursor of the previous page",              "allOf": [                {                  "type": "string",                  "minLength": 1                }              ]            },            "limit": {              "description": "Results per page; defaults to 10",              "allOf": [                {                  "type": "integer",                  "minimum": 1,                  "maximum": 25                }              ]            }          },          "required": [            "operation",            "since"          ],          "additionalProperties": false,          "description": "Versions by their validFrom, newest first, without text"        }      ]    }  },  "required": [    "input"  ],  "$schema": "http://json-schema.org/draft-07/schema#",  "additionalProperties": false,  "definitions": {    "__schema2": {      "enum": [        "LIVA",        "LISR",        "CFF",        "LIEPS",        "LSS",        "LFT",        "LDVUMA",        "RLIVA",        "RLISR",        "RCFF",        "RLIEPS",        "RMF"      ],      "description": "A law, regulation or the RMF: LIVA, LISR, CFF, LIEPS, LSS, LFT, LDVUMA, RLIVA, RLISR, RCFF, RLIEPS, RMF"    },    "__schema5": {      "type": "string",      "format": "date",      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"    }  }}

Output schema

JSON Schema
{  "type": "object",  "properties": {    "data": {      "anyOf": [        {          "type": "object",          "properties": {            "documents": {              "type": "array",              "items": {                "type": "object",                "properties": {                  "law": {                    "$ref": "#/definitions/__schema0"                  },                  "name": {                    "type": "string"                  },                  "kind": {                    "enum": [                      "law",                      "regulation",                      "resolution"                    ]                  },                  "edition": {                    "allOf": [                      {                        "type": "string"                      }                    ]                  },                  "reformedOn": {                    "anyOf": [                      {                        "$ref": "#/definitions/__schema2"                      },                      {                        "type": "null"                      }                    ]                  },                  "lastCheckedAt": {                    "anyOf": [                      {                        "$ref": "#/definitions/__schema3"                      },                      {                        "type": "null"                      }                    ]                  },                  "stale": {                    "type": "array",                    "items": {                      "type": "object",                      "properties": {                        "kind": {                          "$ref": "#/definitions/__schema5"                        },                        "since": {                          "$ref": "#/definitions/__schema3"                        },                        "note": {                          "$ref": "#/definitions/__schema6"                        }                      },                      "required": [                        "kind",                        "since"                      ],                      "additionalProperties": false                    }                  }                },                "required": [                  "law",                  "name",                  "kind",                  "reformedOn",                  "lastCheckedAt",                  "stale"                ],                "additionalProperties": false              }            },            "notice": {              "type": "string"            }          },          "required": [            "documents",            "notice"          ],          "additionalProperties": false        },        {          "type": "object",          "properties": {            "article": {              "type": "object",              "properties": {                "law": {                  "$ref": "#/definitions/__schema0"                },                "article": {                  "$ref": "#/definitions/__schema8"                },                "headings": {                  "$ref": "#/definitions/__schema9"                },                "validFrom": {                  "$ref": "#/definitions/__schema2"                },                "validTo": {                  "$ref": "#/definitions/__schema11"                },                "citationUrl": {                  "$ref": "#/definitions/__schema12"                },                "text": {                  "type": "string"                },                "textLength": {                  "type": "number"                },                "offset": {                  "type": "number"                },                "nextOffset": {                  "anyOf": [                    {                      "type": "number"                    },                    {                      "type": "null"                    }                  ]                }              },              "required": [                "law",                "article",                "headings",                "validFrom",                "validTo",                "citationUrl",                "text",                "textLength",                "offset",                "nextOffset"              ],              "additionalProperties": false            },            "previousVersion": {              "anyOf": [                {                  "$ref": "#/definitions/__schema14"                },                {                  "type": "null"                }              ]            },            "nextVersion": {              "anyOf": [                {                  "$ref": "#/definitions/__schema14"                },                {                  "type": "null"                }              ]            },            "stale": {              "$ref": "#/definitions/__schema15"            },            "notice": {              "type": "string"            }          },          "required": [            "article",            "previousVersion",            "nextVersion",            "stale",            "notice"          ],          "additionalProperties": false        },        {          "type": "object",          "properties": {            "changes": {              "type": "array",              "items": {                "type": "object",                "properties": {                  "law": {                    "$ref": "#/definitions/__schema0"                  },                  "article": {                    "$ref": "#/definitions/__schema8"                  },                  "headings": {                    "$ref": "#/definitions/__schema9"                  },                  "validFrom": {                    "$ref": "#/definitions/__schema2"                  },                  "validTo": {                    "$ref": "#/definitions/__schema11"                  },                  "citationUrl": {                    "$ref": "#/definitions/__schema12"                  }                },                "required": [                  "law",                  "article",                  "headings",                  "validFrom",                  "validTo",                  "citationUrl"                ],                "additionalProperties": false              }            },            "nextCursor": {              "anyOf": [                {                  "type": "string"                },                {                  "type": "null"                }              ]            },            "stale": {              "$ref": "#/definitions/__schema15"            },            "notice": {              "type": "string"            }          },          "required": [            "changes",            "nextCursor",            "stale",            "notice"          ],          "additionalProperties": false        }      ]    },    "error": {      "$schema": "http://json-schema.org/draft-07/schema#",      "type": "object",      "properties": {        "code": {          "enum": [            "validation_error",            "unauthenticated",            "forbidden",            "payment_required",            "not_found",            "method_not_allowed",            "conflict",            "idempotency_conflict",            "operation_in_progress",            "recovery_required",            "migration_required",            "rate_limited",            "provider_unavailable",            "internal"          ]        },        "message": {          "type": "string"        },        "details": {          "type": "object",          "properties": {            "document": {              "type": "object",              "properties": {                "documentRef": {                  "type": "string",                  "pattern": "^(invoice|withholding|sales_receipt|declaration|tax_compliance_opinion|sales_receipt_refund):.+$"                },                "editable": {                  "type": "boolean"                }              },              "required": [                "documentRef",                "editable"              ],              "additionalProperties": false            },            "issues": {              "type": "array",              "items": {                "type": "object",                "properties": {                  "path": {                    "type": "array",                    "items": {                      "anyOf": [                        {                          "type": "string"                        },                        {                          "type": "number"                        }                      ]                    }                  },                  "message": {                    "type": "string"                  },                  "code": {                    "type": "string"                  }                },                "required": [                  "path",                  "message"                ],                "additionalProperties": false              }            },            "retryable": {              "type": "boolean"            },            "retryAfterSeconds": {              "type": "integer",              "exclusiveMinimum": 0,              "maximum": 9007199254740991            },            "reason": {              "type": "string"            },            "balanceMinor": {              "type": "integer",              "minimum": 0,              "maximum": 9007199254740991            },            "topUpUrl": {              "type": "string"            }          },          "additionalProperties": false        }      },      "required": [        "code",        "message"      ],      "additionalProperties": false    }  },  "$schema": "http://json-schema.org/draft-07/schema#",  "additionalProperties": false,  "definitions": {    "__schema0": {      "enum": [        "LIVA",        "LISR",        "CFF",        "LIEPS",        "LSS",        "LFT",        "LDVUMA",        "RLIVA",        "RLISR",        "RCFF",        "RLIEPS",        "RMF"      ]    },    "__schema2": {      "type": "string",      "format": "date"    },    "__schema3": {      "type": "string",      "format": "date-time"    },    "__schema5": {      "enum": [        "failing",        "lagging"      ]    },    "__schema6": {      "allOf": [        {          "type": "string"        }      ]    },    "__schema8": {      "type": "string"    },    "__schema9": {      "type": "array",      "items": {        "type": "string"      }    },    "__schema11": {      "anyOf": [        {          "$ref": "#/definitions/__schema2"        },        {          "type": "null"        }      ]    },    "__schema12": {      "type": "string"    },    "__schema14": {      "type": "object",      "properties": {        "validFrom": {          "$ref": "#/definitions/__schema2"        },        "validTo": {          "anyOf": [            {              "$ref": "#/definitions/__schema2"            },            {              "type": "null"            }          ]        }      },      "required": [        "validFrom",        "validTo"      ],      "additionalProperties": false    },    "__schema15": {      "type": "array",      "items": {        "type": "object",        "properties": {          "law": {            "$ref": "#/definitions/__schema0"          },          "kind": {            "$ref": "#/definitions/__schema5"          },          "since": {            "$ref": "#/definitions/__schema3"          },          "note": {            "$ref": "#/definitions/__schema6"          }        },        "required": [          "law",          "kind",          "since"        ],        "additionalProperties": false      }    }  },  "oneOf": [    {      "required": [        "data"      ]    },    {      "required": [        "error"      ]    }  ]}

Related workflow

See the canonical workflows in Quickstart

Related tools