@cyanheads/congressgov-mcp-server 0.4.0 → 0.4.2

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 (67) hide show
  1. package/AGENTS.md +5 -4
  2. package/CLAUDE.md +5 -4
  3. package/Dockerfile +20 -7
  4. package/LICENSE +1 -1
  5. package/README.md +2 -2
  6. package/dist/config/server-config.js.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/mcp-server/resources/definitions/bill.resource.d.ts +4 -4
  10. package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts +22 -22
  11. package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts.map +1 -1
  12. package/dist/mcp-server/tools/definitions/bill-lookup.tool.js +13 -17
  13. package/dist/mcp-server/tools/definitions/bill-lookup.tool.js.map +1 -1
  14. package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts +15 -15
  15. package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts.map +1 -1
  16. package/dist/mcp-server/tools/definitions/bill-summaries.tool.js +6 -3
  17. package/dist/mcp-server/tools/definitions/bill-summaries.tool.js.map +1 -1
  18. package/dist/mcp-server/tools/definitions/committee-lookup.tool.d.ts +15 -15
  19. package/dist/mcp-server/tools/definitions/committee-lookup.tool.d.ts.map +1 -1
  20. package/dist/mcp-server/tools/definitions/committee-lookup.tool.js +52 -22
  21. package/dist/mcp-server/tools/definitions/committee-lookup.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts +13 -13
  23. package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts.map +1 -1
  24. package/dist/mcp-server/tools/definitions/committee-reports.tool.js +2 -3
  25. package/dist/mcp-server/tools/definitions/committee-reports.tool.js.map +1 -1
  26. package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts +11 -11
  27. package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts.map +1 -1
  28. package/dist/mcp-server/tools/definitions/crs-reports.tool.js +2 -3
  29. package/dist/mcp-server/tools/definitions/crs-reports.tool.js.map +1 -1
  30. package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts +14 -14
  31. package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts.map +1 -1
  32. package/dist/mcp-server/tools/definitions/daily-record.tool.js +16 -29
  33. package/dist/mcp-server/tools/definitions/daily-record.tool.js.map +1 -1
  34. package/dist/mcp-server/tools/definitions/enacted-laws.tool.d.ts +12 -12
  35. package/dist/mcp-server/tools/definitions/enacted-laws.tool.d.ts.map +1 -1
  36. package/dist/mcp-server/tools/definitions/enacted-laws.tool.js +2 -3
  37. package/dist/mcp-server/tools/definitions/enacted-laws.tool.js.map +1 -1
  38. package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts +12 -12
  39. package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts.map +1 -1
  40. package/dist/mcp-server/tools/definitions/member-lookup.tool.js +3 -5
  41. package/dist/mcp-server/tools/definitions/member-lookup.tool.js.map +1 -1
  42. package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts +13 -13
  43. package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts.map +1 -1
  44. package/dist/mcp-server/tools/definitions/roll-votes.tool.js +6 -13
  45. package/dist/mcp-server/tools/definitions/roll-votes.tool.js.map +1 -1
  46. package/dist/mcp-server/tools/definitions/search-bills.tool.d.ts +7 -6
  47. package/dist/mcp-server/tools/definitions/search-bills.tool.d.ts.map +1 -1
  48. package/dist/mcp-server/tools/definitions/search-bills.tool.js +7 -7
  49. package/dist/mcp-server/tools/definitions/search-bills.tool.js.map +1 -1
  50. package/dist/mcp-server/tools/definitions/senate-nominations.tool.d.ts +13 -13
  51. package/dist/mcp-server/tools/definitions/senate-nominations.tool.d.ts.map +1 -1
  52. package/dist/mcp-server/tools/definitions/senate-nominations.tool.js +8 -5
  53. package/dist/mcp-server/tools/definitions/senate-nominations.tool.js.map +1 -1
  54. package/dist/mcp-server/tools/tool-helpers.d.ts +72 -12
  55. package/dist/mcp-server/tools/tool-helpers.d.ts.map +1 -1
  56. package/dist/mcp-server/tools/tool-helpers.js +75 -1
  57. package/dist/mcp-server/tools/tool-helpers.js.map +1 -1
  58. package/dist/services/congress-api/congress-api-service.d.ts.map +1 -1
  59. package/dist/services/congress-api/congress-api-service.js +30 -12
  60. package/dist/services/congress-api/congress-api-service.js.map +1 -1
  61. package/dist/services/congress-api/types.d.ts +1 -1
  62. package/dist/services/congress-api/types.d.ts.map +1 -1
  63. package/dist/services/congress-mirror/congress-mirror-service.d.ts.map +1 -1
  64. package/dist/services/senate-lis/senate-vote-service.d.ts.map +1 -1
  65. package/dist/services/senate-lis/senate-vote-service.js.map +1 -1
  66. package/package.json +15 -23
  67. package/server.json +3 -3
package/AGENTS.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** congressgov-mcp-server
4
- **Version:** 0.4.0
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.10`
4
+ **Version:** 0.4.2
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.5`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
7
+ **MCP SDK:** `@modelcontextprotocol/sdk` ^1.30.0
8
8
  **Zod:** ^4.4.3
9
9
 
10
10
  > **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.
@@ -266,7 +266,8 @@ Available skills:
266
266
  | `api-testing` | createMockContext, test patterns |
267
267
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
268
268
  | `api-workers` | Cloudflare Workers runtime |
269
- | `orchestrations` | Multi-server pipeline workflows — phase tables, gate patterns, fanout orchestration |
269
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
270
+ | `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
270
271
 
271
272
  When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
272
273
 
package/CLAUDE.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** congressgov-mcp-server
4
- **Version:** 0.4.0
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.10`
4
+ **Version:** 0.4.2
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.5`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
7
+ **MCP SDK:** `@modelcontextprotocol/sdk` ^1.30.0
8
8
  **Zod:** ^4.4.3
9
9
 
10
10
  > **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.
@@ -266,7 +266,8 @@ Available skills:
266
266
  | `api-testing` | createMockContext, test patterns |
267
267
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
268
268
  | `api-workers` | Cloudflare Workers runtime |
269
- | `orchestrations` | Multi-server pipeline workflows — phase tables, gate patterns, fanout orchestration |
269
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
270
+ | `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
270
271
 
271
272
  When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
272
273
 
package/Dockerfile CHANGED
@@ -4,15 +4,21 @@
4
4
  # This stage installs all dependencies (including dev), builds the TypeScript
5
5
  # source code into JavaScript, and prepares the production assets.
6
6
  # ==============================================================================
7
- FROM oven/bun:1.3 AS build
7
+ FROM oven/bun:1.3.14 AS build
8
8
 
9
9
  WORKDIR /usr/src/app
10
10
 
11
11
  # Copy dependency manifests for optimized layer caching
12
12
  COPY package.json bun.lock ./
13
13
 
14
- # Install all dependencies (including dev dependencies for building)
15
- RUN bun install --frozen-lockfile
14
+ # Install all dependencies (dev included, for building).
15
+ # --ignore-scripts skips better-sqlite3's node-gyp postinstall: the build only
16
+ # runs tsc, and the runtime uses bun:sqlite (never the compiled better-sqlite3
17
+ # binding), so the native module is never needed in the image. Matches the
18
+ # production stage below.
19
+ # The BuildKit cache mount persists Bun's global package cache across builds.
20
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
21
+ bun install --frozen-lockfile --ignore-scripts
16
22
 
17
23
  # Copy the rest of the source code
18
24
  COPY . .
@@ -28,7 +34,7 @@ RUN bun run build
28
34
  # application. It uses a slim base image and only includes production
29
35
  # dependencies and build artifacts.
30
36
  # ==============================================================================
31
- FROM oven/bun:1.3-slim AS production
37
+ FROM oven/bun:1.3.14-slim AS production
32
38
 
33
39
  WORKDIR /usr/src/app
34
40
 
@@ -49,14 +55,21 @@ COPY package.json bun.lock ./
49
55
 
50
56
  # Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
51
57
  # that are not needed in the final production image.
52
- RUN bun install --production --frozen-lockfile --ignore-scripts
58
+ # `--omit=peer` drops the framework's optional peer tiers (test runner, service
59
+ # SDKs, parsers) that Bun would otherwise auto-install. Anything this server
60
+ # actually imports belongs in its own `dependencies`, so nothing needed at
61
+ # runtime is lost. The OTEL step below carries the same flag — without it, that
62
+ # install re-resolves the graph and pulls every optional peer back in.
63
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
64
+ bun install --production --omit=peer --frozen-lockfile --ignore-scripts
53
65
 
54
66
  # Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
55
67
  # These are not bundled by default to keep the base image lean. Enable at build time
56
68
  # with: docker build --build-arg OTEL_ENABLED=true
57
69
  ARG OTEL_ENABLED=true
58
- RUN if [ "$OTEL_ENABLED" = "true" ]; then \
59
- bun add @hono/otel \
70
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
71
+ if [ "$OTEL_ENABLED" = "true" ]; then \
72
+ bun add --omit=dev --omit=peer --ignore-scripts @hono/otel \
60
73
  @opentelemetry/instrumentation-http \
61
74
  @opentelemetry/exporter-metrics-otlp-http \
62
75
  @opentelemetry/exporter-trace-otlp-http \
package/LICENSE CHANGED
@@ -176,7 +176,7 @@
176
176
 
177
177
  END OF TERMS AND CONDITIONS
178
178
 
179
- Copyright 2026 Casey Hand (cyanheads)
179
+ Copyright 2026 Casey Hand @cyanheads
180
180
 
181
181
  Licensed under the Apache License, Version 2.0 (the "License");
182
182
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.4.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/congressgov-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/congressgov-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/congressgov-mcp-server) [![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-v1.3.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.4.2-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/congressgov-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.30.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/congressgov-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/congressgov-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.14-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -119,7 +119,7 @@ Browse the daily Congressional Record — floor speeches, debates, and legislati
119
119
 
120
120
  Keyword-search bill titles and CRS summaries against a local full-text mirror — the discovery path the Congress.gov API itself lacks.
121
121
 
122
- - **Opt-in:** off by default. Requires `CONGRESS_MIRROR_ENABLED=true` and a locally built index (`bun run mirror:init`) — until then the tool is visible but not callable
122
+ - **Opt-in:** off by default, and not offered to clients until `CONGRESS_MIRROR_ENABLED=true`. With the flag set but the index not yet built (`bun run mirror:init`), the tool is callable and answers with an empty result and a build-the-index notice
123
123
  - Narrow with `congress`, `billType`, and `originChamber` filters
124
124
  - Returns BM25-ranked matches with each bill's derived id, ready for a follow-up `congressgov_bill_lookup` call
125
125
 
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,8DAA8D;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU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,4BAA4B;KACzC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,iBAAiB;IAC/B,OAAO,GAAG,SAAS,CAAC;AACtB,CAAC"}
package/dist/index.js CHANGED
@@ -63,7 +63,7 @@ await createApp({
63
63
  withSource(billAnalysisPrompt, 'prompts', 'bill-analysis.prompt.ts'),
64
64
  withSource(legislativeResearchPrompt, 'prompts', 'legislative-research.prompt.ts'),
65
65
  ],
66
- instructions: `Use the congressgov_* tools to access U.S. legislative data via the Congress.gov API v3: bills, enacted laws, members, committees, roll call votes, presidential nominations, CRS reports, and the daily Congressional Record. The Congress.gov API itself has no keyword search — browse by congress number, bill/report type, date range, chamber, state, and district. An optional local FTS mirror adds congressgov_search_bills (keyword search over bill titles and summaries) when CONGRESS_MIRROR_ENABLED is set; off by default, the tool is visible but not callable. Bills are addressed by congress + billType + billNumber (e.g. 118/hr/1234), members by bioguideId, committees by chamber-prefix codes. congressgov_roll_votes serves both chambers via its 'chamber' parameter — House votes come from the Congress.gov API, Senate votes from the Senate's official LIS feed.`,
66
+ instructions: `Use the congressgov_* tools to access U.S. legislative data via the Congress.gov API v3: bills, enacted laws, members, committees, roll call votes, presidential nominations, CRS reports, and the daily Congressional Record. The Congress.gov API itself has no keyword search — browse by congress number, bill/report type, date range, chamber, state, and district. An optional local FTS mirror adds congressgov_search_bills (keyword search over bill titles and summaries) when CONGRESS_MIRROR_ENABLED is set; it is off by default, and the tool is not offered at all unless that flag is set. Bills are addressed by congress + billType + billNumber (e.g. 118/hr/1234), members by bioguideId, committees by chamber-prefix codes. congressgov_roll_votes serves both chambers via its 'chamber' parameter — House votes come from the Congress.gov API, Senate votes from the Senate's official LIS feed.`,
67
67
  landing: {
68
68
  repoRoot: REPO_ROOT,
69
69
  tagline: 'U.S. legislative data — bills, votes, members, committees — via MCP.',
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":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AM,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;gBACxE,KAAK,qBAAqB,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAC,CAAC;AAEH,wEAAwE;AACxE,KAAK,UAAU,qBAAqB,CAAC,IAAY;IAC/C,MAAM,gBAAgB,CAAC,QAAQ,CAC7B,wBAAwB,EACxB,IAAI,EACJ,KAAK,EAAE,MAAM,EAAE,EAAE;QACf,MAAM,CAAC,IAAI,CAAC,iDAAiD,EAAE,MAAM,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,iBAAiB,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QACrF,MAAM,CAAC,IAAI,CACT,oDAAoD,MAAM,CAAC,cAAc,2BAA2B,MAAM,CAAC,KAAK,GAAG,EACnH,MAAM,CACP,CAAC;IACJ,CAAC,EACD,8EAA8E,CAC/E,CAAC;IACF,gBAAgB,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;AACnD,CAAC"}
@@ -6,13 +6,13 @@ import { z } from '@cyanheads/mcp-ts-core';
6
6
  export declare const billResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<z.ZodObject<{
7
7
  congress: z.ZodString;
8
8
  billType: z.ZodEnum<{
9
+ hconres: "hconres";
10
+ hjres: "hjres";
9
11
  hr: "hr";
12
+ hres: "hres";
10
13
  s: "s";
11
- hjres: "hjres";
12
- sjres: "sjres";
13
- hconres: "hconres";
14
14
  sconres: "sconres";
15
- hres: "hres";
15
+ sjres: "sjres";
16
16
  sres: "sres";
17
17
  }>;
18
18
  billNumber: z.ZodString;
@@ -5,35 +5,35 @@
5
5
  import { z } from '@cyanheads/mcp-ts-core';
6
6
  export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
7
7
  operation: z.ZodEnum<{
8
- text: "text";
9
8
  actions: "actions";
10
9
  amendments: "amendments";
11
- cosponsors: "cosponsors";
12
10
  committees: "committees";
13
- subjects: "subjects";
14
- summaries: "summaries";
15
- titles: "titles";
11
+ cosponsors: "cosponsors";
16
12
  get: "get";
17
13
  list: "list";
18
14
  related: "related";
15
+ subjects: "subjects";
16
+ summaries: "summaries";
17
+ text: "text";
18
+ titles: "titles";
19
19
  }>;
20
20
  congress: z.ZodNumber;
21
21
  billType: z.ZodOptional<z.ZodEnum<{
22
+ hconres: "hconres";
23
+ hjres: "hjres";
22
24
  hr: "hr";
25
+ hres: "hres";
23
26
  s: "s";
24
- hjres: "hjres";
25
- sjres: "sjres";
26
- hconres: "hconres";
27
27
  sconres: "sconres";
28
- hres: "hres";
28
+ sjres: "sjres";
29
29
  sres: "sres";
30
30
  }>>;
31
- billNumber: z.ZodOptional<z.ZodNumber>;
31
+ billNumber: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
32
32
  fromDateTime: z.ZodOptional<z.ZodString>;
33
33
  toDateTime: z.ZodOptional<z.ZodString>;
34
34
  order: z.ZodDefault<z.ZodEnum<{
35
- recent: "recent";
36
35
  oldest: "oldest";
36
+ recent: "recent";
37
37
  }>>;
38
38
  limit: z.ZodDefault<z.ZodNumber>;
39
39
  offset: z.ZodDefault<z.ZodNumber>;
@@ -45,28 +45,28 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
45
45
  }, z.core.$strip>>;
46
46
  }, z.core.$loose>, readonly [{
47
47
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
48
- readonly reason: "not_found";
48
+ readonly reason: 'not_found';
49
49
  readonly retryable: false;
50
- readonly when: "A requested bill, member, committee, report, vote, or nomination does not exist in Congress.gov.";
50
+ readonly when: 'A requested bill, member, committee, report, vote, or nomination does not exist in Congress.gov.';
51
51
  readonly recovery: "Use the tool's list or browse operation to discover valid identifiers, then retry with one that exists.";
52
52
  }, {
53
53
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.RateLimited;
54
- readonly reason: "rate_limited";
54
+ readonly reason: 'rate_limited';
55
55
  readonly retryable: true;
56
- readonly when: "The Congress.gov API rate limit (5,000 requests/hour per key) was exceeded.";
57
- readonly recovery: "Wait for the hourly rate-limit window to reset before retrying, or reduce the request frequency.";
56
+ readonly when: 'The Congress.gov API rate limit (5,000 requests/hour per key) was exceeded.';
57
+ readonly recovery: 'Wait for the hourly rate-limit window to reset before retrying, or reduce the request frequency.';
58
58
  }, {
59
59
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
60
- readonly reason: "invalid_request";
60
+ readonly reason: 'invalid_request';
61
61
  readonly retryable: false;
62
- readonly when: "Congress.gov rejected the request as malformed — a bad date range or an identifier with an unexpected shape.";
63
- readonly recovery: "Check parameter formats: dates must be ISO 8601 like 2026-05-01T00:00:00Z and identifiers must match their documented shape.";
62
+ readonly when: 'Congress.gov rejected the request as malformed — a bad date range or an identifier with an unexpected shape.';
63
+ readonly recovery: 'Check parameter formats: dates must be ISO 8601 like 2026-05-01T00:00:00Z and identifiers must match their documented shape.';
64
64
  }, {
65
65
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
66
- readonly reason: "upstream_error";
66
+ readonly reason: 'upstream_error';
67
67
  readonly retryable: true;
68
- readonly when: "Congress.gov returned an unexpected error (5xx or another non-2xx status).";
69
- readonly recovery: "Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.";
68
+ readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
69
+ readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
70
70
  }], {
71
71
  effectiveQuery: z.ZodString;
72
72
  totalCount: z.ZodNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"bill-lookup.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/bill-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAmCjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwIzB,CAAC"}
1
+ {"version":3,"file":"bill-lookup.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/bill-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAuCjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2IzB,CAAC"}
@@ -5,7 +5,7 @@
5
5
  import { tool, z } from '@cyanheads/mcp-ts-core';
6
6
  import { validationError } from '@cyanheads/mcp-ts-core/errors';
7
7
  import { formatBills } from '../../../mcp-server/tools/format-helpers.js';
8
- import { buildEffectiveQuery, congressErrorContracts, listEnrichment, listOrDetail, normalizeOptionalString, validateIsoDateTime, } from '../../../mcp-server/tools/tool-helpers.js';
8
+ import { buildEffectiveQuery, congressErrorContracts, listEnrichment, listOrDetail, normalizeOptionalString, notifyIfNoMatches, numericIdentifier, toIdentifierNumber, validateDateTimeRange, validateIsoDateTime, } from '../../../mcp-server/tools/tool-helpers.js';
9
9
  import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
10
10
  import { BILL_TYPE_CODES } from '../../../services/congress-api/types.js';
11
11
  const BillTypeEnum = z.enum(BILL_TYPE_CODES);
@@ -33,12 +33,7 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
33
33
  operation: OperationEnum.describe('Which data to retrieve.'),
34
34
  congress: z.number().int().positive().describe('Congress number (e.g., 118, 119).'),
35
35
  billType: BillTypeEnum.optional().describe('Bill type code. Required for get and sub-resource operations.'),
36
- billNumber: z
37
- .number()
38
- .int()
39
- .positive()
40
- .optional()
41
- .describe('Bill number. Required for get and sub-resource operations.'),
36
+ billNumber: numericIdentifier('Bill number. Required for get and sub-resource operations. Accepts the digit-string form list rows carry (e.g. "9479") as well as a number.').optional(),
42
37
  fromDateTime: z
43
38
  .string()
44
39
  .optional()
@@ -61,6 +56,7 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
61
56
  const api = getCongressApi();
62
57
  const fromDateTime = validateIsoDateTime(normalizeOptionalString(input.fromDateTime), 'fromDateTime');
63
58
  const toDateTime = validateIsoDateTime(normalizeOptionalString(input.toDateTime), 'toDateTime');
59
+ validateDateTimeRange(fromDateTime, toDateTime);
64
60
  if (input.operation === 'list') {
65
61
  const result = await api.listBills({
66
62
  congress: input.congress,
@@ -79,25 +75,26 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
79
75
  toDateTime,
80
76
  }));
81
77
  ctx.enrich.total(result.pagination.count);
82
- if (result.data.length === 0)
83
- ctx.enrich.notice('No bills matched the filters. Try broadening the date range or removing billType.');
78
+ notifyIfNoMatches(ctx, result, 'No bills matched the filters. Try broadening the date range or removing billType.');
84
79
  return result;
85
80
  }
86
81
  if (!input.billType || !input.billNumber) {
87
82
  throw validationError(`The '${input.operation}' operation requires congress, billType, and billNumber. Use 'list' first to find the bill, then request its ${input.operation}.`, { operation: input.operation, billType: input.billType, billNumber: input.billNumber });
88
83
  }
84
+ /** List rows carry `number` as a string; the service takes a number. */
85
+ const billNumber = toIdentifierNumber(input.billNumber);
89
86
  if (input.operation === 'get') {
90
87
  const result = await api.getBill({
91
88
  congress: input.congress,
92
89
  billType: input.billType,
93
- billNumber: input.billNumber,
90
+ billNumber,
94
91
  }, ctx);
95
92
  ctx.log.info('Bill retrieved', {
96
93
  congress: input.congress,
97
94
  billType: input.billType,
98
- billNumber: input.billNumber,
95
+ billNumber,
99
96
  });
100
- ctx.enrich.echo(`${input.billType.toUpperCase()} ${input.billNumber} in the ${input.congress}th Congress`);
97
+ ctx.enrich.echo(`${input.billType.toUpperCase()} ${billNumber} in the ${input.congress}th Congress`);
101
98
  ctx.enrich.total(1);
102
99
  return result;
103
100
  }
@@ -105,7 +102,7 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
105
102
  const result = await api.getBillSubResource({
106
103
  congress: input.congress,
107
104
  billType: input.billType,
108
- billNumber: input.billNumber,
105
+ billNumber,
109
106
  subResource: subResource,
110
107
  limit: input.limit,
111
108
  offset: input.offset,
@@ -113,13 +110,12 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
113
110
  ctx.log.info('Bill sub-resource retrieved', {
114
111
  congress: input.congress,
115
112
  billType: input.billType,
116
- billNumber: input.billNumber,
113
+ billNumber,
117
114
  subResource,
118
115
  });
119
- ctx.enrich.echo(`${input.operation} for ${input.billType.toUpperCase()} ${input.billNumber} in the ${input.congress}th Congress`);
116
+ ctx.enrich.echo(`${input.operation} for ${input.billType.toUpperCase()} ${billNumber} in the ${input.congress}th Congress`);
120
117
  ctx.enrich.total(result.pagination.count);
121
- if (result.data.length === 0)
122
- ctx.enrich.notice(`No ${input.operation} found for ${input.billType.toUpperCase()} ${input.billNumber}.`);
118
+ notifyIfNoMatches(ctx, result, `No ${input.operation} found for ${input.billType.toUpperCase()} ${billNumber}.`);
123
119
  return result;
124
120
  },
125
121
  });
@@ -1 +1 @@
1
- {"version":3,"file":"bill-lookup.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/bill-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,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U,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;YAC1B,GAAG,CAAC,MAAM,CAAC,MAAM,CACf,MAAM,KAAK,CAAC,SAAS,cAAc,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,KAAK,CAAC,UAAU,GAAG,CACvF,CAAC;QACJ,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"bill-lookup.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/bill-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,eAAe,EAAwB,MAAM,kCAAkC,CAAC;AAEzF,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAE7C,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3B,MAAM;IACN,KAAK;IACL,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,WAAW;IACX,MAAM;IACN,QAAQ;IACR,SAAS;CACV,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAA2B;IAC/C,OAAO,EAAE,cAAc;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,yBAAyB,EAA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AAS,CAAC;QACzE,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,kBAAkB,CACzC;YACE,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,UAAU;YACV,WAAW,EAAE,WAA8B;YAC3C,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,EACD,GAAG,CACJ,CAAC;QACF,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,6BAA6B,EAAE;YAC1C,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,UAAU;YACV,WAAW;SACZ,CAAC,CAAC;QACH,GAAG,CAAC,MAAM,CAAC,IAAI,CACb,GAAG,KAAK,CAAC,SAAS,QAAQ,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,UAAU,WAAW,KAAK,CAAC,QAAQ,aAAa,CAC3G,CAAC;QACF,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1C,iBAAiB,CACf,GAAG,EACH,MAAM,EACN,MAAM,KAAK,CAAC,SAAS,cAAc,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,UAAU,GAAG,CACjF,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC"}
@@ -6,13 +6,13 @@ import { z } from '@cyanheads/mcp-ts-core';
6
6
  export declare const billSummariesTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
7
7
  congress: z.ZodOptional<z.ZodNumber>;
8
8
  billType: z.ZodOptional<z.ZodEnum<{
9
+ hconres: "hconres";
10
+ hjres: "hjres";
9
11
  hr: "hr";
12
+ hres: "hres";
10
13
  s: "s";
11
- hjres: "hjres";
12
- sjres: "sjres";
13
- hconres: "hconres";
14
14
  sconres: "sconres";
15
- hres: "hres";
15
+ sjres: "sjres";
16
16
  sres: "sres";
17
17
  }>>;
18
18
  fromDateTime: z.ZodOptional<z.ZodString>;
@@ -27,28 +27,28 @@ export declare const billSummariesTool: import("@cyanheads/mcp-ts-core").ToolDef
27
27
  }, z.core.$strip>;
28
28
  }, z.core.$loose>, readonly [{
29
29
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
30
- readonly reason: "not_found";
30
+ readonly reason: 'not_found';
31
31
  readonly retryable: false;
32
- readonly when: "A requested bill, member, committee, report, vote, or nomination does not exist in Congress.gov.";
32
+ readonly when: 'A requested bill, member, committee, report, vote, or nomination does not exist in Congress.gov.';
33
33
  readonly recovery: "Use the tool's list or browse operation to discover valid identifiers, then retry with one that exists.";
34
34
  }, {
35
35
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.RateLimited;
36
- readonly reason: "rate_limited";
36
+ readonly reason: 'rate_limited';
37
37
  readonly retryable: true;
38
- readonly when: "The Congress.gov API rate limit (5,000 requests/hour per key) was exceeded.";
39
- readonly recovery: "Wait for the hourly rate-limit window to reset before retrying, or reduce the request frequency.";
38
+ readonly when: 'The Congress.gov API rate limit (5,000 requests/hour per key) was exceeded.';
39
+ readonly recovery: 'Wait for the hourly rate-limit window to reset before retrying, or reduce the request frequency.';
40
40
  }, {
41
41
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
42
- readonly reason: "invalid_request";
42
+ readonly reason: 'invalid_request';
43
43
  readonly retryable: false;
44
- readonly when: "Congress.gov rejected the request as malformed — a bad date range or an identifier with an unexpected shape.";
45
- readonly recovery: "Check parameter formats: dates must be ISO 8601 like 2026-05-01T00:00:00Z and identifiers must match their documented shape.";
44
+ readonly when: 'Congress.gov rejected the request as malformed — a bad date range or an identifier with an unexpected shape.';
45
+ readonly recovery: 'Check parameter formats: dates must be ISO 8601 like 2026-05-01T00:00:00Z and identifiers must match their documented shape.';
46
46
  }, {
47
47
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
48
- readonly reason: "upstream_error";
48
+ readonly reason: 'upstream_error';
49
49
  readonly retryable: true;
50
- readonly when: "Congress.gov returned an unexpected error (5xx or another non-2xx status).";
51
- readonly recovery: "Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.";
50
+ readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
51
+ readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
52
52
  }], {
53
53
  effectiveQuery: z.ZodString;
54
54
  totalCount: z.ZodNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"bill-summaries.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/bill-summaries.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAiBjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkF5B,CAAC"}
1
+ {"version":3,"file":"bill-summaries.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/bill-summaries.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAmBjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwF5B,CAAC"}
@@ -5,7 +5,7 @@
5
5
  import { tool, z } from '@cyanheads/mcp-ts-core';
6
6
  import { validationError } from '@cyanheads/mcp-ts-core/errors';
7
7
  import { formatSummaries } from '../../../mcp-server/tools/format-helpers.js';
8
- import { buildEffectiveQuery, congressErrorContracts, listEnrichment, listOutput, normalizeOptionalString, validateIsoDateTime, } from '../../../mcp-server/tools/tool-helpers.js';
8
+ import { buildEffectiveQuery, congressErrorContracts, listEnrichment, listOutput, normalizeOptionalString, notifyIfNoMatches, validateDateTimeRange, validateIsoDateTime, } from '../../../mcp-server/tools/tool-helpers.js';
9
9
  import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
10
10
  import { BILL_TYPE_CODES } from '../../../services/congress-api/types.js';
11
11
  const DEFAULT_LOOKBACK_MS = 7 * 24 * 60 * 60 * 1000;
@@ -38,6 +38,10 @@ export const billSummariesTool = tool('congressgov_bill_summaries', {
38
38
  async handler(input, ctx) {
39
39
  const fromDateTimeInput = validateIsoDateTime(normalizeOptionalString(input.fromDateTime), 'fromDateTime');
40
40
  const toDateTimeInput = validateIsoDateTime(normalizeOptionalString(input.toDateTime), 'toDateTime');
41
+ // Checked on the caller's own bounds, before the default below is applied —
42
+ // the default only fires when neither bound was supplied, so it can never
43
+ // introduce a reversal of its own.
44
+ validateDateTimeRange(fromDateTimeInput, toDateTimeInput);
41
45
  if (input.billType && !input.congress) {
42
46
  throw validationError("The 'billType' filter requires 'congress'. Provide both or omit billType to browse across all types.", { field: 'congress', billType: input.billType });
43
47
  }
@@ -62,8 +66,7 @@ export const billSummariesTool = tool('congressgov_bill_summaries', {
62
66
  toDateTime: toDateTimeInput,
63
67
  }));
64
68
  ctx.enrich.total(result.pagination.count);
65
- if (result.data.length === 0)
66
- ctx.enrich.notice('No summaries found. Try broadening the date range or removing billType/congress filters.');
69
+ notifyIfNoMatches(ctx, result, 'No summaries found. Try broadening the date range or removing billType/congress filters.');
67
70
  return result;
68
71
  },
69
72
  });
@@ -1 +1 @@
1
- {"version":3,"file":"bill-summaries.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/bill-summaries.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EACL,mBAA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E,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAChE,GAAG,CAAC,MAAM,CAAC,IAAI,CACb,mBAAmB,CAAC,gBAAgB,EAAE;YACpC,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,YAAY;YACZ,UAAU,EAAE,eAAe;SAC5B,CAAC,CACH,CAAC;QACF,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;YAC1B,GAAG,CAAC,MAAM,CAAC,MAAM,CACf,0FAA0F,CAC3F,CAAC;QACJ,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"bill-summaries.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/bill-summaries.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,UAAU,EACV,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,4BAA4B,EAAE;IAClE,WAAW,EAAE,2jBAA2jB;IACxkB,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AAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1C,iBAAiB,CACf,GAAG,EACH,MAAM,EACN,0FAA0F,CAC3F,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC"}
@@ -6,24 +6,24 @@ import { z } from '@cyanheads/mcp-ts-core';
6
6
  export declare const committeeLookupTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
7
7
  operation: z.ZodEnum<{
8
8
  bills: "bills";
9
- reports: "reports";
10
- nominations: "nominations";
11
9
  get: "get";
12
10
  list: "list";
11
+ nominations: "nominations";
12
+ reports: "reports";
13
13
  }>;
14
14
  congress: z.ZodOptional<z.ZodNumber>;
15
15
  chamber: z.ZodOptional<z.ZodEnum<{
16
16
  house: "house";
17
- senate: "senate";
18
17
  joint: "joint";
18
+ senate: "senate";
19
19
  }>>;
20
20
  committeeCode: z.ZodOptional<z.ZodString>;
21
21
  filter: z.ZodOptional<z.ZodString>;
22
22
  limit: z.ZodDefault<z.ZodNumber>;
23
23
  offset: z.ZodDefault<z.ZodNumber>;
24
24
  order: z.ZodDefault<z.ZodEnum<{
25
- recent: "recent";
26
25
  oldest: "oldest";
26
+ recent: "recent";
27
27
  }>>;
28
28
  }, z.core.$strip>, z.ZodObject<{
29
29
  data: z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$loose>>>;
@@ -33,28 +33,28 @@ export declare const committeeLookupTool: import("@cyanheads/mcp-ts-core").ToolD
33
33
  }, z.core.$strip>>;
34
34
  }, z.core.$loose>, readonly [{
35
35
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
36
- readonly reason: "not_found";
36
+ readonly reason: 'not_found';
37
37
  readonly retryable: false;
38
- readonly when: "A requested bill, member, committee, report, vote, or nomination does not exist in Congress.gov.";
38
+ readonly when: 'A requested bill, member, committee, report, vote, or nomination does not exist in Congress.gov.';
39
39
  readonly recovery: "Use the tool's list or browse operation to discover valid identifiers, then retry with one that exists.";
40
40
  }, {
41
41
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.RateLimited;
42
- readonly reason: "rate_limited";
42
+ readonly reason: 'rate_limited';
43
43
  readonly retryable: true;
44
- readonly when: "The Congress.gov API rate limit (5,000 requests/hour per key) was exceeded.";
45
- readonly recovery: "Wait for the hourly rate-limit window to reset before retrying, or reduce the request frequency.";
44
+ readonly when: 'The Congress.gov API rate limit (5,000 requests/hour per key) was exceeded.';
45
+ readonly recovery: 'Wait for the hourly rate-limit window to reset before retrying, or reduce the request frequency.';
46
46
  }, {
47
47
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
48
- readonly reason: "invalid_request";
48
+ readonly reason: 'invalid_request';
49
49
  readonly retryable: false;
50
- readonly when: "Congress.gov rejected the request as malformed — a bad date range or an identifier with an unexpected shape.";
51
- readonly recovery: "Check parameter formats: dates must be ISO 8601 like 2026-05-01T00:00:00Z and identifiers must match their documented shape.";
50
+ readonly when: 'Congress.gov rejected the request as malformed — a bad date range or an identifier with an unexpected shape.';
51
+ readonly recovery: 'Check parameter formats: dates must be ISO 8601 like 2026-05-01T00:00:00Z and identifiers must match their documented shape.';
52
52
  }, {
53
53
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
54
- readonly reason: "upstream_error";
54
+ readonly reason: 'upstream_error';
55
55
  readonly retryable: true;
56
- readonly when: "Congress.gov returned an unexpected error (5xx or another non-2xx status).";
57
- readonly recovery: "Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.";
56
+ readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
57
+ readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
58
58
  }], {
59
59
  effectiveQuery: z.ZodString;
60
60
  totalCount: z.ZodNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"committee-lookup.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/committee-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAqGjD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyM9B,CAAC"}
1
+ {"version":3,"file":"committee-lookup.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/committee-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAkHjD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6N9B,CAAC"}