Skip to main content
Glama

Election Index

Next election in a country

next_election
Read-only

The next elections in one country, however far ahead: polling day and whether it is declared, still tentative, or only expected within a period, what is elected, the counting authority, and when results are expected. Answers "When is the next election in Austria?" or "When are the US midterms?". National elections by default; level "regional" answers "When are the next state elections in Germany?". Covers 388 elections in 100 countries, 2021–2030, including 23 of the 27 EU member states, the 2026 US midterms in all 50 states and the certified 2024 US presidential result, with vote counts, in all 50 states and DC.

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": {
      "country": "<country>"
    },
    "name": "next_election"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNoHow many upcoming elections to return, soonest first; default 3
levelNonational: the country votes; regional: a state, region or autonomous community elects its own parliament or head (German Länder, Spanish autonomous communities, Italian regions). Default national; the answer also counts upcoming regional elections
countryYesCountry name or ISO 3166-1 alpha-2 code, e.g. "Austria" or "AT", "United States" or "US"

Output Schema

NameRequiredDescriptionDefault
metaYesWhat this answer was built from; cite dataset_version
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / meta / properties / doi
      Added value: +{
      +  "description": "Zenodo concept DOI: the latest archived release",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / meta / properties / copyright
      Added value: +{
      +  "description": "Rights holder",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / result / properties / elections / items / properties / races / items / properties / results / items / properties / rows / items / properties / ballot_name
      Added value: +{
      +  "description": "Name on the ballot, as the authority's file writes it",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  4. Changed1 schema field changed
    • addedOutput schema / properties / result / properties / elections / items / properties / exit_poll
      Added value: +{
      +  "description": "When is the exit poll? An exit poll is a survey of voters leaving polling stations, never an official result",
      +  "properties": {
      +    "at": {
      +      "description": "The one time to show: when it was published, else when it is due (UTC ISO)",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "ban_ends": {
      +      "description": "While a verified ban is in force: at (UTC, polls close), local, citation, scope (publication: all polls; exit-polls: exit-poll results only)",
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "basis": {
      +      "description": "What the expectation, or the finding that none is published, rests on",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "by": {
      +      "description": "Latest expected publication (UTC ISO)",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "checked_at": {
      +      "description": "For none: when that was checked (YYYY-MM-DD)",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "confidence": {
      +      "description": "announced, precedent or estimate",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "from": {
      +      "description": "Earliest expected publication (UTC ISO)",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "observed_at": {
      +      "description": "When it was published, once observed",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "observed_source": {
      +      "description": "Page that shows the publication, once observed",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "official_result": {
      +      "description": "Always false",
      +      "type": "boolean"
      +    },
      +    "publisher": {
      +      "description": "Who publishes it, e.g. a broadcaster and its pollster",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "race": {
      +      "description": "The race the answer is recorded on",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "description": "Where it is published",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "description": "expected (due), past (due time has passed, publication not observed), published (observed), none (checked: no exit poll is published), or unknown (not yet recorded)",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  5. Changed1 schema field changed
    • addedOutput schema / properties / result / properties / elections / items / properties / poll_blackout
      Added value: +{
      +  "description": "Whether opinion polls for this election should be shown only behind a warning right now, checked at request time. reason \"ban\": a poll-publication ban applies under the cited law. reason \"unverified\": we hold no verified rule for this country, so we cannot say publishing is allowed; it is not a finding that polls are banned. Show polls behind a warning (mode warn) or not at all (mode withhold)",
      +  "properties": {
      +    "active": {
      +      "description": "Show polls only behind a warning now (see reason)",
      +      "type": "boolean"
      +    },
      +    "citation": {
      +      "description": "The law and provision behind an active or upcoming ban",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "date_tentative": {
      +      "description": "Polling day is not declared yet, so these times may move",
      +      "type": "boolean"
      +    },
      +    "ends_at": {
      +      "description": "When the ban or warning ends: the last polls close (UTC ISO)",
      +      "type": "string"
      +    },
      +    "ends_at_local": {
      +      "description": "The same moment in local time, with offset",
      +      "type": "string"
      +    },
      +    "mode": {
      +      "description": "warn: polls may be shown behind a warning; withhold: do not show them",
      +      "type": "string"
      +    },
      +    "reason": {
      +      "description": "ban (a verified ban applies), unverified (no verified rule; warning until polls close), or null",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "rule": {
      +      "description": "The rule as recorded",
      +      "properties": {
      +        "citation": {
      +          "description": "The provision",
      +          "type": "string"
      +        },
      +        "id": {
      +          "description": "Rule id",
      +          "type": "string"
      +        },
      +        "law": {
      +          "description": "The law, by its own title",
      +          "type": "string"
      +        },
      +        "legal": {
      +          "description": "Quote, English gloss, what it covers, whether it covers online publication, exemptions, penalty, enforcer",
      +          "type": [
      +            "object",
      +            "null"
      +          ]
      +        },
      +        "note": {
      +          "description": "Reading notes",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "scope": {
      +          "description": "What is banned: publication, exit-polls",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "source": {
      +          "description": "Official text the rule was read in",
      +          "type": "string"
      +        },
      +        "verified_at": {
      +          "description": "When the rule was last read against the source (YYYY-MM-DD)",
      +          "type": "string"
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "starts_at": {
      +      "description": "When the ban starts (UTC ISO); null if the law sets none or no rule is known",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "timezone": {
      +      "description": "IANA time zone of ends_at_local",
      +      "type": "string"
      +    },
      +    "verified": {
      +      "description": "We hold a rule for this country read against the law",
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  6. Changed2 schema fields changed
    • addedOutput schema / properties / result / properties / elections / items / properties / races / items / properties / sources / items / properties / figures_in_html
      Added value: +{
      +  "description": "For a results page: whether its own HTML shows a count (false: figures load by script or the page only links on; null: not read)",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / result / properties / elections / items / properties / races / items / properties / sources / items / properties / oracle_reads
      Added value: +{
      +  "description": "Settlement-oracle lab reads of this URL: right, wrong, unread, lab, at",
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
  7. Changed3 schema fields changed
    • changedOutput schema / properties / result / properties / elections / items / properties / date / description
      Previous value: -"Polling day (YYYY-MM-DD)"New value: +"Polling day (YYYY-MM-DD); for an expected date, the last day of date_window"
    • changedOutput schema / properties / result / properties / elections / items / properties / date_status / description
      Previous value: -"declared, scheduled or tentative"New value: +"declared, tentative, or expected (no day set yet: see date_window)"
    • addedOutput schema / properties / result / properties / elections / items / properties / date_window
      Added value: +{
      +  "description": "Only for date_status \"expected\": the period polling day is expected in",
      +  "properties": {
      +    "from": {
      +      "description": "First possible day (YYYY-MM-DD)",
      +      "type": "string"
      +    },
      +    "label": {
      +      "description": "How we name the period, e.g. \"Q2 2029\"",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "to": {
      +      "description": "Last possible day (YYYY-MM-DD)",
      +      "type": "string"
      +    }
      +  },
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
  8. Changed4 schema fields changed
    • addedOutput schema / properties / result / properties / elections / items / properties / races / items / properties / results / items / properties / electorate
      Added value: +{
      +  "description": "Registered voters",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / result / properties / elections / items / properties / races / items / properties / results / items / properties / rows / items / properties / colour
      Added value: +{
      +  "description": "Party colour (#RRGGBB, from Wikidata)",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / result / properties / elections / items / properties / races / items / properties / results / items / properties / rows / items / properties / party_id
      Added value: +{
      +  "description": "Wikidata QID of the party",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / result / properties / elections / items / properties / races / items / properties / results / items / properties / turnout
      Added value: +{
      +  "description": "Percent of registered voters who cast a ballot",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
  9. Changed7 schema fields changed
    • addedInput schema / properties / level
      Added value: +{
      +  "description": "national: the country votes; regional: a state, region or autonomous community elects its own parliament or head (German Länder, Spanish autonomous communities, Italian regions). Default national; the answer also counts upcoming regional elections",
      +  "enum": [
      +    "national",
      +    "regional",
      +    "all"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / elections / items / properties / level
      Added value: +{
      +  "description": "national or regional",
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / elections / items / properties / subdivision
      Added value: +{
      +  "description": "ISO 3166-2 code of the state or region, if the election belongs to one",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / result / properties / elections / items / properties / subdivision_name
      Added value: +{
      +  "description": "Name of that state or region",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / result / properties / level
      Added value: +{
      +  "description": "national, regional or all",
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / regional_upcoming
      Added value: +{
      +  "description": "Upcoming regional elections in this country (with level national); ask again with level \"regional\"",
      +  "type": "integer"
      +}
    • changedOutput schema / properties / result / properties / total_upcoming / description
      Previous value: -"All upcoming elections we list for this country"New value: +"All upcoming elections we list for this country at this level"
  10. Changed1 schema field changed
    • addedOutput schema / properties / result / properties / elections / items / properties / races / items / properties / results
      Added value: +{
      +  "description": "Published counts we hold, oldest first (empty until a count is recorded)",
      +  "items": {
      +    "properties": {
      +      "licence": {
      +        "description": "Licence of the numbers",
      +        "type": "string"
      +      },
      +      "published_at": {
      +        "description": "When the publisher released it",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "publisher": {
      +        "description": "Who published the count",
      +        "type": "string"
      +      },
      +      "rows": {
      +        "items": {
      +          "properties": {
      +            "candidate": {
      +              "description": "Candidate or list",
      +              "type": "string"
      +            },
      +            "party": {
      +              "description": "Party, where recorded",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "seats": {
      +              "description": "Seats or electoral votes won",
      +              "type": [
      +                "integer",
      +                "null"
      +              ]
      +            },
      +            "share": {
      +              "description": "Percent of total votes",
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "votes": {
      +              "description": "Votes",
      +              "type": "integer"
      +            },
      +            "winner": {
      +              "description": "Most votes in this count",
      +              "type": "boolean"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "source": {
      +        "description": "File or page the numbers were copied from",
      +        "type": "string"
      +      },
      +      "stage": {
      +        "description": "Count stage of this version, e.g. final-result",
      +        "type": "string"
      +      },
      +      "total_votes": {
      +        "description": "Total votes cast in the race",
      +        "type": "integer"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  11. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already establish this as a safe read-only, closed-world operation, so the bar is lower. The description adds genuine context beyond them: the dataset's coverage (388 elections, 100 countries, 2021–2030), that results are returned even for far-future elections, and the tentative/expected status vocabulary. It does not discuss limits such as what happens for countries or dates outside the covered range.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core sentence is front-loaded and dense with useful detail, and the example questions earn their place. The closing coverage sentence is padded and partly repetitive ('the 2026 US midterms in all 50 states' followed by 'in all 50 states and DC'), and reads as promotional filler rather than guidance an agent needs to call the tool.

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?

With an output schema present, the description need not explain return structure, and it doesn't over-explain it. It does supply the domain coverage bound (2021–2030, 100 countries), which is the main thing an agent needs to know to trust or distrust an answer. Only the gaps for unsupported countries or out-of-range dates keep it from being fully complete.

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 description coverage is 100%, so the baseline is 3; the country, level, and count parameters are already fully documented with defaults and an ISO-code example. The description reinforces the level semantics with a German state-election example but repeats the national-default behavior already present in the schema. It adds little meaning the schema does not already carry.

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 opens with a specific verb and resource ('the next elections in one country') and enumerates exactly what is returned: polling day, status (declared/tentative/expected), what is elected, counting authority, and expected results date. It also gives worked example questions, which makes the scope unmistakable. It never names the closely named sibling 'upcoming_elections', so an agent cannot rule out overlap from the text alone.

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 provides concrete usage signals: default to national elections, and switch to level 'regional' when asked about German state elections. The default for the count parameter (3, soonest first) is also implied. However, there is no explicit when-not guidance and no named alternative for anything this tool does not cover, such as historical or per-pollster questions handled by siblings.

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