election_race_summary

Pack: us-elections · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/election_race_summary for the schema, then POST the same URL with its arguments for the data.

Totals, vote shares, winner and margin for a state/year/office race (one entry per district if applicable).

Tool description as the model sees it

Aggregated summary of a U.S. election race — total votes, each candidate’s vote share, the winner and the winning margin — for one state/year/office. Uses the most aggregated level actually available for that race: a statewide number when MEDSL state-level data covers it (President/Senate, every state, 1976-2024), otherwise summed from whatever county/precinct detail exists (OpenElections: PA/MI/GA, 2024 only). For a district office (House) returns one summary per district. Use for “who won the 2024 PA Senate race and by how much” rather than reading every county row yourself.

Parameters

NameTypeRequiredDescription
statestringyesUS state, postal code (“PA”) or full name (“Pennsylvania”).
yearnumberyesElection year, e.g. 2024.
officestringyes”president”, “senate”, or “house”.

Example call

Arguments

{
  "state": "PA",
  "year": 2024,
  "office": "senate"
}

curl

curl -X POST https://gateway.pipeworx.io/us-elections/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"election_race_summary","arguments":{"state":"PA","year":2024,"office":"senate"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('election_race_summary', {
  "state": "PA",
  "year": 2024,
  "office": "senate"
});

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the us-elections pack
{
  "mcpServers": {
    "us-elections": {
      "url": "https://gateway.pipeworx.io/us-elections/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 13, 2026