Skip to main content
Glama

¿Cómo va España?

Resultados de las elecciones

resultados_elecciones
Read-onlyIdempotent

Resultados de las elecciones generales al Congreso desde 1977: votos, porcentaje, escaños y participación. Con lugar, el resultado en una comunidad autónoma o provincia (desde 1986) o en un municipio (las dos últimas con escrutinio definitivo), con el de España al lado. Sin fecha, las más recientes. Con convocatoria, también las últimas autonómicas de cada comunidad (lugar: la comunidad), las europeas desde 1987 y las municipales desde 1979 (suma de España). Úsalo para «¿quién ganó en 2011?», «resultados en Cádiz», «¿qué se votó en Getafe en 2023?», «resultado de las últimas elecciones andaluzas» o «europeas de 2019».

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "resultados_elecciones"
  }
}

Input Schema

NameRequiredDescriptionDefault
tipoNoPara elegir cuando el nombre vale para varios (Málaga es municipio y provincia).
fechaNoEl año de las elecciones (2023) o su fecha (2019-11-10; en 2019 hubo dos). Sin ella, las más recientes.
lugarNoUna comunidad autónoma, una provincia o un municipio (nombre o código INE). Sin él, el resultado nacional con escaños.
todasNo`true` para la lista de todas las elecciones generales desde 1977 (o de las europeas o municipales, con `convocatoria`) con su ganador y su participación.
limiteNoCuántos resultados como mucho (20 por defecto).
convocatoriaNoQué elecciones: `generales` (por defecto), `autonomicas` (las últimas de cada comunidad; con `lugar`, las de esa comunidad), `europeas` o `municipales` (el conjunto de España; `fecha` elige el año y `todas` las lista).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / fecha / anyOf
      Removed value: -[
      -  {
      -    "maxLength": 12,
      -    "type": "string"
      -  },
      -  {
      -    "maximum": 9007199254740991,
      -    "minimum": -9007199254740991,
      -    "type": "integer"
      -  }
      -]
    • addedInput schema / properties / fecha / maxLength
      Added value: +12
    • addedInput schema / properties / fecha / type
      Added value: +"string"
  2. Changed2 schema fields changed
    • addedInput schema / properties / convocatoria
      Added value: +{
      +  "description": "Qué elecciones: `generales` (por defecto), `autonomicas` (las últimas de cada comunidad; con `lugar`, las de esa comunidad), `europeas` o `municipales` (el conjunto de España; `fecha` elige el año y `todas` las lista).",
      +  "enum": [
      +    "generales",
      +    "autonomicas",
      +    "europeas",
      +    "municipales"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / todas / description
      Previous value: -"`true` para la lista de todas las elecciones generales desde 1977 con su ganador y su participación."New value: +"`true` para la lista de todas las elecciones generales desde 1977 (o de las europeas o municipales, con `convocatoria`) con su ganador y su participación."
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered. The description adds behavior beyond that: defaults to the most recent election when `fecha` is omitted, returns the Spanish national figure alongside the territorial one, and notes that municipality results use definitive counts for the last two elections. Pagination/limit behavior is only in the schema.

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 resource and its payload, then proceeds systematically through each parameter mode. The closing example queries are dense but earn their place by disambiguating the combinations; the prose is packed but not padded.

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 6-parameter, zero-required tool with no output schema and heavily interdependent parameters, the description covers the meaningful combinations and defaults well. It does not detail the shape of the returned series beyond the metric list, but the annotations and schema carry the remaining burden adequately.

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 baseline is 3. The description goes further by explaining the interaction between parameters — `convocatoria` combined with `lugar` scopes to that community, municipal and European results are aggregates of Spain, and `fecha` selects the year for them — which is meaning the schema does not spell out jointly.

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+resource (resultados de elecciones generales al Congreso) plus the exact payload returned (votos, porcentaje, escaños y participación) and the temporal scope (desde 1977). It also distinguishes the three operating modes (with `lugar`, with `fecha`, with `convocatoria`), so an agent knows precisely what surface this tool covers.

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?

Gives concrete triggering queries («¿quién ganó en 2011?», «resultados en Cádiz», «europeas de 2019») and explains which parameter combination maps to each. It lacks an explicit exclusion rule pointing to a named alternative such as encuestas_electorales, so an agent must infer the boundary itself.

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