@cyanheads/openfec-mcp-server 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CLAUDE.md +7 -4
  2. package/README.md +9 -14
  3. package/dist/index.js +1 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/mcp-server/prompts/definitions/campaign-analysis.prompt.d.ts.map +1 -1
  6. package/dist/mcp-server/prompts/definitions/campaign-analysis.prompt.js +17 -9
  7. package/dist/mcp-server/prompts/definitions/campaign-analysis.prompt.js.map +1 -1
  8. package/dist/mcp-server/prompts/definitions/money-trail.prompt.d.ts.map +1 -1
  9. package/dist/mcp-server/prompts/definitions/money-trail.prompt.js +10 -6
  10. package/dist/mcp-server/prompts/definitions/money-trail.prompt.js.map +1 -1
  11. package/dist/mcp-server/resources/definitions/candidate.resource.d.ts.map +1 -1
  12. package/dist/mcp-server/resources/definitions/candidate.resource.js +7 -3
  13. package/dist/mcp-server/resources/definitions/candidate.resource.js.map +1 -1
  14. package/dist/mcp-server/resources/definitions/committee.resource.d.ts.map +1 -1
  15. package/dist/mcp-server/resources/definitions/committee.resource.js +10 -3
  16. package/dist/mcp-server/resources/definitions/committee.resource.js.map +1 -1
  17. package/dist/mcp-server/resources/definitions/election.resource.d.ts +13 -6
  18. package/dist/mcp-server/resources/definitions/election.resource.d.ts.map +1 -1
  19. package/dist/mcp-server/resources/definitions/election.resource.js +10 -9
  20. package/dist/mcp-server/resources/definitions/election.resource.js.map +1 -1
  21. package/dist/mcp-server/resources/definitions/index.d.ts +17 -1
  22. package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -1
  23. package/dist/mcp-server/tools/definitions/index.d.ts +34 -15
  24. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/lookup-calendar.tool.d.ts +21 -2
  26. package/dist/mcp-server/tools/definitions/lookup-calendar.tool.d.ts.map +1 -1
  27. package/dist/mcp-server/tools/definitions/lookup-calendar.tool.js +26 -14
  28. package/dist/mcp-server/tools/definitions/lookup-calendar.tool.js.map +1 -1
  29. package/dist/mcp-server/tools/definitions/lookup-elections.tool.d.ts +3 -3
  30. package/dist/mcp-server/tools/definitions/lookup-elections.tool.d.ts.map +1 -1
  31. package/dist/mcp-server/tools/definitions/lookup-elections.tool.js +9 -17
  32. package/dist/mcp-server/tools/definitions/lookup-elections.tool.js.map +1 -1
  33. package/dist/mcp-server/tools/definitions/search-candidates.tool.d.ts +3 -3
  34. package/dist/mcp-server/tools/definitions/search-candidates.tool.d.ts.map +1 -1
  35. package/dist/mcp-server/tools/definitions/search-candidates.tool.js +6 -6
  36. package/dist/mcp-server/tools/definitions/search-candidates.tool.js.map +1 -1
  37. package/dist/mcp-server/tools/definitions/search-committees.tool.d.ts +2 -2
  38. package/dist/mcp-server/tools/definitions/search-committees.tool.js +5 -5
  39. package/dist/mcp-server/tools/definitions/search-committees.tool.js.map +1 -1
  40. package/dist/mcp-server/tools/definitions/search-contributions.tool.d.ts.map +1 -1
  41. package/dist/mcp-server/tools/definitions/search-contributions.tool.js +7 -13
  42. package/dist/mcp-server/tools/definitions/search-contributions.tool.js.map +1 -1
  43. package/dist/mcp-server/tools/definitions/search-disbursements.tool.d.ts.map +1 -1
  44. package/dist/mcp-server/tools/definitions/search-disbursements.tool.js +8 -14
  45. package/dist/mcp-server/tools/definitions/search-disbursements.tool.js.map +1 -1
  46. package/dist/mcp-server/tools/definitions/search-expenditures.tool.d.ts +1 -1
  47. package/dist/mcp-server/tools/definitions/search-expenditures.tool.d.ts.map +1 -1
  48. package/dist/mcp-server/tools/definitions/search-expenditures.tool.js +5 -13
  49. package/dist/mcp-server/tools/definitions/search-expenditures.tool.js.map +1 -1
  50. package/dist/mcp-server/tools/definitions/search-filings.tool.d.ts +4 -4
  51. package/dist/mcp-server/tools/definitions/search-filings.tool.d.ts.map +1 -1
  52. package/dist/mcp-server/tools/definitions/search-filings.tool.js +18 -13
  53. package/dist/mcp-server/tools/definitions/search-filings.tool.js.map +1 -1
  54. package/dist/mcp-server/tools/definitions/search-legal.tool.js +2 -2
  55. package/dist/mcp-server/tools/definitions/search-legal.tool.js.map +1 -1
  56. package/dist/mcp-server/tools/definitions/utils/format-helpers.d.ts.map +1 -1
  57. package/dist/mcp-server/tools/definitions/utils/format-helpers.js +4 -2
  58. package/dist/mcp-server/tools/definitions/utils/format-helpers.js.map +1 -1
  59. package/dist/services/openfec/openfec-service.d.ts +2 -0
  60. package/dist/services/openfec/openfec-service.d.ts.map +1 -1
  61. package/dist/services/openfec/openfec-service.js +6 -0
  62. package/dist/services/openfec/openfec-service.js.map +1 -1
  63. package/package.json +7 -6
  64. package/server.json +3 -3
package/CLAUDE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** openfec-mcp-server
4
- **Version:** 0.4.2
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.8.19`
4
+ **Version:** 0.4.4
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.1`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
 
8
8
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
@@ -359,12 +359,15 @@ import { getOpenFecService } from '@/services/openfec/openfec-service.js';
359
359
 
360
360
  ## Checklist
361
361
 
362
- - [ ] Zod schemas: all fields have `.describe()` (including nested object fields and array element types), only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, `z.bigint()`, `z.symbol()`, `z.void()`, `z.map()`, `z.set()`, `z.function()`, `z.nan()`)
363
- - [ ] Optional nested objects: handler guards for empty inner values from form-based clients (`if (input.obj?.field && ...)`, not just `if (input.obj)`)
362
+ - [ ] Zod schemas: all fields have `.describe()` (including nested object fields and array element types), only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, `z.bigint()`, `z.symbol()`, `z.void()`, `z.map()`, `z.set()`, `z.function()`, `z.nan()`); avoid non-portable `format` emitters (`z.url()`, `z.cuid()`, `z.ulid()`, `z.nanoid()`, `z.base64()`, `z.jwt()`) — use `z.string()` with the constraint in `.describe()`
363
+ - [ ] Optional nested objects: handler guards for empty inner values from form-based clients (`if (input.obj?.field && ...)`, not just `if (input.obj)`). When regex/length constraints matter, use `z.union([z.literal(''), z.string().regex(...).describe(...)])` — literal variants are exempt from `describe-on-fields`.
364
364
  - [ ] JSDoc `@fileoverview` + `@module` on every file
365
365
  - [ ] `ctx.log` for logging, `ctx.state` for storage
366
366
  - [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
367
367
  - [ ] `format()` renders all data the LLM needs — different clients forward different surfaces (Claude Code → `structuredContent`, Claude Desktop → `content[]`); both must carry the same data
368
+ - [ ] Wrapping the OpenFEC API: raw/domain/output schemas reviewed against real upstream sparsity/nullability before finalizing required vs optional fields
369
+ - [ ] Wrapping the OpenFEC API: normalization and `format()` preserve uncertainty; do not fabricate facts from missing upstream data
370
+ - [ ] Wrapping the OpenFEC API: tests include at least one sparse payload case with omitted upstream fields
368
371
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
369
372
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
370
373
  - [ ] `bun run devcheck` passes
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  <div align="center">
8
8
 
9
- [![npm](https://img.shields.io/npm/v/@cyanheads/openfec-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/openfec-mcp-server) [![Version](https://img.shields.io/badge/Version-0.4.2-blue.svg?style=flat-square)](./CHANGELOG.md) [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-259?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/)
9
+ [![npm](https://img.shields.io/npm/v/@cyanheads/openfec-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/openfec-mcp-server) [![Version](https://img.shields.io/badge/Version-0.4.4-blue.svg?style=flat-square)](./CHANGELOG.md) [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-259?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/)
10
10
 
11
11
  [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-^1.3.0-f9f1e1.svg?style=flat-square)](https://bun.sh/)
12
12
 
@@ -121,7 +121,7 @@ Look up federal election races.
121
121
 
122
122
  - **search**: Candidates in a race with financial totals
123
123
  - **summary**: Aggregate race financial summary
124
- - Office types: president, senate, house
124
+ - Office types: H (House), S (Senate), P (President)
125
125
  - ZIP code lookup to find races covering a location
126
126
  - Full election period expansion (4yr president, 6yr senate, 2yr house)
127
127
 
@@ -233,7 +233,7 @@ MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 FEC_API_KEY=your-key bun run start:ht
233
233
 
234
234
  ### Prerequisites
235
235
 
236
- - [Bun v1.2.0](https://bun.sh/) or higher
236
+ - [Bun v1.3.0](https://bun.sh/) or higher (or Node ≥24)
237
237
  - A free [OpenFEC API key](https://api.data.gov/signup/)
238
238
 
239
239
  ### Installation
@@ -271,27 +271,22 @@ bun install
271
271
  | `MCP_LOG_LEVEL` | Log level (RFC 5424). | `info` |
272
272
  | `LOGS_DIR` | Directory for log files (Node.js only). | `<project-root>/logs` |
273
273
  | `STORAGE_PROVIDER_TYPE` | Storage backend. | `in-memory` |
274
- | `OTEL_ENABLED` | Enable OpenTelemetry tracing. | `false` |
274
+ | `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry) (spans, metrics, completion logs). | `false` |
275
275
 
276
276
  ## Running the Server
277
277
 
278
278
  ### Local Development
279
279
 
280
- - **Build and run the production version:**
280
+ - **Build and run:**
281
281
  ```sh
282
- bun run build
283
- bun run start:http # or start:stdio
284
- ```
285
-
286
- - **Run in dev mode (with watch):**
287
- ```sh
288
- bun run dev:stdio # or dev:http
282
+ bun run rebuild
283
+ bun run start:stdio # or start:http
289
284
  ```
290
285
 
291
286
  - **Run checks and tests:**
292
287
  ```sh
293
- bun run devcheck # Lints, formats, type-checks
294
- bun run test # Runs test suite
288
+ bun run devcheck # Lint, format, typecheck, security audit
289
+ bun run test # Runs test suite
295
290
  ```
296
291
 
297
292
  ## Project Structure
package/dist/index.js CHANGED
@@ -13,6 +13,7 @@ await createApp({
13
13
  tools: allToolDefinitions,
14
14
  resources: allResourceDefinitions,
15
15
  prompts: allPromptDefinitions,
16
+ instructions: 'Use the openfec_* tools for US federal campaign finance data: candidates, committees, contributions (Schedule A), disbursements (Schedule B), independent expenditures (Schedule E), filings, elections, calendar, and legal documents. Candidate IDs use H/S/P prefixes (House/Senate/President); committee IDs use C. Cycles are even-year integers covering the prior 2 years (2024 = Jan 2023 – Dec 2024). Itemized contributions and disbursements scope to committee_id, not candidate_id.',
16
17
  setup() {
17
18
  initOpenFecService();
18
19
  },
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,SAAS,CAAC;IACd,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,sBAAsB;IACjC,OAAO,EAAE,oBAAoB;IAC7B,KAAK;QACH,kBAAkB,EAAE,CAAC;IACvB,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,SAAS,CAAC;IACd,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,sBAAsB;IACjC,OAAO,EAAE,oBAAoB;IAC7B,YAAY,EACV,keAAke;IACpe,KAAK;QACH,kBAAkB,EAAE,CAAC;IACvB,CAAC;CACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"campaign-analysis.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/campaign-analysis.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,sBAAsB;;;;kBAsEjC,CAAC"}
1
+ {"version":3,"file":"campaign-analysis.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/campaign-analysis.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,sBAAsB;;;;kBA8EjC,CAAC"}
@@ -7,7 +7,8 @@
7
7
  import { prompt, z } from '@cyanheads/mcp-ts-core';
8
8
  export const campaignAnalysisPrompt = prompt('openfec_campaign_analysis', {
9
9
  description: `Structured analysis of a candidate's financial position — fundraising trajectory, burn rate, cash reserves, donor composition, and opponent comparison.`,
10
- args: z.object({
10
+ args: z
11
+ .object({
11
12
  candidate_name: z
12
13
  .string()
13
14
  .optional()
@@ -20,6 +21,10 @@ export const campaignAnalysisPrompt = prompt('openfec_campaign_analysis', {
20
21
  .string()
21
22
  .optional()
22
23
  .describe('Election cycle year (e.g., 2024). Defaults to current cycle.'),
24
+ })
25
+ .refine((args) => Boolean(args.candidate_id || args.candidate_name), {
26
+ message: 'Provide candidate_id or candidate_name to identify the candidate to analyze.',
27
+ path: ['candidate_id'],
23
28
  }),
24
29
  generate: (args) => {
25
30
  const target = args.candidate_id
@@ -40,29 +45,32 @@ Use openfec_search_candidates with include_totals=true to get:
40
45
  - Total receipts, disbursements, cash on hand, debt
41
46
  - Coverage period dates
42
47
 
43
- ## 2. Fundraising Analysis
44
- Use openfec_search_contributions with the candidate's principal committee:
48
+ ## 2. Find the Principal Committee
49
+ Use openfec_search_committees with the candidate_id to identify the principal campaign committee. Use that committee_id for the contribution and disbursement queries in steps 3 and 4.
50
+
51
+ ## 3. Fundraising Analysis
52
+ Use openfec_search_contributions with the principal committee_id:
45
53
  - **Size breakdown** (mode: by_size): What share comes from small vs. large donors?
46
54
  - **Geographic reach** (mode: by_state): Where is financial support concentrated?
47
55
  - **Industry patterns** (mode: by_employer): Which employers/industries are top sources?
48
56
 
49
- ## 3. Burn Rate & Spending
50
- Use openfec_search_disbursements with the principal committee:
57
+ ## 4. Burn Rate & Spending
58
+ Use openfec_search_disbursements with the principal committee_id:
51
59
  - **Purpose breakdown** (mode: by_purpose): Media buys, consulting, payroll, fundraising, travel
52
60
  - **Top recipients** (mode: by_recipient): Where is the money going?
53
61
  - Calculate burn rate: disbursements / receipts
54
62
 
55
- ## 4. Competitive Position
63
+ ## 5. Competitive Position
56
64
  Use openfec_lookup_elections to find all candidates in the race:
57
65
  - Compare total raised, cash on hand, and burn rates
58
66
  - Identify financial advantages and gaps
59
67
 
60
- ## 5. Outside Money Context
61
- Use openfec_search_expenditures with candidate_id:
68
+ ## 6. Outside Money Context
69
+ Use openfec_search_expenditures with the candidate_id:
62
70
  - Total independent expenditure support vs. opposition
63
71
  - Key outside groups involved
64
72
 
65
- ## 6. Assessment
73
+ ## 7. Assessment
66
74
  Synthesize into a financial health assessment:
67
75
  - **Fundraising trajectory**: Growing, flat, or declining?
68
76
  - **Donor base health**: Broad grassroots vs. maxed-out large donors?
@@ -1 +1 @@
1
- {"version":3,"file":"campaign-analysis.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/campaign-analysis.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,2BAA2B,EAAE;IACxE,WAAW,EAAE,yJAAyJ;IACtK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,0DAA0D,CAAC;QACvE,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,qEAAqE,CAAC;QAClF,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,8DAA8D,CAAC;KAC5E,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;QACjB,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY;YAC9B,CAAC,CAAC,gBAAgB,IAAI,CAAC,YAAY,EAAE;YACrC,CAAC,CAAC,IAAI,CAAC,cAAc;gBACnB,CAAC,CAAC,IAAI,IAAI,CAAC,cAAc,GAAG;gBAC5B,CAAC,CAAC,yBAAyB,CAAC;QAChC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAEnE,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,qDAAqD,MAAM,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2EAoCZ;iBAClE;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"campaign-analysis.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/campaign-analysis.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,2BAA2B,EAAE;IACxE,WAAW,EAAE,yJAAyJ;IACtK,IAAI,EAAE,CAAC;SACJ,MAAM,CAAC;QACN,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,0DAA0D,CAAC;QACvE,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,qEAAqE,CAAC;QAClF,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,8DAA8D,CAAC;KAC5E,CAAC;SACD,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,cAAc,CAAC,EAAE;QACnE,OAAO,EAAE,8EAA8E;QACvF,IAAI,EAAE,CAAC,cAAc,CAAC;KACvB,CAAC;IACJ,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;QACjB,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY;YAC9B,CAAC,CAAC,gBAAgB,IAAI,CAAC,YAAY,EAAE;YACrC,CAAC,CAAC,IAAI,CAAC,cAAc;gBACnB,CAAC,CAAC,IAAI,IAAI,CAAC,cAAc,GAAG;gBAC5B,CAAC,CAAC,yBAAyB,CAAC;QAChC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAEnE,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,qDAAqD,MAAM,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2EAuCZ;iBAClE;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"money-trail.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/money-trail.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,gBAAgB;;;;kBAoE3B,CAAC"}
1
+ {"version":3,"file":"money-trail.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/money-trail.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,gBAAgB;;;;kBAwE3B,CAAC"}
@@ -6,8 +6,9 @@
6
6
  */
7
7
  import { prompt, z } from '@cyanheads/mcp-ts-core';
8
8
  export const moneyTrailPrompt = prompt('openfec_money_trail', {
9
- description: `Framework for tracing the flow of money around a candidate or race — direct fundraising, PAC support, independent expenditures, and party spending. Guides the agent through a multi-tool investigation.`,
10
- args: z.object({
9
+ description: `Multi-step framework for tracing the flow of money around a candidate or race — direct fundraising, PAC support, independent expenditures, and party spending.`,
10
+ args: z
11
+ .object({
11
12
  candidate_name: z
12
13
  .string()
13
14
  .optional()
@@ -20,6 +21,10 @@ export const moneyTrailPrompt = prompt('openfec_money_trail', {
20
21
  .string()
21
22
  .optional()
22
23
  .describe('Election cycle year (e.g., 2024). Defaults to current cycle.'),
24
+ })
25
+ .refine((args) => Boolean(args.candidate_id || args.candidate_name), {
26
+ message: 'Provide candidate_id or candidate_name to identify the candidate to investigate.',
27
+ path: ['candidate_id'],
23
28
  }),
24
29
  generate: (args) => {
25
30
  const target = args.candidate_id
@@ -45,11 +50,10 @@ Use openfec_search_committees with the candidate_id to find:
45
50
  - Joint fundraising committees
46
51
 
47
52
  ## Step 3: Follow direct fundraising
48
- For the principal campaign committee, use openfec_search_contributions to examine:
49
- - Overall totals (include_totals from step 1)
50
- - Contribution breakdown by size (mode: by_size)
53
+ Carry forward the receipt totals already retrieved in step 1. Use openfec_search_contributions with the principal campaign committee_id to break down where the money came from:
54
+ - Contribution size distribution (mode: by_size)
51
55
  - Top donor states (mode: by_state)
52
- - Top employer/occupation patterns (mode: by_employer, by_occupation)
56
+ - Top employer and occupation patterns (mode: by_employer, by_occupation)
53
57
 
54
58
  ## Step 4: Track outside money
55
59
  Use openfec_search_expenditures with the candidate_id to find:
@@ -1 +1 @@
1
- {"version":3,"file":"money-trail.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/money-trail.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,qBAAqB,EAAE;IAC5D,WAAW,EAAE,0MAA0M;IACvN,IAAI,EAAE,CAAC,CAAC,M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,0GAA0G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CA8BzN;iBACrC;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"candidate.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/candidate.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,iBAAiB;;;;;;;GAsC5B,CAAC"}
1
+ {"version":3,"file":"candidate.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/candidate.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,iBAAiB;;;;;;;GA2C5B,CAAC"}
@@ -25,7 +25,11 @@ export const candidateResource = resource('openfec://candidate/{candidate_id}',
25
25
  async handler(params, ctx) {
26
26
  validateCandidateId(params.candidate_id);
27
27
  const fec = getOpenFecService();
28
- const candidateResult = await fec.getCandidate(params.candidate_id, ctx);
28
+ const [candidateResult, totalsResult, committeesResult] = await Promise.all([
29
+ fec.getCandidate(params.candidate_id, ctx),
30
+ fec.getCandidateTotals({ candidate_id: params.candidate_id }, ctx),
31
+ fec.getCandidateCommittees(params.candidate_id, { designation: 'P' }, ctx),
32
+ ]);
29
33
  const candidate = candidateResult.results[0];
30
34
  if (!candidate) {
31
35
  throw ctx.fail('candidate_not_found', `Candidate ${params.candidate_id} not found.`, {
@@ -33,10 +37,10 @@ export const candidateResource = resource('openfec://candidate/{candidate_id}',
33
37
  ...ctx.recoveryFor('candidate_not_found'),
34
38
  });
35
39
  }
36
- const totalsResult = await fec.getCandidateTotals({ candidate_id: params.candidate_id }, ctx);
37
40
  const totals = totalsResult.results[0];
41
+ const principal_committees = committeesResult.results;
38
42
  ctx.log.info('Candidate resource fetched', { candidate_id: params.candidate_id });
39
- return { ...candidate, ...(totals ?? {}) };
43
+ return { ...candidate, ...(totals ?? {}), principal_committees };
40
44
  },
41
45
  });
42
46
  //# sourceMappingURL=candidate.resource.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"candidate.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/candidate.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,oCAAoC,EAAE;IAC9E,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,uJAAuJ;IACzJ,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;KAC9F,CAAC;IAEF,MAAM,EAAE;QACN;YACE,MAAM,EAAE,qBAAqB;YAC7B,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,mDAAmD;YACzD,QAAQ,EACN,iHAAiH;SACpH;KACF;IAED,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,mBAAmB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAEzC,MAAM,GAAG,GAAG,iBAAiB,EAAE,CAAC;QAChC,MAAM,eAAe,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,EAAE,GAAG,CAA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AAC,GAAG,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;QAClF,OAAO,EAAE,GAAG,SAAS,EAAE,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACnE,CAAC;CACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"committee.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/committee.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,iBAAiB;;;;;;;GAmC5B,CAAC"}
1
+ {"version":3,"file":"committee.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/committee.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,iBAAiB;;;;;;;GA4C5B,CAAC"}
@@ -25,16 +25,23 @@ export const committeeResource = resource('openfec://committee/{committee_id}',
25
25
  async handler(params, ctx) {
26
26
  validateCommitteeId(params.committee_id);
27
27
  const fec = getOpenFecService();
28
- const result = await fec.getCommittee(params.committee_id, ctx);
29
- const committee = result.results[0];
28
+ // Totals 404 for committees that don't file Form 3/3X/3P — treat any
29
+ // totals failure as "no totals" while letting the base fetch surface
30
+ // the committee_not_found contract.
31
+ const [committeeResult, totalsResult] = await Promise.all([
32
+ fec.getCommittee(params.committee_id, ctx),
33
+ fec.getCommitteeTotals(params.committee_id, { per_page: 1 }, ctx).catch(() => null),
34
+ ]);
35
+ const committee = committeeResult.results[0];
30
36
  if (!committee) {
31
37
  throw ctx.fail('committee_not_found', `Committee ${params.committee_id} not found.`, {
32
38
  committee_id: params.committee_id,
33
39
  ...ctx.recoveryFor('committee_not_found'),
34
40
  });
35
41
  }
42
+ const totals = totalsResult?.results[0];
36
43
  ctx.log.info('Committee resource fetched', { committee_id: params.committee_id });
37
- return committee;
44
+ return { ...committee, ...(totals ?? {}) };
38
45
  },
39
46
  });
40
47
  //# sourceMappingURL=committee.resource.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"committee.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/committee.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,oCAAoC,EAAE;IAC9E,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,qJAAqJ;IACvJ,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KACxE,CAAC;IAEF,MAAM,EAAE;QACN;YACE,MAAM,EAAE,qBAAqB;YAC7B,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,mDAAmD;YACzD,QAAQ,EACN,6GAA6G;SAChH;KACF;IAED,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,mBAAmB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAEzC,MAAM,GAAG,GAAG,iBAAiB,EAAE,CAAC;QAChC,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;QAChE,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,GAAG,CAAC,IAAI,CAAC,qBAAqB,EAAE,aAAa,MAAM,CAAC,YAAY,aAAa,EAAE;gBACnF,YAAY,EAAE,MAAM,CAAC,YAAY;gBACjC,GAAG,GAAG,CAAC,WAAW,CAAC,qBAAqB,CAAC;aAC1C,CAAC,CAAC;QACL,CAAC;QAED,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;QAClF,OAAO,SAAS,CAAC;IACnB,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"committee.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/committee.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,oCAAoC,EAAE;IAC9E,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,qJAAqJ;IACvJ,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KACxE,CAAC;IAEF,MAAM,EAAE;QACN;YACE,MAAM,EAAE,qBAAqB;YAC7B,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,mDAAmD;YACzD,QA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/** Presidential and at-large races: openfec://election/2024/president */
7
+ /** Presidential races: openfec://election/2024/P */
8
8
  export declare const electionResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<z.ZodObject<{
9
9
  cycle: z.ZodString;
10
- office: z.ZodString;
10
+ office: z.ZodEnum<{
11
+ P: "P";
12
+ }>;
11
13
  }, z.core.$strip>, undefined, undefined>;
12
- /** Senate races: openfec://election/2024/senate/AZ */
14
+ /** Senate or at-large house races: openfec://election/2024/S/AZ */
13
15
  export declare const electionStateResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<z.ZodObject<{
14
16
  cycle: z.ZodString;
15
- office: z.ZodString;
17
+ office: z.ZodEnum<{
18
+ H: "H";
19
+ S: "S";
20
+ }>;
16
21
  state: z.ZodString;
17
22
  }, z.core.$strip>, undefined, undefined>;
18
- /** House races: openfec://election/2024/house/CA/12 */
23
+ /** House district races: openfec://election/2024/H/CA/12 */
19
24
  export declare const electionDistrictResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<z.ZodObject<{
20
25
  cycle: z.ZodString;
21
- office: z.ZodString;
26
+ office: z.ZodEnum<{
27
+ H: "H";
28
+ }>;
22
29
  state: z.ZodString;
23
30
  district: z.ZodString;
24
31
  }, z.core.$strip>, undefined, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"election.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/election.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAmCrD,yEAAyE;AACzE,eAAO,MAAM,gBAAgB;;;wCAU3B,CAAC;AAEH,sDAAsD;AACtD,eAAO,MAAM,qBAAqB;;;;wCAUhC,CAAC;AAEH,uDAAuD;AACvD,eAAO,MAAM,wBAAwB;;;;;wCAcpC,CAAC"}
1
+ {"version":3,"file":"election.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/election.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAsCrD,oDAAoD;AACpD,eAAO,MAAM,gBAAgB;;;;;wCAU3B,CAAC;AAEH,mEAAmE;AACnE,eAAO,MAAM,qBAAqB;;;;;;;wCAWhC,CAAC;AAEH,4DAA4D;AAC5D,eAAO,MAAM,wBAAwB;;;;;;;wCAcpC,CAAC"}
@@ -5,12 +5,13 @@
5
5
  */
6
6
  import { resource, z } from '@cyanheads/mcp-ts-core';
7
7
  import { getOpenFecService } from '../../../services/openfec/openfec-service.js';
8
+ const OFFICE_API_FORM = { H: 'house', S: 'senate', P: 'president' };
8
9
  /** Shared handler logic for all election resource URI variants. */
9
10
  async function fetchElection(params, ctx) {
10
11
  const fec = getOpenFecService();
11
12
  const apiParams = {
12
13
  cycle: params.cycle,
13
- office: params.office,
14
+ office: OFFICE_API_FORM[params.office],
14
15
  election_full: true,
15
16
  };
16
17
  if (params.state)
@@ -32,37 +33,37 @@ async function fetchElection(params, ctx) {
32
33
  candidates: result.results,
33
34
  };
34
35
  }
35
- /** Presidential and at-large races: openfec://election/2024/president */
36
+ /** Presidential races: openfec://election/2024/P */
36
37
  export const electionResource = resource('openfec://election/{cycle}/{office}', {
37
38
  name: 'FEC Election Race',
38
- description: 'Fetch an election race with candidate financial totals. For senate races use openfec://election/{cycle}/senate/{state}. For house races use openfec://election/{cycle}/house/{state}/{district}.',
39
+ description: 'Fetch a presidential election race with candidate financial totals. For senate races use openfec://election/{cycle}/S/{state}. For house races use openfec://election/{cycle}/H/{state}/{district}.',
39
40
  mimeType: 'application/json',
40
41
  params: z.object({
41
42
  cycle: z.string().describe('Election cycle year (e.g., 2024)'),
42
- office: z.string().describe('Office: president, senate, or house'),
43
+ office: z.enum(['P']).describe('Office code: P=President.'),
43
44
  }),
44
45
  handler: (params, ctx) => fetchElection(params, ctx),
45
46
  });
46
- /** Senate races: openfec://election/2024/senate/AZ */
47
+ /** Senate or at-large house races: openfec://election/2024/S/AZ */
47
48
  export const electionStateResource = resource('openfec://election/{cycle}/{office}/{state}', {
48
49
  name: 'FEC Election Race (State)',
49
- description: 'Fetch a senate or at-large election race with candidate financial totals.',
50
+ description: 'Fetch a senate race, or a house at-large race in a single-district state, with candidate financial totals.',
50
51
  mimeType: 'application/json',
51
52
  params: z.object({
52
53
  cycle: z.string().describe('Election cycle year (e.g., 2024)'),
53
- office: z.string().describe('Office: senate (or president)'),
54
+ office: z.enum(['S', 'H']).describe('Office code: S=Senate, H=House (at-large).'),
54
55
  state: z.string().describe('Two-letter US state code (e.g., AZ)'),
55
56
  }),
56
57
  handler: (params, ctx) => fetchElection(params, ctx),
57
58
  });
58
- /** House races: openfec://election/2024/house/CA/12 */
59
+ /** House district races: openfec://election/2024/H/CA/12 */
59
60
  export const electionDistrictResource = resource('openfec://election/{cycle}/{office}/{state}/{district}', {
60
61
  name: 'FEC Election Race (District)',
61
62
  description: 'Fetch a house election race with candidate financial totals.',
62
63
  mimeType: 'application/json',
63
64
  params: z.object({
64
65
  cycle: z.string().describe('Election cycle year (e.g., 2024)'),
65
- office: z.string().describe('Office: house'),
66
+ office: z.enum(['H']).describe('Office code: H=House.'),
66
67
  state: z.string().describe('Two-letter US state code (e.g., CA)'),
67
68
  district: z.string().describe('Two-digit district number (e.g., 12)'),
68
69
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"election.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/election.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAG1E,mEAAmE;AACnE,KAAK,UAAU,aAAa,CAC1B,MAA4E,EAC5E,GAA6D;IAE7D,MAAM,GAAG,GAAG,iBAAiB,EAAE,CAAC;IAChC,MAAM,SAAS,GAAc;QAC3B,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MA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,8BAA8B;IACpC,WAAW,EAAE,8DAA8D;IAC3E,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;QAC9D,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QACvD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;QACjE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;KACtE,CAAC;IACF,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC;CACrD,CACF,CAAC"}
@@ -21,6 +21,22 @@ export declare const allResourceDefinitions: (import("@cyanheads/mcp-ts-core").R
21
21
  readonly recovery: "Verify the committee_id format (C + digits) or look up the committee by name via openfec_search_committees.";
22
22
  }]> | import("@cyanheads/mcp-ts-core").ResourceDefinition<import("zod").ZodObject<{
23
23
  cycle: import("zod").ZodString;
24
- office: import("zod").ZodString;
24
+ office: import("zod").ZodEnum<{
25
+ P: "P";
26
+ }>;
27
+ }, import("zod/v4/core").$strip>, undefined, undefined> | import("@cyanheads/mcp-ts-core").ResourceDefinition<import("zod").ZodObject<{
28
+ cycle: import("zod").ZodString;
29
+ office: import("zod").ZodEnum<{
30
+ H: "H";
31
+ S: "S";
32
+ }>;
33
+ state: import("zod").ZodString;
34
+ }, import("zod/v4/core").$strip>, undefined, undefined> | import("@cyanheads/mcp-ts-core").ResourceDefinition<import("zod").ZodObject<{
35
+ cycle: import("zod").ZodString;
36
+ office: import("zod").ZodEnum<{
37
+ H: "H";
38
+ }>;
39
+ state: import("zod").ZodString;
40
+ district: import("zod").ZodString;
25
41
  }, import("zod/v4/core").$strip>, undefined, undefined>)[];
26
42
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAUhC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;0DAMlC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAUhC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DAMlC,CAAC"}
@@ -19,13 +19,32 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
19
19
  }>>;
20
20
  state: import("zod").ZodOptional<import("zod").ZodString>;
21
21
  office: import("zod").ZodOptional<import("zod").ZodEnum<{
22
+ P: "P";
22
23
  H: "H";
23
24
  S: "S";
24
- P: "P";
25
25
  }>>;
26
26
  report_type: import("zod").ZodOptional<import("zod").ZodString>;
27
27
  report_year: import("zod").ZodOptional<import("zod").ZodNumber>;
28
- category: import("zod").ZodOptional<import("zod").ZodString>;
28
+ category: import("zod").ZodOptional<import("zod").ZodEnum<{
29
+ 20: "20";
30
+ 21: "21";
31
+ 22: "22";
32
+ 23: "23";
33
+ 24: "24";
34
+ 25: "25";
35
+ 26: "26";
36
+ 27: "27";
37
+ 28: "28";
38
+ 29: "29";
39
+ 32: "32";
40
+ 33: "33";
41
+ 34: "34";
42
+ 36: "36";
43
+ 37: "37";
44
+ 38: "38";
45
+ 39: "39";
46
+ 40: "40";
47
+ }>>;
29
48
  election_year: import("zod").ZodOptional<import("zod").ZodNumber>;
30
49
  description: import("zod").ZodOptional<import("zod").ZodString>;
31
50
  min_date: import("zod").ZodOptional<import("zod").ZodString>;
@@ -47,9 +66,9 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
47
66
  search: "search";
48
67
  }>>;
49
68
  office: import("zod").ZodEnum<{
50
- president: "president";
51
- senate: "senate";
52
- house: "house";
69
+ P: "P";
70
+ H: "H";
71
+ S: "S";
53
72
  }>;
54
73
  cycle: import("zod").ZodNumber;
55
74
  state: import("zod").ZodOptional<import("zod").ZodString>;
@@ -91,9 +110,9 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
91
110
  state: import("zod").ZodOptional<import("zod").ZodString>;
92
111
  district: import("zod").ZodOptional<import("zod").ZodString>;
93
112
  office: import("zod").ZodOptional<import("zod").ZodEnum<{
113
+ P: "P";
94
114
  H: "H";
95
115
  S: "S";
96
- P: "P";
97
116
  }>>;
98
117
  party: import("zod").ZodOptional<import("zod").ZodString>;
99
118
  cycle: import("zod").ZodOptional<import("zod").ZodNumber>;
@@ -111,8 +130,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
111
130
  }>>;
112
131
  has_raised_funds: import("zod").ZodOptional<import("zod").ZodBoolean>;
113
132
  include_totals: import("zod").ZodOptional<import("zod").ZodBoolean>;
114
- page: import("zod").ZodOptional<import("zod").ZodNumber>;
115
- per_page: import("zod").ZodOptional<import("zod").ZodNumber>;
133
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
134
+ per_page: import("zod").ZodDefault<import("zod").ZodNumber>;
116
135
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
117
136
  candidates: import("zod").ZodArray<import("zod").ZodObject<{}, import("zod/v4/core").$loose>>;
118
137
  totals: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{}, import("zod/v4/core").$loose>>>;
@@ -138,8 +157,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
138
157
  designation: import("zod").ZodOptional<import("zod").ZodString>;
139
158
  cycle: import("zod").ZodOptional<import("zod").ZodNumber>;
140
159
  treasurer_name: import("zod").ZodOptional<import("zod").ZodString>;
141
- page: import("zod").ZodOptional<import("zod").ZodNumber>;
142
- per_page: import("zod").ZodOptional<import("zod").ZodNumber>;
160
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
161
+ per_page: import("zod").ZodDefault<import("zod").ZodNumber>;
143
162
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
144
163
  committees: import("zod").ZodArray<import("zod").ZodObject<{}, import("zod/v4/core").$loose>>;
145
164
  pagination: import("zod").ZodObject<{
@@ -252,9 +271,9 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
252
271
  }>>;
253
272
  payee_name: import("zod").ZodOptional<import("zod").ZodString>;
254
273
  candidate_office: import("zod").ZodOptional<import("zod").ZodEnum<{
274
+ P: "P";
255
275
  H: "H";
256
276
  S: "S";
257
- P: "P";
258
277
  }>>;
259
278
  candidate_office_state: import("zod").ZodOptional<import("zod").ZodString>;
260
279
  candidate_party: import("zod").ZodOptional<import("zod").ZodString>;
@@ -297,13 +316,13 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
297
316
  report_year: import("zod").ZodOptional<import("zod").ZodNumber>;
298
317
  cycle: import("zod").ZodOptional<import("zod").ZodNumber>;
299
318
  is_amended: import("zod").ZodOptional<import("zod").ZodBoolean>;
300
- most_recent: import("zod").ZodOptional<import("zod").ZodBoolean>;
319
+ most_recent: import("zod").ZodDefault<import("zod").ZodBoolean>;
301
320
  min_receipt_date: import("zod").ZodOptional<import("zod").ZodString>;
302
321
  max_receipt_date: import("zod").ZodOptional<import("zod").ZodString>;
303
- page: import("zod").ZodOptional<import("zod").ZodNumber>;
304
- per_page: import("zod").ZodOptional<import("zod").ZodNumber>;
322
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
323
+ per_page: import("zod").ZodDefault<import("zod").ZodNumber>;
305
324
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
306
- filings: import("zod").ZodArray<import("zod").ZodObject<{}, import("zod/v4/core").$loose>>;
325
+ results: import("zod").ZodArray<import("zod").ZodObject<{}, import("zod/v4/core").$loose>>;
307
326
  pagination: import("zod").ZodObject<{
308
327
  page: import("zod").ZodNumber;
309
328
  pages: import("zod").ZodNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAYrD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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