Skip to main content
Glama

calcular_impuestos_divorcio

Read-only

Estima el impacto en el IRPF de un divorcio o separación en España: reducción por pensión compensatoria al cónyuge (para quien la paga) o su tributación (para quien la cobra), mínimo por descendientes según la custodia, imputación de renta inmobiliaria si sales de la vivienda, y deducción por hipoteca anterior a 2013. La liquidación de la sociedad de gananciales no está sujeta a IRPF. No calcula ITP/AJD ni plusvalía municipal. Modelo estatal orientativo (sin variaciones por CCAA ni regímenes forales).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regimenYesRégimen económico matrimonial
custodiaNoTipo de custodia: "exclusiva-tengo" (100% del mínimo), "compartida" (50%), "exclusiva-otro" (0%).
num_hijosNoNúmero de hijos (1-4; 4 = "4 o más"). OBLIGATORIO si tiene_hijos y custodia: sin él no se puede calcular el mínimo por descendientes y la llamada se rechaza.
rol_pensionNo"pago" (la pagas, reduce tu base) o "cobro" (la recibes, tributa como renta).
tiene_hijosNo¿Hay hijos a cargo? Por defecto false.
tiene_viviendaNo¿Hay vivienda familiar en propiedad? Por defecto false.
pension_mensualNoImporte mensual de la pensión compensatoria (€). OBLIGATORIO (y mayor que 0) si tiene_pension_conyuge y rol_pension.
valor_catastralNoValor catastral de la vivienda (€). OBLIGATORIO si posicion_vivienda = "salgo" y vivienda_asignada_hijos no es true: sin él no hay imputación que calcular y la llamada se rechaza.
catastro_revisadoNo¿El valor catastral se ha revisado en los últimos 10 años? true → tipo 1,1%; false → 2%. Por defecto false.
posicion_hipotecaNo"me-quedo" (sigues pagándola y deduces) u "otro-paga". OBLIGATORIO si tiene_hipoteca_antigua: sin él no se dice nada sobre la deducción, porque afirmar que se pierde sería inventarlo.
posicion_viviendaNoQué pasa con la vivienda. Solo "salgo" genera imputación de renta inmobiliaria.
cuota_hipoteca_anualNoCuota anual de la hipoteca que pagas tú (€). OBLIGATORIA (y mayor que 0) si posicion_hipoteca = "me-quedo".
porcentaje_propiedadNoTu porcentaje de propiedad de la vivienda (%). Por defecto 50.
tiene_pension_conyugeNo¿Hay pensión compensatoria al ex cónyuge? Por defecto false.
tiene_hipoteca_antiguaNo¿Hipoteca sobre la vivienda habitual anterior a 2013? (deducción transitoria). Por defecto false.
ingresos_brutos_anualesYesIngresos brutos anuales del trabajo (€)
vivienda_asignada_hijosNo¿El uso de la vivienda se asigna a los hijos? (exime la imputación de renta). Por defecto false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / cuota_hipoteca_anual / description
      Previous value: -"Cuota anual de la hipoteca que pagas tú (€)"New value: +"Cuota anual de la hipoteca que pagas tú (€). OBLIGATORIA (y mayor que 0) si posicion_hipoteca = \"me-quedo\"."
    • changedInput schema / properties / num_hijos / description
      Previous value: -"Número de hijos (1-4; 4 = \"4 o más\"). Solo si tiene_hijos."New value: +"Número de hijos (1-4; 4 = \"4 o más\"). OBLIGATORIO si tiene_hijos y custodia: sin él no se puede calcular el mínimo por descendientes y la llamada se rechaza."
    • changedInput schema / properties / pension_mensual / description
      Previous value: -"Importe mensual de la pensión compensatoria (€)"New value: +"Importe mensual de la pensión compensatoria (€). OBLIGATORIO (y mayor que 0) si tiene_pension_conyuge y rol_pension."
    • changedInput schema / properties / posicion_hipoteca / description
      Previous value: -"\"me-quedo\" (sigues pagándola y deduces) u \"otro-paga\"."New value: +"\"me-quedo\" (sigues pagándola y deduces) u \"otro-paga\". OBLIGATORIO si tiene_hipoteca_antigua: sin él no se dice nada sobre la deducción, porque afirmar que se pierde sería inventarlo."
    • changedInput schema / properties / valor_catastral / description
      Previous value: -"Valor catastral de la vivienda (€). Solo relevante si sales de ella."New value: +"Valor catastral de la vivienda (€). OBLIGATORIO si posicion_vivienda = \"salgo\" y vivienda_asignada_hijos no es true: sin él no hay imputación que calcular y la llamada se rechaza."
  2. Added

TDQS

A4.1/5.0
Behavior4/5

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

The annotation readOnlyHint=true already tells the agent this is a read-only calculation, but the description adds significant behavioral context: it specifies this is an orientative estimation, declares the liquidation of gananciales is not subject to IRPF, and states the model does not cover regional or foral rules. This goes beyond the simple read-only flag and helps set accurate expectations.

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?

The description is a single moderately sized paragraph that is efficiently organized: it starts with the main purpose, lists the covered items, then states exclusions and limitations. Each sentence delivers needed information without fluff. It could be slightly more structured with bullets, but it is concise enough given the tool's complexity.

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?

Given the high complexity (17 parameters, conditional mandatory fields), the description covers the tool's scope of application, exclusions, and model validity limitations. It does not explicitly mention conditional parameter requirements, but those are fully documented in the schema. The description is complete for the behavioral contract, though it omits a direct note on how to handle regional variations when interpreting results.

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 the baseline for this dimension is 3. The description does not add parameter-specific meaning beyond what the schema provides, but it does provide overall context that affects interpretation, such as the state-level model limitation. This is consistent with the baseline.

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 clearly states the tool estimates the IRPF impact of divorce/separation in Spain and lists the specific tax items it covers (pensión compensatoria, mínimo por descendientes, imputación de renta, deducción por hipoteca). It uses a specific verb and resource, distinguishing itself from general IRPF calculators like calcular_irpf by focusing on the divorce context.

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?

The description provides clear context for when to use the tool: it explicitly excludes ITP/AJD and plusvalía municipal, and notes it is a state-level model without CCAA or foral variations. This gives the agent boundaries on applicability, though it does not name alternative tools explicitly. The exclusions imply that for other taxes or regional nuances, one should use a different tool, but it doesn't say 'use X instead'.

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