Skip to main content
Glama

calcular_gastos_compra_inmueble

Read-only

Calcula los impuestos y gastos de comprar un inmueble que NO es una vivienda: plaza de garaje, trastero, local comercial, nave industrial, solar edificable o finca rústica. Úsala cuando la pregunta sea "¿cuánto cuesta comprar un garaje/local/nave/terreno en X?", "¿qué impuestos pago al comprar una parcela?" o "¿ITP o IVA en la compra de un local?". Cada tipo tiene su propia regla: el garaje o trastero independiente no lleva el IVA reducido del anejo, el local y la nave admiten la renuncia a la exención de IVA, el solar depende de si vende un promotor o un particular, y la finca rústica está exenta de IVA y no genera plusvalía municipal. Para una vivienda usa "consulta_compra_vivienda", que además estima la hipoteca y el ahorro necesario.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "precio": "<precio>",
      "ccaa": "<ccaa>",
      "tipo_inmueble": "<tipo_inmueble>"
    },
    "name": "calcular_gastos_compra_inmueble"
  }
}

Input Schema

NameRequiredDescriptionDefault
ccaaYesComunidad autónoma donde está el inmueble (determina el ITP)
precioYesPrecio de compra del inmueble en euros
gestoriaNoGastos de gestoría en euros. Por defecto, los de la app de cada tipo: vivienda 300, garaje 300, trastero 300, local 500, nave 500, solar 500, finca rústica 400.
obra_nuevaNotrue = primera entrega del promotor (tributa por IVA). false o ausente = segunda mano (tributa por ITP salvo renuncia a la exención).
tipo_inmuebleYesTipo de inmueble. "solar_edificable" = terreno urbano donde se puede construir; "finca_rustica" = suelo rústico o agrario, exento de IVA.
perfil_compradorNoPerfil del comprador. Solo produce efecto en vivienda y en anejos comprados con ella: los tipos reducidos de ITP son exclusivos de la vivienda habitual.
anejo_de_viviendaNoSolo para garaje y trastero: true si se compra JUNTO con la vivienda como anejo, false si se compra por separado. Decide el IVA de obra nueva (10% como anejo, 21% suelto) y el ITP de segunda mano (el de la vivienda, con el perfil del comprador, como anejo; el general, suelto). Por defecto false (compra suelta), y la respuesta avisa de que con la vivienda podría tributar menos.
renuncia_exencion_ivaNoSolo para local, nave y finca rústica en segunda mano: true si el vendedor renuncia a la exención de IVA (art. 20.Dos LIVA). Exige que ambas partes sean empresarios o profesionales con derecho a deducción. La operación pasa de ITP a IVA con inversión del sujeto pasivo.
vendedor_es_empresarioNoSolo para solar edificable: true si vende un promotor o empresario (IVA 21% + AJD), false si vende un particular (ITP). Por defecto false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / anejo_de_vivienda / description
      Previous value: -"Solo para garaje y trastero: true si se compra JUNTO con la vivienda como anejo (IVA reducido 10% en obra nueva), false si se compra por separado (IVA 21%). Por defecto true."New value: +"Solo para garaje y trastero: true si se compra JUNTO con la vivienda como anejo, false si se compra por separado. Decide el IVA de obra nueva (10% como anejo, 21% suelto) y el ITP de segunda mano (el de la vivienda, con el perfil del comprador, como anejo; el general, suelto). Por defecto false (compra suelta), y la respuesta avisa de que con la vivienda podría tributar menos."
  2. Changed1 schema field changed
    • changedInput schema / properties / gestoria / description
      Previous value: -"Gastos de gestoría en euros. Por defecto 500."New value: +"Gastos de gestoría en euros. Por defecto, los de la app de cada tipo: vivienda 300, garaje 300, trastero 300, local 500, nave 500, solar 500, finca rústica 400."
  3. Added

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered and the description does not need to restate it. The description does add real behavioral context: per-type tax regimes (garaje suelto without reduced VAT, renuncia a la exención only for local/nave, solar depends on whether the seller is a promoter, finca rústica VAT-exempt with no plusvalía municipal) and a disclosure that the response warns when buying the anejo with the home could reduce tax. It still says nothing about what the returned figures look like or how defaults surface in the output.

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 purpose, then usage triggers, then the differentiating tax rules — a sensible order with no filler sentences. It runs long and partially re-explains rules that already appear in the per-parameter schema descriptions (e.g. the anejo VAT/ITP split), which is mild redundancy rather than waste.

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 9-parameter, no-output-schema calculator with only a readOnly annotation, the description supplies everything needed to call it correctly: scope boundaries, the sibling to use for housing, required context (CCAA drives ITP), and the tax logic that makes each flag matter. Nothing an agent needs before invoking it is missing.

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 the schema already defines every parameter, and the description gains no credit for restating it. Above that baseline it explains the decision logic behind three non-obvious flags: anejo_de_vivienda changes both VAT (10% vs 21%) and ITP regime, renuncia_exencion_iva requires both parties to be businesses with deduction rights, and vendedor_es_empresario flips solar from ITP to IVA plus AJD.

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 resource ("Calcula los impuestos y gastos de comprar un inmueble") and immediately narrows scope to non-residential property types, listing garaje, trastero, local comercial, nave industrial, solar edificable and finca rústica. It explicitly names the sibling tool for the excluded case ("Para una vivienda usa consulta_compra_vivienda"), so an agent can route correctly without opening either 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?

Provides explicit when-to-use triggers as natural-language user questions ("¿cuánto cuesta comprar un garaje/local/nave/terreno en X?", "¿ITP o IVA en la compra de un local?") plus an explicit exclusion routing to consulta_compra_vivienda with the reason (it also estimates mortgage and required savings). Both the positive trigger and the alternative are named.

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