---
summary: "Add Zod regex validators and workflow hints to candidate_id and committee_id fields"
breaking: false
security: false
---

# 0.4.6 — 2026-05-26

## Changed

- **`candidate_id` fields** — added `.regex(/^[HSP][0-9A-Z]+$/i)` on all tool definitions that accept a `candidate_id` parameter; surfaced as a `pattern` in JSON Schema. Updated `.describe()` text to point callers to `openfec_search_candidates` as the source of IDs. Closes [#2](https://github.com/cyanheads/openfec-mcp-server/issues/2).
- **`committee_id` fields** — added `.regex(/^C\d+$/i)` on all tool definitions that accept a `committee_id` parameter; surfaced as a `pattern` in JSON Schema. Updated `.describe()` text to point callers to `openfec_search_committees` as the source of IDs. Closes [#2](https://github.com/cyanheads/openfec-mcp-server/issues/2).
- **Tests** — updated invalid-ID test cases in `search-candidates` and `search-committees` to assert `ZodError` at parse time (Zod now rejects malformed IDs before handler execution).
