How to Use Elections Canada political contributions in opencode
Returns published contribution records for federal parties, riding associations, candidates, and contestants. Use it to analyze reported funding by recipient and period, keeping original and amended filings separate.
Prompts to try with Elections Canada political contributions in opencode
Copy an example into opencode, or ask in your own words.
Use Elections Canada political contributions to summarize published 2021 contributions to the Liberal Party of Canada by month. Save aggregate totals in the project's data directory.
Use Elections Canada political contributions to look this up and give me the result as a table. Save the result in ./assets.
Pull the latest numbers from Elections Canada political contributions and tell me what changed since last week.
Check Elections Canada political contributions and summarize what you find in three bullet points.
Pull the newest data from Elections Canada political contributions and give me the result as a table.
How to set up Elections Canada political contributions in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- Sign in
Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Elections Canada political contributions
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "alexandria", "model": "elections-ca/elections/search_contributions", "input": { "data": "as_reviewed" } }'
Then paste one of the prompts above: opencode finds Elections Canada political contributions on Spiral, shows the price and runs it.
Elections Canada political contributions providers and prices
Spiral runs Elections Canada political contributions through Alexandria. Open a card for today's price, with every fee included.
$0.00873 per call.
Settings you can ask for
Ask opencode for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Data | as_reviewed or as_submitted | as_reviewed | Return data as reviewed/amended by Elections Canada, or as originally submitted. |
| Page | a number from 1 | 1 | page |
| Max amount | a number from 0 | max_amount | |
| Min amount | a number from 0 | min_amount | |
| Contribution type | all, monetary, or non_monetary | all | contribution_type |
| Contributor province | NL, PE, NS, NB, QC, ON, MB, SK and 5 more | Contributor province or territory. |
Every API field of Elections Canada official voting results and political contributions · Search contributions is on its tool page: open its card above.
What can you do with Elections Canada political contributions in opencode?
Build an election reference app with federal riding navigation, candidate results, and aggregate political funding summaries. Use Elections Canada's polling station records and published summary tables to check the calculations behind each view.
Prepare a provincial election backgrounder
Build an Ontario briefing with a district overview, candidate margins, selected polling station breakdowns, and provincial totals. Add a separate section summarizing published contributions to the federal parties discussed.
Build a federal election teaching exercise
Let students move from national totals to riding outcomes and polling station results. Include recipient-level contribution summaries as a separate exercise in reading political financing disclosures.
Study party funding alongside electoral outcomes
Compare published party contribution totals with vote shares and seats, then examine selected ridings and polling stations. Keep funding and voting measures separate and describe associations without claiming that contributions caused an outcome.
Create a public election reference browser
Provide province and riding navigation, candidate results, polling station tables, national comparisons, and aggregate funding summaries for political recipients. Keep contribution displays focused on institutions and campaigns.
Measure changes between financial filing versions
Compare original and reviewed contribution records for a federal party over the same period. Report differences in recipient totals without producing donor profiles.
More on Elections Canada political contributions and opencode
Overview
Elections Canada political contributions in other agents
Questions about Elections Canada political contributions in opencode
Can opencode use Elections Canada political contributions?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Elections Canada political contributions like any built-in tool.
How much does Elections Canada political contributions cost in opencode?
$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.
Do I need an Alexandria account to use Elections Canada political contributions in opencode?
No. Spiral runs Elections Canada political contributions on its own Alexandria account. You sign in to Spiral once and never paste a key.
How long does it take to set up Elections Canada political contributions in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while Elections Canada political contributions runs?
Elections Canada political contributions runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.
Does Elections Canada provide results outside the national totals?
Yes. Its 2021 official results are available for individual federal electoral districts, each province or territory, and all of Canada.
How detailed are the official voting results?
The polling station files report candidate votes, rejected ballots, and listed electors. They also identify void polls and results merged into another polling station.
What do the election summary tables cover?
The 2021 release has 13 summary tables. They cover turnout, voting methods, special ballots, party votes and seats, candidate results, electoral districts, and returning officers.
How far back do the maintained contribution downloads go?
The maintained downloads cover contributions to all political entities from January 2004 to the present. Elections Canada updates those downloads weekly; that schedule does not establish when an individual search result changes.
How soon do financial reports become public?
Elections Canada generally publishes an original financial report within approximately 10 business days of receiving a complete signed version. That interval starts when the report is received, rather than when a contribution is made.
Start using Elections Canada political contributions in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


