---
summary: "Election resource split into 3 URI templates with explicit params; API key sanitization; HTTP status enrichment; legal search trimming."
breaking: true
security: false
---

# 0.2.0 — 2026-04-04

## Changed

- **Breaking:** Split election resource into 3 URI templates with explicit params:
  - `openfec://election/{cycle}/{office}` — presidential/at-large races
  - `openfec://election/{cycle}/{office}/{state}` — senate/state races
  - `openfec://election/{cycle}/{office}/{state}/{district}` — house district races
  - State and district are now explicit params instead of parsed from the URI path.
- Election summary mode returns a flat aggregate object (`count`, `receipts`, `disbursements`, `independent_expenditures`) instead of a paginated response.
- All empty-result format messages now include actionable troubleshooting suggestions.
- Candidate ID regex relaxed to accept alphanumeric suffixes (`[HSP][0-9A-Z]+`).

## Fixed

- Calendar tool date parameters now map to correct endpoint-specific field names (`min_start_date`/`max_start_date` for events, `min_due_date`/`max_due_date` for filing deadlines, `min_election_date`/`max_election_date` for election dates).

## Added

- API error sanitization: API keys are stripped from error messages before surfacing to clients.
- HTTP status errors enriched with actionable hints (rate limits, bad params, service unavailable).
- Legal search response trimming for LLM context windows (highlights capped at 3, documents summarized as count + categories, commission votes condensed).
- `NotFound` errors for candidate and committee ID-specific lookups that return empty results.
- Expenditure tool validates candidate/committee ID formats and requires `candidate_id` for `by_candidate` mode.
- `ElectionSummary` type for the flat `/elections/summary/` endpoint response.
- Defensive null coalescing on pagination fields in service layer.
- Security overrides for transitive dependencies (`brace-expansion`, `express-rate-limit`, `hono`, `path-to-regexp`, `picomatch`, `yaml`, `lodash`).
- Funding info, author email, and `typescript`/`ai-agent` keywords to package.json.
- Consistent `bun run` prefix for all package scripts; start scripts use `bun` runtime.
