Get 29N winners by territory
elecciones29n_get_winners_mapIdentifies 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
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | Yes | ||
| phase | Yes | ||
| scope | Yes | ||
| tally | No | Territories won per candidacy. | |
| total | Yes | ||
| source | Yes | ||
| chamber | Yes | ||
| next_step | Yes | ||
| truncated | Yes | ||
| data_source | Yes | ||
| level_label | Yes | ||
| phase_label | Yes | ||
| territories | No | ||
| count_started | Yes |