Get constituencies and results
ukparl_get_constituencyFind Westminster constituencies and read a seat's MPs and election results. mode=search (default) matches current seat names or the seats a postcode falls in, or lists all 650 without query; an abolished seat's constituencyId comes from ukparl_get_member roles representations or electionsContested rows. Each boundary set has its own ID (Bath 3895 since 2024, 3308 before). With constituencyId: detail; representations, membership periods with memberId (a member can repeat; member.latestHouseMembership is their latest seat, not this one); election_results, without candidates; election_result, one election with candidates, the latest unless electionId is set. turnout counts valid votes; voteShare is a fraction of 1; candidate memberId is null, winners included, so reach winners through representations. Older seats have partial coverage: an empty list never means no MP or election.
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": "ukparl_get_constituency"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Operation; every mode but search requires constituencyId. | search |
| limit | No | Rows per page: default 10, cap 20; a larger limit returns 20 and says so. | |
| query | No | Search only: part of a current seat name, or a postcode; omit to list all. | |
| cursor | No | Collection continuation; repeat unchanged inputs. | |
| electionId | No | election_result only; omit for the latest result. | |
| contentCursor | No | Continuation for an oversized record. | |
| constituencyId | No | Seat ID for every mode but search. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | Page-size ceiling. | |
| mode | No | Selected operation. | |
| page | No | Collection continuation. | |
| error | No | Present when the call failed. Absent on success. | |
| found | No | False when constituencyId names no seat. | |
| shown | No | Rows on this page. | |
| notice | No | Licence, field-meaning and limit notices. | |
| source | No | Selected official request. | |
| applied | No | Effective operation and page size. | |
| delivery | No | Full selected payload, child outline, or JSON fragment. | |
| guidance | No | Recovery when a seat, election or row is missing. | |
| identity | No | Stable selected-record identifiers retained during content retrieval. | |
| retrieval | No | Same-tool retrieval instruction. | |
| truncated | No | More rows remain. | |
| provenance | No | Selected response provenance retained during content retrieval; source notices remain in the reconstructed payload. | |
| resultType | No | Source match basis as sent: Constituency, FullPostcode, PartialPostcode, Other (no query) or None. | |
| contentPage | No | Lossless recursive content continuation. | |
| constituency | No | The seat; parent of any rows. | |
| collectionPage | No | Collection continuation; reconstruct the outlined selected payload before following it. | |
| constituencies | No | Matching current seats. | |
| electionResult | No | One election and its candidates. | |
| electionResults | No | Elections, without candidates. | |
| representations | No | Membership periods, newest first. | |
| constituencySource | No | Request for constituency outside detail. |