Skip to main content
Glama

calcular_plusvalias_irpf

Read-only

Calcula el IRPF sobre la ganancia patrimonial por vender acciones, fondos de inversión, inmuebles u otros activos. Determina la ganancia neta (con gastos), si es a largo plazo (>12 meses), la tributación en la base del ahorro (tramos 19-30%), el tipo efectivo y la ganancia tras impuestos. Permite compensar pérdidas de ejercicios anteriores. IMPORTANTE: si el usuario está comparando donar en vida vs esperar a la herencia de un inmueble, NO uses esta herramienta para estimar el IRPF del donante por tu cuenta: usa directamente "comparar_donacion_vs_herencia", que ya incluye ese IRPF junto al ISD y la plusvalía municipal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fecha_ventaYesFecha de venta en formato YYYY-MM-DD
tipo_activoNoTipo de activo (solo informativo). Por defecto "otro".
fecha_compraYesFecha de compra en formato YYYY-MM-DD
gastos_ventaNoGastos de venta: comisiones, notaría... (€). Por defecto 0.
precio_ventaYesPrecio de venta del activo en euros
gastos_compraNoGastos de compra: comisiones de bróker, notaría (inmuebles)... (€). Por defecto 0.
precio_compraYesPrecio de compra del activo en euros
saldo_compensacionNoPérdidas patrimoniales de ejercicios anteriores pendientes de compensar (€). Por defecto 0.

TDQS

A4.4/5.0
Behavior4/5

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

The description adds behavioral context beyond annotations: it explains the tool allows compensating prior-year losses, and details the calculation outputs (net gain, tax brackets, effective rate). Annotations already indicate readOnlyHint=true, so the description provides useful additional behavioral traits without contradiction.

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 reasonably concise given the complexity, with all sentences adding value. It is front-loaded with the main purpose, followed by details, and ends with a critical usage note. It could be slightly more streamlined, but it is well structured and efficient.

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?

Despite no output schema, the description explicitly lists the outputs: net gain, long-term indicator, tax brackets, effective rate, and after-tax gain. It also covers the loss compensation feature. For a complex tax calculation tool, this provides sufficient context for correct invocation and interpretation of 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 coverage is 100%, so baseline is 3. The description adds overall context (e.g., mentions that 'tipo_activo' is only informative, and how parameters like 'saldo_compensacion' are used). However, it does not add much per-parameter detail beyond the schema descriptions. The extra context is helpful but limited.

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 it calculates IRPF on capital gains from selling various assets (acciones, fondos, inmuebles, otros). It specifies what it determines (net gain, long-term vs short-term, tax brackets, effective rate, after-tax gain, loss compensation). It also explicitly differentiates from the sibling tool 'comparar_donacion_vs_herencia' by stating when not to use it.

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?

The description explains the tool is for calculating IRPF on capital gains from asset sales. It provides a clear exclusion: if the user is comparing donation vs inheritance, do not use this tool and instead use 'comparar_donacion_vs_herencia'. This gives explicit when-to-use and when-not-to-use guidance with an alternative.

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.

TDQS

A3.9/5.0
Disambiguation3/5

There are many tools with overlapping domains (e.g., multiple retirement calculators, home buying calculators), but detailed descriptions and explicit guidance on when to use comprehensive vs. specific tools help clarify. However, the sheer number (49) still creates potential confusion for an agent.

Naming Consistency5/5

All tools follow a consistent convention: infinitive verb or noun prefix (calcular, comparar, consulta) followed by descriptive noun phrase in snake_case. No mixed styles or irregularities.

Tool Count3/5

49 tools is high but justifiable given the broad scope of Spanish financial/legal calculations. It leans toward the heavy side but remains within a manageable range for a comprehensive server.

Completeness4/5

The tool set covers a wide spectrum of personal finance: income, taxes, housing, inheritance, self-employment, investments, etc. Only minor gaps exist (e.g., no separate tool for rental income beyond the alquiler tools, but included in IRPF).

Resources