Skip to main content
Glama

calcular_deduccion_maternidad_irpf

Read-only

Calcula la deducción por maternidad en el IRPF (art. 81 LIRPF): 1.200 €/año por hijo menor de 3 años, más el incremento por gastos de guardería (hasta 1.000 €/año POR CADA HIJO). Da derecho cualquiera de las TRES vías alternativas del art. 81.1: estar de alta en la Seguridad Social o mutualidad, percibir prestación o subsidio de desempleo al nacer el menor, o darse de alta después del nacimiento y alcanzar 30 días cotizados (esta última suma 150 € por hijo, art. 81.3). La reforma de 2023 (Ley 31/2022) amplió esas vías, no las suprimió: sin ninguna de ellas la deducción es 0 €. Desde 2023 no hay tope por cotizaciones a la Seguridad Social. Descuenta el abono anticipado ya cobrado.

Input Schema

NameRequiredDescriptionDefault
hijosYesLista de hijos menores de 3 años
situacionNoVía del art. 81.1 por la que se accede: "alta" (de alta en SS o mutualidad), "desempleo" (prestación o subsidio de desempleo al nacer el menor), "alta-posterior" (alta tras el nacimiento con 30 días cotizados; suma 150 €/hijo) o "ninguna" (ninguna de las tres → deducción 0 €). Por defecto "alta".
madre_en_activoNoOBSOLETO: usar "situacion". Solo se lee si no se indica "situacion": false equivale a "ninguna" y true a "alta".
importe_abono_anticipado_cobradoNoImporte ya cobrado por abono anticipado (modelo 140) en €. Por defecto 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / cotizaciones_ss_anuales
      Removed value: -{
      -  "description": "Suma de las cotizaciones de la madre a la Seguridad Social en el año (€) — límite de la deducción base",
      -  "minimum": 0,
      -  "type": "number"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "hijos",
      -  "cotizaciones_ss_anuales"
      -]New value: +[
      +  "hijos"
      +]
  2. Changed3 schema fields changed
    • changedInput schema / properties / hijos / items / properties / gastos_guarderia_anuales / description
      Previous value: -"Gastos anuales de guardería o centro autorizado de este hijo (€). Por defecto 0."New value: +"Gastos anuales de guardería o centro autorizado de este hijo (€). Por defecto 0. El tope de 1.000 € se aplica a cada hijo por separado."
    • changedInput schema / properties / madre_en_activo / description
      Previous value: -"¿La madre está de alta como trabajadora o cobrando prestación contributiva? Por defecto true."New value: +"OBSOLETO: usar \"situacion\". Solo se lee si no se indica \"situacion\": false equivale a \"ninguna\" y true a \"alta\"."
    • addedInput schema / properties / situacion
      Added value: +{
      +  "description": "Vía del art. 81.1 por la que se accede: \"alta\" (de alta en SS o mutualidad), \"desempleo\" (prestación o subsidio de desempleo al nacer el menor), \"alta-posterior\" (alta tras el nacimiento con 30 días cotizados; suma 150 €/hijo) o \"ninguna\" (ninguna de las tres → deducción 0 €). Por defecto \"alta\".",
      +  "enum": [
      +    "alta",
      +    "desempleo",
      +    "alta-posterior",
      +    "ninguna"
      +  ],
      +  "type": "string"
      +}
  3. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only supply readOnlyHint and a title, so the description carries the behavioral burden and does so well: it discloses the €150/hijo surcharge, the removal of the SS-contribution cap since 2023, that the 2023 reform expanded rather than removed routes, and that already-received advance payments are subtracted. This is rich context well beyond the annotation.

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?

Dense but front-loaded with the core calculation (1.200 €/año, guardería increment) before the legal caveats. Every clause carries substantive information, though the run-on legal recitation is slightly heavier than strictly needed to invoke the tool.

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 complex tax-deduction calculator with no output schema, the description gives the agent enough legal and calculation context to invoke it correctly. It implicitly conveys the result is the net deduction (after subtracting advance payments) but never explicitly describes the return shape.

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 description coverage is 100%, so all four parameters (including the situacion enum, the deprecated madre_en_activo, and gastos_guarderia_anuales) are already documented. The description reinforces the situacion semantics and the per-child €1,000 cap but adds little the schema does not already say, making the baseline 3 appropriate.

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 resource (deducción por maternidad en el IRPF, art. 81 LIRPF) with concrete figures, immediately distinguishing it from siblings like calcular_irpf, calcular_deduccion_discapacidad, and calcular_prestacion_maternidad_paternidad.

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?

Provides clear eligibility context — the three alternative routes of art. 81.1 and the explicit note that with none of them the deduction is 0 € — which tells the agent when this tool yields a result. However, it never names an alternative sibling tool or states when NOT to use this one, so routing guidance is implicit rather than explicit.

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