Skip to main content
Glama
29N Elections MCP

29N Elections MCP

Get 29N winners by territory

elecciones29n_get_winners_map
Read-onlyIdempotent

Identifies the winning or leading candidacy in every child territory of a scope during or after vote counting, returning seats won and counted percentage per territory.

Instructions

Use this tool to know which candidacy won (or leads) in EVERY child territory of a scope:
e.g. the winner in each province of Spain, or in each municipality of a province, with the
seats it obtained there and how much has been counted.

WHEN TO USE IT:
During or after the vote count (phase 2), for questions like "who won in each province",
"how many provinces did X win", or to draw a winners map.

INPUT PARAMETERS (What it receives):
- params.scope_id (str, required): parent territory from 'elecciones29n_search_scopes'
  (España is '00000000000000000000000b').
- params.chamber ('congreso' default | 'senado').
- params.level (number or name, required): level of the children, one of the scope
  'child_levels' (e.g. 30 'provincia' for España). For the Senado, 'circunscripciones' returns
  every Senate constituency (provinces and islands); it is only offered on España.
- params.data_source ('auto' default | 'pro' | 'def').
- params.limit (1-1000, default 200).

WHAT IT RETURNS:
- territories: per child: scope_id, code, name, 'count_started', 'winner_basis' ('official'
  winner marked by the website, 'inferred_leader' computed from seats then votes, 'tie' or
  'not_started'), 'winner' (code, acronym, name, color, votes, votes_pct, seats; null while
  not started or tied), 'official_winner', 'inferred_leader', 'winner_seats',
  'seats_at_stake', 'census_counted_pct', 'turnout_pct' and the reported ties.
- tally: territories won and seats per candidacy, most territories first (ties excluded).
- count_started, total, truncated, next_step and source.

OPERATING NOTES:
- Before phase 2 it returns no territories and explains why: winners do not exist until
  votes are counted. Never infer winners from turnout.
- Seats in 'tally' are the seats won by each territory's winner only, not each party's total:
  use 'elecciones29n_get_scope_results' on the parent scope for national seat totals.

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": {
      "params": "<params>"
    },
    "name": "elecciones29n_get_winners_map"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
levelYes
phaseYes
scopeYes
tallyNoTerritories won per candidacy.
totalYes
sourceYes
chamberYes
next_stepYes
truncatedYes
data_sourceYes
level_labelYes
phase_labelYes
territoriesNo
count_startedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses pre-phase-2 behavior (returns no territories plus an explanation), the meaning of winner_basis values ('official', 'inferred_leader', 'tie', 'not_started'), and the crucial caveat that 'tally' seats are winner-only per territory rather than party totals. It also surfaces truncation via the 'truncated' field.

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?

Well front-loaded and sectioned (purpose, when to use, inputs, returns, operating notes), so an agent can skim. It is longer than strictly necessary because the parameter and return sections partially duplicate the schema and output schema.

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 single nested-params tool with an output schema, the definition covers invocation preconditions, level selection, winner-basis interpretation, truncation and a redirect to the sibling for aggregate seat totals. Nothing an agent needs to call it correctly 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?

The INPUT PARAMETERS block explains each of the five nested fields — where scope_id comes from, chamber default, level values tied to the scope's child_levels, data_source modes and the limit range. Because the reported schema coverage is 0%, this prose is doing the real work, though much of it restates the $defs property descriptions rather than adding new semantics beyond the Senado 'circunscripciones' note.

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 with scope: 'which candidacy won (or leads) in EVERY child territory of a scope', with concrete examples (each province of Spain, each municipality of a province). It implicitly distinguishes itself from elecciones29n_get_scope_results by scoping to children rather than the parent's aggregate.

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?

A dedicated 'WHEN TO USE IT' block ties the tool to phase 2 (during/after the count) and gives representative question shapes ('who won in each province', 'how many provinces did X win'). It also names the alternative explicitly: use elecciones29n_get_scope_results on the parent for national seat totals, and warns never to infer winners from turnout.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.