---
title: "Buscar en la ley fiscal"
description: "Busca en el texto oficial de la ley fiscal y laboral mexicana (LISR, LIVA, CFF, LIEPS, LSS, LFT y sus reglamentos, consolidados por la Cámara de Diputados, y la RMF del SAT) y devuelve los pasajes que coinciden, con su cita. Devuelve fuentes, no respuestas: lee el artículo de un pasaje con get_tax_law."
language: es-MX
canonical_url: "https://exac.mx/docs/mcp/tools/search_tax_law"
md_url: "https://exac.mx/docs/mcp/tools/search_tax_law.md"
---

# Buscar en la ley fiscal

Busca en el texto oficial de la ley fiscal y laboral mexicana (LISR, LIVA, CFF, LIEPS, LSS, LFT y sus reglamentos, consolidados por la Cámara de Diputados, y la RMF del SAT) y devuelve los pasajes que coinciden, con su cita. Devuelve fuentes, no respuestas: lee el artículo de un pasaje con get_tax_law.

Herramienta: `search_tax_law`

## Propósito

### Úsala cuando

Necesitas el texto legal que rige una duda fiscal, con su cita.

### No la uses cuando

Necesitas datos propios de una organización o los valores con que calcula Exac; usa get_tax_rules.

| Detalle | Valor |
| --- | --- |
| Permisos | Ninguna |
| Efectos secundarios | Ninguno |
| Idempotencia | Idempotente |

## Esquema de entrada

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 2,
      "maxLength": 300,
      "description": "Words the text must contain, in Spanish, as the law writes them (at most 16 words are used)"
    },
    "law": {
      "description": "Search one law or regulation only; required when asOf is a past date",
      "allOf": [
        {
          "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"
        }
      ]
    },
    "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"
          ]
        }
      ]
    },
    "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": [
        {
          "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])))$"
        }
      ]
    },
    "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": [
    "query"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false
}
```

## Esquema de salida

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "law": {
                "$ref": "#/definitions/__schema0"
              },
              "article": {
                "type": "string"
              },
              "headings": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "validFrom": {
                "$ref": "#/definitions/__schema2"
              },
              "validTo": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/__schema2"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "citationUrl": {
                "type": "string"
              },
              "snippet": {
                "type": "string"
              }
            },
            "required": [
              "law",
              "article",
              "headings",
              "validFrom",
              "validTo",
              "citationUrl",
              "snippet"
            ],
            "additionalProperties": false
          }
        },
        "nextCursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "mayBeTruncated": {
          "type": "boolean"
        },
        "stale": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "law": {
                "$ref": "#/definitions/__schema0"
              },
              "kind": {
                "enum": [
                  "failing",
                  "lagging"
                ]
              },
              "since": {
                "type": "string",
                "format": "date-time"
              },
              "note": {
                "allOf": [
                  {
                    "type": "string"
                  }
                ]
              }
            },
            "required": [
              "law",
              "kind",
              "since"
            ],
            "additionalProperties": false
          }
        },
        "notice": {
          "type": "string"
        }
      },
      "required": [
        "results",
        "nextCursor",
        "mayBeTruncated",
        "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"
    }
  },
  "oneOf": [
    {
      "required": [
        "data"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
```

## Herramientas relacionadas

- [`get_tax_law`](/docs/mcp/tools/get_tax_law.md) — **Leer la ley fiscal**: Lee un artículo de una ley fiscal mexicana oficial (o una regla de la RMF) como estaba en una fecha, lista las leyes disponibles o lista lo que cambió en ellas desde una fecha.

- [`get_tax_rules`](/docs/mcp/tools/get_tax_rules.md) — **Leer parámetros fiscales**: Lee los parámetros fiscales con que calcula Exac (tasas de IVA, tarifas de ISR, UMA, salarios mínimos, cuotas del IMSS, reglas de retención) y sus valores en una fecha, con la publicación que establece cada uno.

## Flujo relacionado

[Consulta los flujos canónicos en Inicio rápido](/docs.md)

Documentación completa: https://exac.mx/docs.md
Índice para agentes: https://exac.mx/docs/llms.txt
