Skip to main content
Glama

Validar NSS

validar_nss
Read-onlyIdempotent

Validate an 11-digit IMSS social security number and its Luhn check digit locally. Checks format only; it does not query IMSS or confirm the number exists.

Instructions

Valida un número de seguridad social del IMSS: 11 dígitos y dígito verificador (Luhn). Corre en el equipo, sin red; no consulta al IMSS ni confirma que el número 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": {
      "nss": "<nss>"
    },
    "name": "validar_nss"
  }
}

Input Schema

NameRequiredDescriptionDefault
nssYesEl NSS de 11 dígitos; se ignoran 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.2/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so safety is covered; the description adds genuinely new behavioral context — offline/local execution and the critical caveat that a pass only means format+Luhn validity, not real-world existence. It stops short of describing failure behavior (what happens on a malformed NSS), which is the one remaining gap.

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?

One tight sentence with the core validation rule front-loaded, followed by the locality and limitation clauses. No filler and no repetition of schema content.

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

Completeness4/5

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

For a one-parameter, read-only validator with a full output schema and rich annotations, the description covers purpose, method, environment, and the existence caveat — everything an agent needs to call it. Only the treatment of malformed input is left unstated.

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

Parameters3/5

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

Schema coverage is 100% and the schema already documents the single parameter, including that spaces and hyphens are ignored. The description adds the Luhn check-digit detail, but that is the only semantic increment; baseline 3 is appropriate when the schema does the heavy lifting.

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?

States a precise verb+resource ('Valida un número de seguridad social del IMSS') and immediately names the exact rule applied (11 dígitos y dígito verificador / Luhn). The resource is self-evidently distinct from the sibling validators (CURP, RFC, CLABE), so an agent can route correctly without opening another schema.

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?

Gives clear context for when the result is meaningful: it runs locally, makes no IMSS query, and does not confirm the number exists. That frames expectations well. It does not explicitly contrast with the other validar_* siblings, but the resource specificity makes the choice obvious.

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