Skip to main content
Glama

Validar RFC

validar_rfc
Read-onlyIdempotent

Validates Mexican RFC format for individuals and legal entities, checking structure, date, and check digit offline without confirming SAT registration.

Instructions

Valida el formato de un RFC de persona física (13 caracteres) o moral (12): estructura, fecha y dígito verificador de la homoclave. El dígito verificador es informativo: si no coincide se reporta, pero el RFC no se marca inválido. Corre en el equipo, sin red; no consulta al SAT ni confirma que el RFC exista.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "rfc": "<rfc>"
    },
    "name": "validar_rfc"
  }
}

Input Schema

NameRequiredDescriptionDefault
rfcYesEl RFC; se ignoran mayúsculas, espacios y guiones.

Output Schema

NameRequiredDescriptionDefault
as_ofYesFecha de corte del dataset: la de la última actualización que lo cambió (en los datos curados, la publicación más reciente de sus fuentes). No es la fecha del valor, que va en datos.
datosYes
avisosYesLas advertencias con su código estable: avisos[i].texto es advertencias[i]. Un código desconocido vale como otro.
fuenteYesFuente para citar el dato.
origenYespaquete: los datos y las reglas del paquete mexicoapi, sin red.
fuentesYesTodas las fuentes de la respuesta, empezando por fuente.
advertenciasYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/idempotent/openWorld annotations, it discloses two behaviors an agent could not infer: the homoclave check is reported but never invalidates the RFC, and the tool is fully offline with no SAT query. This is exactly the kind of nuance that prevents misuse of the result.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact sentences, each carrying distinct information: what is validated, how the digit check is treated, and the execution model. The most decision-relevant scope statement comes first, with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need no explanation, and the description covers the remaining gaps: the normalization behavior, the length distinction, the non-fatal digit mismatch, and the offline/no-SAT limitation. Nothing an agent needs to call or interpret this tool is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the normalization rule (case, spaces, hyphens ignored) is already documented. The description nevertheless adds meaning the schema does not convey: that the input is expected to be a 13- or 12-character RFC, which explains why the schema's maxLength is 64 yet valid values are shorter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ("Valida el formato de un RFC") and immediately bounds the scope: length for persona física (13) vs moral (12), plus which components are checked (estructura, fecha, dígito verificador). It also explicitly disclaims what the tool does NOT do, so it cannot be confused with a SAT existence check.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly states the operating context ("Corre en el equipo, sin red; no consulta al SAT") and that the digit check is informational only, which tells an agent when this tool's verdict is sufficient and when a real registry lookup would be needed. It stops short of naming a concrete alternative tool for existence verification, so it falls just below full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.