Skip to main content
Glama

Calculate Mexican payroll (ISR, subsidy, IMSS, Infonavit)

calc_payroll_mx

Use this when you need the Mexican income-tax withholding (ISR, monthly tariff of Anexo 8 RMF), the employment subsidy (subsidio para el empleo), the IMSS employer and employee contributions per branch (sickness and maternity with the 3-UMA excess, disability and life, retirement, unemployment and old age with the current employer ramp, childcare, work risk by class I–V), the optional 5% Infonavit, the net pay and the total employer cost for a gross salary, in MXN. Handles the 25-UMA cap, the minimum-wage rules (no ISR withholding, employer pays the worker quotas), the salario diario integrado with the statutory factor, January (previous UMA) and monthly, biweekly or weekly periods. Tables available for 2026 (tableVersion = DOF date); other years return INVALID_INPUT without charge. Deterministic, offline, no personal data stored.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calc_payroll_mx"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearNoFiscal year of the tables (default 2026).
itemsNoBatch mode: up to 500 items, each with the same fields as a single call. Omit when validating a single value through the top-level fields.
monthNoMonth 1–12. Only January differs: the previous UMA and the January subsidy percentage apply. Default: February onward.
riskClassNoIMSS work-risk class I–V (art. 73 LSS average premiums: I offices, II commerce, III light industry, IV heavy industry, V mining/construction). Default I.I
dailySalaryNoGross daily wage in MXN (cuota diaria), e.g. 315.04. Provide monthlyGross or dailySalary.
periodicityNoPay period: monthly (30.4 days, default), biweekly (15 days) or weekly (7 days). Tariffs and subsidy are scaled by days / 30.4 as in Anexo 8.monthly
monthlyGrossNoGross taxable salary per month in MXN (30.4 days), e.g. 20000. Provide monthlyGross or dailySalary.
northernBorderNotrue if the worker is in the Zona Libre de la Frontera Norte (higher minimum wage). Default false.
includeInfonavitNoAdd the 5% employer Infonavit contribution to the employer cost (default true).
integrationFactorNoSalario diario integrado factor; default 1.0493 (statutory minimum: 15 days aguinaldo, 12 vacation days, 25% premium). Use a higher factor for better benefits or seniority.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it declares the tool deterministic, offline and non-persistent (no personal data stored), states the failure mode and that it is not billed, and discloses the 25-UMA cap and minimum-wage edge cases. That is unusually rich behavioral disclosure for a stateless calculator.

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

Conciseness3/5

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

The content is relevant but delivered as one long paragraph with deeply nested parentheticals (IMSS branches, risk classes I–V), making it hard to scan. The trigger clause is front-loaded, but splitting the legal-rule detail into shorter statements would improve retrieval of key constraints.

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 10-parameter, legally intricate tool with no output schema, the description names the return components, the supported year, the period options, edge cases and the failure behavior. An agent has everything needed to decide and call correctly, with remaining field detail in a fully documented schema.

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 baseline would be 3, but the description adds genuine domain meaning: January uses the previous UMA, periods scale by days/30.4, the integration factor is the statutory 1.0493, and includeInfonavit affects employer cost. It does not mention the batch `items` mode, which is left entirely to the schema.

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 computation (Mexican payroll) and enumerates every output component: ISR withholding, employment subsidy, IMSS branch contributions, 5% Infonavit, net pay and total employer cost. This is unmistakably distinct from every sibling tool, which are all lookups or validators.

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?

"Use this when you need..." gives an explicit trigger and the enumerated components tell the agent when it is the relevant tool. It also bounds usage with "Tables available for 2026... other years return INVALID_INPUT without charge." There is no explicit when-not or named alternative, though no sibling plausibly overlaps.

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.