list_elections
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/list_elections for the schema, then POST the same URL with its arguments for the data.
List available state/year/office/level combinations held in this pack.
Tool description as the model sees it
List the state/year/office combinations this pack actually holds data for, and at which levels (state/county/precinct). Pass state to scope the listing to one state; omit it to see full coverage. Use this before election_results or election_race_summary to check whether a given state/year/office exists before querying it, or to discover what is covered.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
state | string | no | US state, postal code (“PA”) or full name (“Pennsylvania”), to scope the listing. Optional. |
Example call
Arguments
{
"state": "PA"
}
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":"list_elections","arguments":{"state":"PA"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('list_elections', {
"state": "PA"
});
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.