Skip to main content
Glama

Election Results

election_results
Read-onlyIdempotent

Candidate-level U.S. election results for one state, year and office, at state, county, or precinct granularity. State-level President and Senate cover every state 1976-2024, including 2020 and 2022 (MIT Election Data + Science Lab / MEDSL, Harvard Dataverse, CC0). Official FEC district-by-district U.S. House results (FEC, "Federal Elections" statistical publication, public domain) cover the 2020 and 2022 general elections nationwide -- FEC has not yet published its compiled 2024 edition, and House is not otherwise available nationwide (MEDSL's own House file is guestbook-gated). County-level President/Senate/House results (OpenElections, county/state election-board certified counts) cover the 2024 general election in Georgia, Mississippi, New Mexico, North Dakota, South Dakota, Tennessee, Utah, West Virginia, Colorado, Missouri, Oregon, South Carolina and Kentucky; Pennsylvania and Michigan additionally keep true precinct-level rows. Pass state as a postal code ("PA") or full name ("Pennsylvania"), office as "president", "senate" or "house". For a House race, pass district (e.g. "09") to scope one district; omit it to get every district returned for that state/year. Use county to scope a county/precinct query (e.g. county="Allegheny"); omit it at level="county" to get every county in the state. Returns candidate, party, votes, the race total and the share of the vote, plus source/licence/data_as_of on every row. A state/year/office/level combination with no data returns a loud not-found (reason + available_levels hint), never an empty success.

Input Schema

NameRequiredDescriptionDefault
yearYesElection year, e.g. 2024.
levelNoGranularity: "state", "county", or "precinct". Default "county". FEC official House results are stored at level="state" (FEC publishes one final count per district, with no further sub-division).
limitNoMax rows, 1-500. Default 50. A truncated response carries truncated:true, total_matching, and a hint for narrowing (county, level="county").
stateYesUS state, postal code ("PA") or full name ("Pennsylvania").
countyNoCounty name to scope a county- or precinct-level query (case-insensitive). Optional.
officeYes"president", "senate", or "house".
offsetNoPagination offset. Default 0.
districtNoHouse district to scope to one race, e.g. "09" or "9" (normalized to 2 digits). Optional; only meaningful for office="house".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, and the description adds genuine value beyond that: data provenance and coverage windows per source, the license, and authoritative failure behavior ('loud not-found with reason + available_levels hint, never an empty success'). This is unusually rich disclosure of data gaps and error semantics.

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 purpose in the first sentence, and most detail (coverage, sources) earns its place by telling the agent where data exists. However, the provenance and multi-state enumerations are dense and longer than strictly necessary, keeping it from a 5.

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?

With no output schema, the description supplies return fields (candidate, party, votes, race total, vote share, source/licence/data_as_of) and error behavior. For an 8-parameter, multi-source tool this covers everything an agent needs to call it correctly.

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 description coverage is 100%, so the schema already documents most parameters and baseline is 3. The description still earns above baseline by clarifying omission semantics (omit district to get all districts, omit county at level=county to get every county) and normalization ('09' vs '9') that the schema only flags as 'Optional'.

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+scope: candidate-level U.S. election results for one state/year/office at state, county, or precinct granularity. An agent immediately knows what the tool returns and its dimensional scope, distinguishing it from sibling summary/list tools like election_race_summary and list_elections.

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 clear operational context: pass postal code or full name, use district to scope a House race, omit it to get every district, use county to scope county/precinct. It stops short of naming sibling alternatives (election_race_summary, list_elections) or explicit when-not conditions, so it falls short of a 5.

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.