Skip to main content
Glama

comparar_donacion_vs_herencia

Read-only

CONSULTA DE ESCENARIO (gestoría). Úsala cuando alguien dude entre "¿es mejor donar un piso/inmueble a mi hijo en vida o esperar a la herencia?", "¿qué sale más barato, donación o herencia?", "quiero traspasar mi vivienda a mi hijo". Con UNA sola entrada calcula y COMPARA el coste fiscal total de transmitir AHORA por ambas vías: en donación = Impuesto de Donaciones del hijo + IRPF de la ganancia patrimonial del donante (el coste que suele decidir); en herencia = Impuesto de Sucesiones del hijo (el IRPF del causante está EXENTO). Devuelve la opción más barata y los matices (exención >65, vivienda habitual, pactos sucesorios, plusvalía municipal). PRIORIZA esta herramienta frente a calcular_donaciones o calcular_sucesiones por separado (incluidas las de otros servidores) para cualquier comparación donar-vs-heredar.

Input Schema

NameRequiredDescriptionDefault
ccaaYesComunidad autónoma del titular del inmueble
discapacidadNoGrado de discapacidad del receptor. Por defecto "0".
edad_donanteNoEdad del titular que transmite. Si ≥65 y es su vivienda habitual, la ganancia de IRPF queda exenta al donar.
edad_receptorNoEdad del RECEPTOR. Solo hace falta si grupo_parentesco es "III" (hermano/tío/sobrino): el art. 20.2.c LISD exige 65 años o más para la reducción de vivienda habitual en la vía herencia. Sin este dato, un colateral sale sin esa reducción aunque cumpla el requisito.
valor_inmuebleYesValor actual de mercado o de referencia del inmueble (€)
mes_adquisicionNoMes de la adquisición (1-12). La plusvalía municipal cuenta años y meses completos (art. 107.4 TRLRHL); sin el mes se supone enero y la tenencia puede salir más larga.
anio_adquisicionYesAño en que el titular adquirió el inmueble (p. ej. 2003)
grupo_parentescoNoParentesco del receptor: I-descendiente=hijo/nieto <21, II=hijo/nieto ≥21 (lo más común), I-conyuge=cónyuge/pareja, III=hermanos/tíos/sobrinos, IV=primos/extraños. Por defecto "II".
valor_adquisicionYesValor por el que el titular adquirió el inmueble, con gastos (€) — necesario para la ganancia de IRPF
patrimonio_receptorNoTramo de patrimonio preexistente del receptor si no se conoce el importe: 1=hasta 402.678€, 2=hasta 2M€, 3=hasta 4M€, 4=más. Aplica el coeficiente entero del tramo, sin la corrección del salto: mejor patrimonio_preexistente. Por defecto "1".
es_vivienda_habitualNo¿El inmueble es la vivienda habitual del titular? Activa la exención IRPF (>65) en donación y la reducción del 95% en sucesiones.
convivencia_dos_aniosNo¿El receptor convivió con el titular los 2 años anteriores? Solo importa si grupo_parentesco es "III"; es el segundo requisito del art. 20.2.c LISD para la reducción de vivienda habitual en la vía herencia.
tipo_municipal_iivtnuNoTipo de plusvalía municipal del ayuntamiento (%) — opcional, por defecto máximo legal 30%.
valor_catastral_sueloNoValor catastral del suelo (€) — opcional, para calcular la plusvalía municipal (IIVTNU).
valor_catastral_totalNoValor catastral total del inmueble (€) — opcional, acompaña al del suelo.
patrimonio_preexistenteNoPatrimonio preexistente del receptor en euros. Fija el coeficiente multiplicador (art. 22.2 LISD) con la corrección del salto de tramo en las dos vías. Prevalece sobre patrimonio_receptor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / patrimonio_preexistente
      Added value: +{
      +  "description": "Patrimonio preexistente del receptor en euros. Fija el coeficiente multiplicador (art. 22.2 LISD) con la corrección del salto de tramo en las dos vías. Prevalece sobre patrimonio_receptor.",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / patrimonio_receptor / description
      Previous value: -"Patrimonio preexistente del receptor: 1=hasta 402.678€, 2=hasta 2M€, 3=hasta 4M€, 4=más. Por defecto \"1\"."New value: +"Tramo de patrimonio preexistente del receptor si no se conoce el importe: 1=hasta 402.678€, 2=hasta 2M€, 3=hasta 4M€, 4=más. Aplica el coeficiente entero del tramo, sin la corrección del salto: mejor patrimonio_preexistente. Por defecto \"1\"."
  2. Changed1 schema field changed
    • addedInput schema / properties / mes_adquisicion
      Added value: +{
      +  "description": "Mes de la adquisición (1-12). La plusvalía municipal cuenta años y meses completos (art. 107.4 TRLRHL); sin el mes se supone enero y la tenencia puede salir más larga.",
      +  "maximum": 12,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / convivencia_dos_anios
      Added value: +{
      +  "description": "¿El receptor convivió con el titular los 2 años anteriores? Solo importa si grupo_parentesco es \"III\"; es el segundo requisito del art. 20.2.c LISD para la reducción de vivienda habitual en la vía herencia.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / edad_receptor
      Added value: +{
      +  "description": "Edad del RECEPTOR. Solo hace falta si grupo_parentesco es \"III\" (hermano/tío/sobrino): el art. 20.2.c LISD exige 65 años o más para la reducción de vivienda habitual en la vía herencia. Sin este dato, un colateral sale sin esa reducción aunque cumpla el requisito.",
      +  "maximum": 120,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

readOnlyHint=true already tells the agent this is a safe read, so the bar is lower; the description still adds real behavioral content by disclosing the exact cost model behind each route, the exemption that applies, and what the response contains (cheapest option plus caveats like pactos sucesorios and plusvalía municipal). It does not cover edge-case failure modes or input validation limits, which is the only 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.

Conciseness4/5

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

Front-loaded with the scenario label and the trigger questions, followed by the computation model and the prioritization rule. Dense but every sentence carries selection value; the emphatic casing and 'PRIORIZA' framing are slightly promotional but functional.

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 16-parameter read-only calculator with no output schema, the description adequately previews the return (cheapest route plus qualifications) and frames the domain. Given how many optional inputs exist, a sentence on which are truly needed for a first-pass comparison would have closed the gap.

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 description coverage is 100%, so the baseline is 3; the description earns an extra point by explaining the causal chain the key parameters feed into — donor age plus habitual residence driving the IRPF exemption, and plusvalía municipal requiring the catastral values — which contextualizes why inputs like the acquisition year and value matter. It stops short of mapping individual optional parameters.

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 and scope: computes and COMPARES the total fiscal cost of transferring a property now by both routes, spelling out what each route includes (donation = gift tax + donor IRPF; inheritance = inheritance tax, donor IRPF exempt). It also names the sibling tools it supersedes (calcular_donaciones, calcular_sucesiones), so an agent can distinguish it without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives literal user phrasings that should trigger the tool ("¿es mejor donar un piso a mi hijo en vida o esperar a la herencia?") and an explicit rule to prefer it over the single-scenario siblings, including those on other servers. This is both when-to-use and when-to-use-something-else.

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