Validate RFC
validate_rfcValidate a Mexican RFC taxpayer ID, split it into parts, and verify the SAT modulus-11 check digit, including generic RFCs. Reports format validity, not SAT registration status.
Instructions
Validate a Mexican RFC (Registro Federal de Contribuyentes) — the SAT taxpayer ID — and break it into its parts. Works for both shapes: 13 characters for a persona física (individual) and 12 for a persona moral (company).
The last character is a modulus-11 check digit over the preceding ones, and this checks it. Two SAT-issued generics are special-cased and reported as such:
XAXX010101000 (público en general) does NOT satisfy the check-digit algorithm — the arithmetic asks for a '4' where the SAT wrote a '0'. It is valid by decree, not by maths, which is exactly why so many home-grown validators wrongly reject invoices to the general public.
XEXX010101000 (residentes en el extranjero) DOES satisfy it on its own.
The tool reports is_generic and check_digit_satisfied separately so you never have to conflate the two.
Structural validity is not registration. A well-formed RFC may belong to nobody. Only the SAT can say whether one is registered and active, and this server never asks.
Args:
value (string): the RFC. Spaces, dashes and lower case are normalised away.
response_format ('markdown' | 'json'): output format (default 'markdown').
Returns: { input, normalized, valid, kind, is_generic, generic_note, parts{iniciales, fecha, homoclave, digito}, birth_date, expected_check_digit, check_digit_satisfied, errors[{code, message}], findings[] }.
Example: "Is GODE561231GR8 a valid RFC?" -> validate_rfc(value="GODE561231GR8").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The RFC to validate, e.g. 'GODE561231GR8' (individual) or 'MAB9307148T4' (company). | |
| response_format | No | Output format: 'markdown' for a human-readable summary (default) or 'json' for the full structured payload. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| input | Yes | ||
| parts | Yes | ||
| valid | Yes | ||
| errors | Yes | ||
| findings | Yes | ||
| birth_date | Yes | ||
| is_generic | Yes | ||
| normalized | Yes | ||
| generic_note | Yes | ||
| expected_check_digit | Yes | ||
| check_digit_satisfied | Yes |