Skip to main content
Glama

calcu.mx — calculadoras de México

Liquidación y finiquito (Ley Federal del Trabajo)

calcular_liquidacion
Read-onlyIdempotent

Calcula lo que corresponde a un trabajador en México al terminar la relación laboral, según la Ley Federal del Trabajo. Desglosa: aguinaldo proporcional (15 días al año), vacaciones del periodo en curso más las pendientes, prima vacacional (25 %), prima de antigüedad (12 días por año con tope de 2 salarios mínimos; procede en cualquier despido o en renuncia con 15+ años), y, sólo en despido injustificado, la indemnización constitucional de 3 meses de salario integrado y, si se pide, los 20 días por año. Supone contrato por tiempo indeterminado y prestaciones mínimas de ley; importes brutos antes de ISR; no incluye salarios caídos. Devuelve cada concepto, el total del finiquito, el de la indemnización y el total.

Input Schema

NameRequiredDescriptionDefault
tipo_salidaYesMotivo de la salida. Sólo el despido injustificado genera indemnización.
fecha_salidaYesFecha de terminación de la relación laboral, AAAA-MM-DD.
fecha_ingresoYesFecha de ingreso, AAAA-MM-DD.
salario_diarioYesSalario diario ordinario en pesos (sueldo mensual ÷ 30).
zona_frontera_norteNotrue si aplica el salario mínimo de la frontera (cambia el tope de la prima de antigüedad).
incluir_20_dias_por_anioNoSólo en despido injustificado: sumar los 20 días por año (Art. 50 fr. II). No proceden en automático; el importe se informa aunque quede en false.
incluir_prima_antiguedadNoSumar la prima de antigüedad cuando proceda (despido de cualquier tipo, o renuncia con 15+ años).
dias_vacaciones_pendientesNoDías de vacaciones NO disfrutados de periodos ANTERIORES; las del periodo en curso se calculan solas.
incluir_aguinaldo_proporcionalNoSumar el aguinaldo proporcional del año (false si ya se pagó).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish it as a read-only, idempotent, closed-world calculation, and the description adds substantive behavioral context on top: gross amounts before ISR, exclusion of salarios caídos, the assumption of an indefinite-term contract with minimum benefits, and which components are returned. Those caveats materially affect interpretation of the result and are not encoded in any structured field.

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

Conciseness4/5

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

Content is front-loaded (what it computes, then the breakdown, then assumptions, then outputs) and every sentence carries weight. The breakdown and the assumptions run together in a single dense block, which slightly hurts scanability for nine parameters.

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?

For a nine-parameter calculator with no output schema, the description covers the legal basis, computational assumptions, exclusions and the shape of the returned values (each concept, finiquito total, indemnización total, grand total). Nothing needed to call it correctly 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 parameter meaning is already documented, yet the description adds genuine semantics beyond it: the 15-day annual aguinaldo, 25% vacation premium, 12 days per year of seniority premium with a 2-minimum-wage cap, and the rule that the 20-days-per-year indemnity is not automatic. This explains the legal logic driving the boolean toggles rather than restating them.

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 specific verb (calcula) and a precise resource (lo que corresponde al trabajador al terminar la relación laboral bajo la LFT), then enumerates the exact concepts computed (aguinaldo, vacaciones, prima vacacional, prima de antigüedad, indemnización). It is unmistakable against siblings like calcular_sueldo_neto, calcular_iva or calcular_pension_ley73, which cover different domains.

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 applicability conditions: assumes an indefinite-term contract with minimum statutory benefits, excludes salarios caídos and ISR, and specifies which concepts only arise on unjustified dismissal. Boundary conditions are implicit (determinate contracts, union contracts or superior benefits fall outside), but no explicit alternative tool or when-not statement is named.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources