Skip to main content
Glama

Alquiler y rentabilidad de un municipio

rentabilidad_alquiler
Read-onlyIdempotent

Alquiler mediano de pisos en un municipio (€/m² al mes, con la horquilla de la mitad central de contratos), según los alquileres declarados a Hacienda (Sistema Estatal de Referencia del Precio del Alquiler, Ministerio de Vivienda), y la rentabilidad bruta de comprar allí un piso de banco a lo que piden ahora. Con metros, el alquiler estimado de un piso de ese tamaño; con precio, su rentabilidad bruta. Sin municipio, la tabla de la provincia.

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": {
      "provincia": "<provincia>"
    },
    "name": "rentabilidad_alquiler"
  }
}

Input Schema

NameRequiredDescriptionDefault
m2NoMetros del piso, para estimar su alquiler.
precioNoPrecio de compra, en euros, para la rentabilidad bruta de ese piso (requiere m2).
municipioNoNombre del municipio; sin él, los municipios de la provincia ordenados por rentabilidad.
provinciaYesProvincia del municipio.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint, so safety is covered. The description adds real context beyond them — the data source (Hacienda / Ministerio de Vivienda), the units, the interquartile range, and the province-table fallback — but says nothing about return shape, coverage limits, or data recency.

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 core output and followed by two short sentences covering the conditional modes and the fallback. The parenthetical source attribution is long but earns its place as provenance; otherwise there is little waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description only loosely conveys what is returned (a rent figure with a range, a yield, or a ranked province table). For a 4-parameter analytical lookup this is adequate but leaves the response structure and edge cases (e.g. missing municipality data) unstated.

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 the schema already documents all four parameters including that precio requires m2. The description reinforces the m2→rent and precio→yield mapping and the no-municipio default, but adds little syntax or semantic detail the schema lacks, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource and computation: median rent (€/m²/month with interquartile range) plus gross rental yield for a municipality, citing the source registry. It is clearly distinguishable from generic listing tools, though it never explicitly contrasts itself with siblings like resumen_mercado or ficha_vivienda.

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?

It lays out the mode-selection rules directly: with m2 you get an estimated rent for that size, with precio you get gross yield, and without municipio you get the province-wide table. What's missing is guidance on when to choose this tool over sibling market-data tools.

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