@cyanheads/congressgov-mcp-server 0.7.4 → 0.8.1

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 (54) hide show
  1. package/AGENTS.md +15 -9
  2. package/CLAUDE.md +15 -9
  3. package/Dockerfile +3 -3
  4. package/README.md +40 -15
  5. package/changelog/0.8.x/0.8.0.md +25 -0
  6. package/changelog/0.8.x/0.8.1.md +28 -0
  7. package/dist/config/server-config.js +1 -1
  8. package/dist/config/server-config.js.map +1 -1
  9. package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts +21 -8
  10. package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts.map +1 -1
  11. package/dist/mcp-server/tools/definitions/bill-lookup.tool.js +9 -5
  12. package/dist/mcp-server/tools/definitions/bill-lookup.tool.js.map +1 -1
  13. package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts +9 -2
  14. package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts.map +1 -1
  15. package/dist/mcp-server/tools/definitions/committee-lookup.tool.d.ts +9 -2
  16. package/dist/mcp-server/tools/definitions/committee-lookup.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/committee-lookup.tool.js +12 -15
  18. package/dist/mcp-server/tools/definitions/committee-lookup.tool.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts +17 -4
  20. package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts.map +1 -1
  21. package/dist/mcp-server/tools/definitions/committee-reports.tool.js +5 -2
  22. package/dist/mcp-server/tools/definitions/committee-reports.tool.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts +15 -2
  24. package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/crs-reports.tool.js +6 -2
  26. package/dist/mcp-server/tools/definitions/crs-reports.tool.js.map +1 -1
  27. package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts +17 -4
  28. package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/daily-record.tool.js +5 -2
  30. package/dist/mcp-server/tools/definitions/daily-record.tool.js.map +1 -1
  31. package/dist/mcp-server/tools/definitions/enacted-laws.tool.d.ts +9 -2
  32. package/dist/mcp-server/tools/definitions/enacted-laws.tool.d.ts.map +1 -1
  33. package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts +9 -2
  34. package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts.map +1 -1
  35. package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts +15 -2
  36. package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts.map +1 -1
  37. package/dist/mcp-server/tools/definitions/roll-votes.tool.js +5 -2
  38. package/dist/mcp-server/tools/definitions/roll-votes.tool.js.map +1 -1
  39. package/dist/mcp-server/tools/definitions/senate-nominations.tool.d.ts +15 -2
  40. package/dist/mcp-server/tools/definitions/senate-nominations.tool.d.ts.map +1 -1
  41. package/dist/mcp-server/tools/definitions/senate-nominations.tool.js +5 -2
  42. package/dist/mcp-server/tools/definitions/senate-nominations.tool.js.map +1 -1
  43. package/dist/mcp-server/tools/tool-helpers.d.ts +20 -5
  44. package/dist/mcp-server/tools/tool-helpers.d.ts.map +1 -1
  45. package/dist/mcp-server/tools/tool-helpers.js +23 -5
  46. package/dist/mcp-server/tools/tool-helpers.js.map +1 -1
  47. package/dist/services/congress-api/congress-api-service.d.ts +8 -3
  48. package/dist/services/congress-api/congress-api-service.d.ts.map +1 -1
  49. package/dist/services/congress-api/congress-api-service.js +83 -18
  50. package/dist/services/congress-api/congress-api-service.js.map +1 -1
  51. package/dist/services/congress-documents/congress-documents-service.js +3 -3
  52. package/dist/services/congress-documents/congress-documents-service.js.map +1 -1
  53. package/package.json +9 -9
  54. package/server.json +5 -5
package/AGENTS.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** congressgov-mcp-server
4
- **Version:** 0.7.4
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.14`
4
+ **Version:** 0.8.1
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.16`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/server` ^2.2.0
8
- **Zod:** ^4.6.5
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
8
+ **Zod:** ^4.6.7
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.
11
11
 
@@ -40,7 +40,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
40
40
 
41
41
  | Env Var | Required | Description |
42
42
  |:--------|:---------|:------------|
43
- | `CONGRESS_API_KEY` | No | Optional. Defaults to `DEMO_KEY` (30 req/hr). Own key from [api.data.gov](https://api.data.gov/signup/): 5,000 req/hr. |
43
+ | `CONGRESS_API_KEY` | No | Optional. Fallbacks: `DEMO_KEY` 30/hour and 50/day per IP; registered key from [api.data.gov](https://api.data.gov/signup/) 5,000/hour. Valid upstream hourly quota headers take precedence. |
44
44
  | `CONGRESS_API_BASE_URL` | No | Defaults to `https://api.congress.gov/v3` |
45
45
  | `CONGRESS_MIRROR_ENABLED` | No | Enable the local bill search mirror and `congressgov_search_bills`. Defaults to `false`. |
46
46
  | `CONGRESS_MIRROR_PATH` | No | Filesystem path to the SQLite mirror index. Defaults to `.mirror/bills.sqlite3`. |
@@ -169,7 +169,7 @@ Four services. `CongressApiService` backs nine tools and the House branch of `co
169
169
  **`CongressApiService`** — wraps the Congress.gov REST API v3:
170
170
  - API key via `X-Api-Key` header (never logged; kept out of the URL so it can't leak in upstream error messages)
171
171
  - Pagination: `offset` + `limit` query params, max 250 per request
172
- - Rate limiting: 5,000 requests/hour per key
172
+ - Rate limiting: rolling process-local attempt budgets, reserved before every dispatch (failures, retries, concurrent calls included). Credential fallbacks are demo 30/hour + 50/day and registered 5,000/hour; valid upstream hourly headers override the fallback. Observed remaining is a conservative shared-quota bound, expires one local hour after observation, and never claims an upstream reset time. Other clients are outside local accounting
173
173
  - Response normalization: request `format=json`, return typed data
174
174
  - Native `fetch` — no SDK dependency
175
175
 
@@ -208,11 +208,14 @@ async handler(input, ctx) {
208
208
 
209
209
  ## Error Patterns
210
210
 
211
+ `identityErrorContracts` declares `incompatible_identity` (`ValidationError`, -32007) only on bill lookup, roll votes, nominations, CRS reports, committee reports, and daily record. Their `list` handlers reject meaningful entity identifiers before any service call, preserving the explicit operation and harmless pagination/defaulted selectors. Optional blank string identities remain unset. Bill `type`/`number` and CRS `id`/`reportId`/`report_id` aliases normalize before that check; collisions retain the framework's rejection policy. Bill types and `relatedbills` values normalize through schema-preserving preprocessors.
212
+
211
213
  All tools share these patterns. The service layer handles them uniformly:
212
214
 
213
215
  | Condition | Error |
214
216
  |:----------|:------|
215
- | Rate limit hit | `rateLimited('Congress.gov API rate limit reached (5,000 requests/hour).')` |
217
+ | Rate limit hit | `rateLimited(...)` with `rate_limited`, credential/shared-quota guidance and upstream `Retry-After` when supplied |
218
+ | Deadline or HTTP timeout | `Timeout` (-32004), `upstream_timeout`; HTTP responses retain status |
216
219
  | API unavailable (5xx) | `serviceUnavailable('Congress.gov API returned HTTP {status}.')` |
217
220
  | Entity not found (404) | `notFound('{entity} not found', { ...identifiers })` |
218
221
  | Invalid params | `validationError('...', { field })` |
@@ -327,11 +330,13 @@ When you complete a skill's checklist, check the boxes and add a completion time
327
330
 
328
331
  ---
329
332
 
333
+ **CI is one file.** `.github/workflows/codeql.yml` is the only GitHub Actions workflow. Verification — `devcheck`, tests, and release gates — runs locally; don't add a workflow that re-runs it.
334
+
330
335
  ## Bundling
331
336
 
332
337
  `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`framework-skills/`, `skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. MCPB is stdio-only — HTTP deployments are unaffected. The bundle file ships as `dist/congressgov-mcp-server.mcpb`.
333
338
 
334
- **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
339
+ **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"`, and an optional string option carries `"default": ""`. The host substitutes only the `user_config` reference; `"${X}"` reaches the server literally.
335
340
 
336
341
  ---
337
342
 
@@ -372,12 +377,13 @@ After a version bump and final commit, publish to both npm and GHCR:
372
377
  bun publish --access public
373
378
 
374
379
  docker buildx build --platform linux/amd64,linux/arm64 \
380
+ --build-arg APP_VERSION=<version> \
375
381
  -t ghcr.io/cyanheads/congressgov-mcp-server:<version> \
376
382
  -t ghcr.io/cyanheads/congressgov-mcp-server:latest \
377
383
  --push .
378
384
  ```
379
385
 
380
- Remind the user to run these after completing a release flow.
386
+ The `release-and-publish` run handles npm, MCP Registry, bundle, GitHub Release, and GHCR publishing.
381
387
 
382
388
  ---
383
389
 
package/CLAUDE.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** congressgov-mcp-server
4
- **Version:** 0.7.4
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.14`
4
+ **Version:** 0.8.1
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.16`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/server` ^2.2.0
8
- **Zod:** ^4.6.5
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
8
+ **Zod:** ^4.6.7
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.
11
11
 
@@ -40,7 +40,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
40
40
 
41
41
  | Env Var | Required | Description |
42
42
  |:--------|:---------|:------------|
43
- | `CONGRESS_API_KEY` | No | Optional. Defaults to `DEMO_KEY` (30 req/hr). Own key from [api.data.gov](https://api.data.gov/signup/): 5,000 req/hr. |
43
+ | `CONGRESS_API_KEY` | No | Optional. Fallbacks: `DEMO_KEY` 30/hour and 50/day per IP; registered key from [api.data.gov](https://api.data.gov/signup/) 5,000/hour. Valid upstream hourly quota headers take precedence. |
44
44
  | `CONGRESS_API_BASE_URL` | No | Defaults to `https://api.congress.gov/v3` |
45
45
  | `CONGRESS_MIRROR_ENABLED` | No | Enable the local bill search mirror and `congressgov_search_bills`. Defaults to `false`. |
46
46
  | `CONGRESS_MIRROR_PATH` | No | Filesystem path to the SQLite mirror index. Defaults to `.mirror/bills.sqlite3`. |
@@ -169,7 +169,7 @@ Four services. `CongressApiService` backs nine tools and the House branch of `co
169
169
  **`CongressApiService`** — wraps the Congress.gov REST API v3:
170
170
  - API key via `X-Api-Key` header (never logged; kept out of the URL so it can't leak in upstream error messages)
171
171
  - Pagination: `offset` + `limit` query params, max 250 per request
172
- - Rate limiting: 5,000 requests/hour per key
172
+ - Rate limiting: rolling process-local attempt budgets, reserved before every dispatch (failures, retries, concurrent calls included). Credential fallbacks are demo 30/hour + 50/day and registered 5,000/hour; valid upstream hourly headers override the fallback. Observed remaining is a conservative shared-quota bound, expires one local hour after observation, and never claims an upstream reset time. Other clients are outside local accounting
173
173
  - Response normalization: request `format=json`, return typed data
174
174
  - Native `fetch` — no SDK dependency
175
175
 
@@ -208,11 +208,14 @@ async handler(input, ctx) {
208
208
 
209
209
  ## Error Patterns
210
210
 
211
+ `identityErrorContracts` declares `incompatible_identity` (`ValidationError`, -32007) only on bill lookup, roll votes, nominations, CRS reports, committee reports, and daily record. Their `list` handlers reject meaningful entity identifiers before any service call, preserving the explicit operation and harmless pagination/defaulted selectors. Optional blank string identities remain unset. Bill `type`/`number` and CRS `id`/`reportId`/`report_id` aliases normalize before that check; collisions retain the framework's rejection policy. Bill types and `relatedbills` values normalize through schema-preserving preprocessors.
212
+
211
213
  All tools share these patterns. The service layer handles them uniformly:
212
214
 
213
215
  | Condition | Error |
214
216
  |:----------|:------|
215
- | Rate limit hit | `rateLimited('Congress.gov API rate limit reached (5,000 requests/hour).')` |
217
+ | Rate limit hit | `rateLimited(...)` with `rate_limited`, credential/shared-quota guidance and upstream `Retry-After` when supplied |
218
+ | Deadline or HTTP timeout | `Timeout` (-32004), `upstream_timeout`; HTTP responses retain status |
216
219
  | API unavailable (5xx) | `serviceUnavailable('Congress.gov API returned HTTP {status}.')` |
217
220
  | Entity not found (404) | `notFound('{entity} not found', { ...identifiers })` |
218
221
  | Invalid params | `validationError('...', { field })` |
@@ -327,11 +330,13 @@ When you complete a skill's checklist, check the boxes and add a completion time
327
330
 
328
331
  ---
329
332
 
333
+ **CI is one file.** `.github/workflows/codeql.yml` is the only GitHub Actions workflow. Verification — `devcheck`, tests, and release gates — runs locally; don't add a workflow that re-runs it.
334
+
330
335
  ## Bundling
331
336
 
332
337
  `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`framework-skills/`, `skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. MCPB is stdio-only — HTTP deployments are unaffected. The bundle file ships as `dist/congressgov-mcp-server.mcpb`.
333
338
 
334
- **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
339
+ **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"`, and an optional string option carries `"default": ""`. The host substitutes only the `user_config` reference; `"${X}"` reaches the server literally.
335
340
 
336
341
  ---
337
342
 
@@ -372,12 +377,13 @@ After a version bump and final commit, publish to both npm and GHCR:
372
377
  bun publish --access public
373
378
 
374
379
  docker buildx build --platform linux/amd64,linux/arm64 \
380
+ --build-arg APP_VERSION=<version> \
375
381
  -t ghcr.io/cyanheads/congressgov-mcp-server:<version> \
376
382
  -t ghcr.io/cyanheads/congressgov-mcp-server:latest \
377
383
  --push .
378
384
  ```
379
385
 
380
- Remind the user to run these after completing a release flow.
386
+ The `release-and-publish` run handles npm, MCP Registry, bundle, GitHub Release, and GHCR publishing.
381
387
 
382
388
  ---
383
389
 
package/Dockerfile CHANGED
@@ -9,7 +9,7 @@
9
9
  # multi-arch buildx run on an arm64 host. This stage only runs tsc and emits
10
10
  # architecture-independent JavaScript; the native deps stage cross-installs the
11
11
  # production tree, so both build-time Bun stages run on the host architecture.
12
- FROM --platform=$BUILDPLATFORM oven/bun:1.4.2 AS build
12
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.4 AS build
13
13
 
14
14
  WORKDIR /usr/src/app
15
15
 
@@ -45,7 +45,7 @@ RUN bun run build
45
45
  # A clean image rather than `FROM build`: the build stage's node_modules holds
46
46
  # devDependencies.
47
47
  # ==============================================================================
48
- FROM --platform=$BUILDPLATFORM oven/bun:1.4.2 AS deps
48
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.4 AS deps
49
49
 
50
50
  WORKDIR /usr/src/app
51
51
 
@@ -112,7 +112,7 @@ RUN rm -rf node_modules/@socketsecurity/bun-security-scanner
112
112
  # application. It uses a slim base image and only includes production
113
113
  # dependencies and build artifacts.
114
114
  # ==============================================================================
115
- FROM oven/bun:1.4.2-slim AS production
115
+ FROM oven/bun:1.4.4-slim AS production
116
116
 
117
117
  WORKDIR /usr/src/app
118
118
 
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.7.4-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-^2.2.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.4.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.8.1-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-^2.3.1-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.4.4-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -29,7 +29,7 @@
29
29
 
30
30
  ## Overview
31
31
 
32
- U.S. congressional data from the Congress.gov API v3 and the Senate's official vote feed: bills, enacted laws, members, committees, roll call votes, nominations, CRS and committee reports, and the Congressional Record. Browse legislative activity, read bill and report text, and follow the Senate confirmation pipeline from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
32
+ US congressional data from Congress.gov and the Senate's official vote feed: bills, enacted laws, members, committees, roll call votes, nominations, CRS and committee reports, and the Congressional Record. Browse legislative activity, read bill and report text, and follow nominations through Senate confirmation.
33
33
 
34
34
  ### Tools
35
35
 
@@ -71,8 +71,9 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
71
71
  ### `congressgov_bill_lookup` <sub>tool</sub>
72
72
 
73
73
  - `list` browses one `congress`, narrowed by `billType` and a `fromDateTime`/`toDateTime` range on the record's update date, newest first unless `order: 'oldest'`; `get`, `actions`, `amendments`, `cosponsors`, `committees`, `subjects`, `summaries`, `text`, `titles`, `related`, and `content` need `congress` + `billType` + `billNumber`
74
- - `content` reads the text version at `textVersionIndex` (0-based in `text` order, 0 is the most recent) and returns one character window in `content.text` with `totalCharacters`, `truncated`, and `nextOffset`
75
- - `summaries` takes an optional `versionCode` (`00` introduced, `49` public law) and applies the same page budget and row window as `congressgov_bill_summaries`, steered by `characterOffset`/`characterLimit`; a cut row carries `textTotalCharacters`, `textTruncated`, and `textNextOffset`
74
+ - `type` and `number` from a bill row are accepted as `billType` and `billNumber`; bill type codes are case-insensitive. Send one name per field, since canonical and alias keys together are rejected
75
+ - `content` reads the text version at `textVersionIndex` (0 is the most recent) and returns one character window in `content.text` with `totalCharacters`, `truncated`, and `nextOffset`
76
+ - `summaries` takes an optional `versionCode` (`00` introduced, `49` public law) and pages like `congressgov_bill_summaries`, using `characterOffset`/`characterLimit`
76
77
 
77
78
  ---
78
79
 
@@ -93,7 +94,7 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
93
94
  ### `congressgov_committee_lookup` <sub>tool</sub>
94
95
 
95
96
  - `committeeCode` is a chamber prefix (`h`/`s`/`j`), letters, and a 2-digit suffix (e.g. `hsju00`); `get`, `bills`, `reports`, and the Senate-only `nominations` infer `chamber` from the prefix
96
- - A committee name in `committeeCode` resolves when exactly one committee matches, and otherwise returns the candidate rows with a notice; `list` with `filter` name-matches every committee in scope, past the 250-row page cap, and fuzzy hits carry `approximate: true`
97
+ - A committee name in `committeeCode` resolves when exactly one committee matches, and otherwise returns candidate rows with a notice; `list` with `filter` name-matches every committee in scope, and fuzzy hits carry `approximate: true`
97
98
  - `bills` is newest first by default (`order`), and its rows carry no titles, so chain `congressgov_bill_lookup` `get` per row
98
99
 
99
100
  ---
@@ -124,6 +125,7 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
124
125
  ### `congressgov_crs_reports` <sub>tool</sub>
125
126
 
126
127
  - `list` browses the catalog; `get` takes a `reportNumber` such as `R40097`, `RL33612`, or `IF12345`
128
+ - `id`, `reportId`, and `report_id` are accepted as `reportNumber`; send only one identifier key
127
129
  - `get` returns authors, topics, summary, and download formats
128
130
 
129
131
  ---
@@ -204,34 +206,57 @@ Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): s
204
206
  Congress.gov-specific:
205
207
 
206
208
  - Type-safe client for the Congress.gov REST API v3, plus a client for the Senate's LIS XML feed that backs Senate roll votes
207
- - The Congress.gov API has no keyword search, so tools browse by congress, type, date range, chamber, state, and district, and address bills by `congress` + `billType` + `billNumber`, members by `bioguideId`, and committees by system code; list operations page with `limit` 1–250 (default 20) and `offset`
208
- - `content` on bill text, committee reports, and Record articles reads `format` `text` (default) or `xml` through a `characterOffset`/`characterLimit` window (1–100,000 characters, default 25,000), fetched only from `www.congress.gov` under a 25 MB ceiling and a 30s deadline
209
- - Optional API key from [api.data.gov](https://api.data.gov/signup/): `DEMO_KEY` allows 30 req/hr, your own key 5,000 req/hr
209
+ - The Congress.gov API has no keyword search, so tools browse by congress, type, date range, chamber, state, and district; list operations page with `limit` 1–250 (default 20) and `offset`
210
+ - `content` on bill text, committee reports, and Record articles reads `format` `text` (default) or `xml` in a `characterOffset`/`characterLimit` window (1–100,000 characters, default 25,000), fetched only from `www.congress.gov` under a 25 MB ceiling and a 30s deadline
211
+ - Optional API key from [api.data.gov](https://api.data.gov/signup/): `DEMO_KEY` allows 30 requests/hour and 50/day per IP, registered keys 5,000/hour
210
212
  - Opt-in local SQLite FTS5 mirror (`CONGRESS_MIRROR_ENABLED`) adds keyword search over bill titles and CRS summaries
211
213
 
212
214
  Agent-friendly output:
213
215
 
214
- - Every list response carries `effectiveQuery` and `totalCount`; a `notice` fires when nothing matched, and a page past the end says so in the rendered output
215
- - Exact character windows: `content` returns `offset`, `truncated`, and `nextOffset`, so walking a multi-megabyte bill never skips or repeats a character
216
- - Typed `content` failures (`document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, `offset_past_end`) alongside the shared `not_found`, `rate_limited`, `invalid_request`, and `upstream_error` reasons, each with a recovery hint
216
+ - Every list response carries `effectiveQuery` and `totalCount`, with a `notice` when nothing matched
217
+ - `list` rejects detail-only identifiers (`billNumber`, `voteNumber`, `nominationNumber`, `reportNumber`, `volumeNumber`) with an `incompatible_identity` error that names the operation to use instead
218
+ - `content` returns `offset`, `truncated`, and `nextOffset`, so walking a multi-megabyte bill never skips or repeats a character
219
+ - Typed failures (`document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, `offset_past_end`, `not_found`, `rate_limited`, `invalid_request`, `upstream_error`, `upstream_timeout`), each with a recovery hint
217
220
 
218
221
  ## Getting started
219
222
 
220
223
  ### Public Hosted Instance
221
224
 
222
- A public instance is available at `https://congressgov.caseyjhand.com/mcp` — no installation required. Point any MCP client at it via Streamable HTTP:
225
+ A public instance is available at `https://congressgov.caseyjhand.com/mcp` — no installation required. It serves Streamable HTTP; each client takes its own config shape.
226
+
227
+ For Claude Code:
228
+
229
+ ```sh
230
+ claude mcp add --transport http congressgov-mcp-server https://congressgov.caseyjhand.com/mcp
231
+ ```
232
+
233
+ For Cline (`cline_mcp_settings.json`):
223
234
 
224
235
  ```json
225
236
  {
226
237
  "mcpServers": {
227
238
  "congressgov-mcp-server": {
228
- "type": "streamable-http",
239
+ "type": "streamableHttp",
229
240
  "url": "https://congressgov.caseyjhand.com/mcp"
230
241
  }
231
242
  }
232
243
  }
233
244
  ```
234
245
 
246
+ For Cursor (`mcp.json`):
247
+
248
+ ```json
249
+ {
250
+ "mcpServers": {
251
+ "congressgov-mcp-server": {
252
+ "url": "https://congressgov.caseyjhand.com/mcp"
253
+ }
254
+ }
255
+ }
256
+ ```
257
+
258
+ Claude Desktop adds remote servers under Settings → Connectors.
259
+
235
260
  ### Self-Hosted / Local
236
261
 
237
262
  Add the following to your MCP client configuration file.
@@ -301,7 +326,7 @@ MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 CONGRESS_API_KEY=your-api-key bun run
301
326
  ### Prerequisites
302
327
 
303
328
  - [Bun v1.4.0](https://bun.sh/) or higher (or Node.js v24+).
304
- - Optional: a free [api.data.gov key](https://api.data.gov/signup/) raises the limit from 30 to 5,000 requests per hour.
329
+ - Optional: a free [api.data.gov key](https://api.data.gov/signup/) raises the limit to 5,000 requests/hour from the demo key's 30/hour and 50/day per IP.
305
330
 
306
331
  ### Installation
307
332
 
@@ -334,7 +359,7 @@ cp .env.example .env
334
359
 
335
360
  | Variable | Description | Default |
336
361
  |:---|:---|:---|
337
- | `CONGRESS_API_KEY` | API key from [api.data.gov](https://api.data.gov/signup/). `DEMO_KEY` allows 30 req/hr; your own key 5,000 req/hr. | `DEMO_KEY` |
362
+ | `CONGRESS_API_KEY` | API key from [api.data.gov](https://api.data.gov/signup/). | `DEMO_KEY` |
338
363
  | `CONGRESS_API_BASE_URL` | Congress.gov API base URL. | `https://api.congress.gov/v3` |
339
364
  | `CONGRESS_MIRROR_ENABLED` | Enable the local bill search mirror and the `congressgov_search_bills` tool. | `false` |
340
365
  | `CONGRESS_MIRROR_PATH` | Filesystem path to the SQLite mirror index. | `.mirror/bills.sqlite3` |
@@ -0,0 +1,25 @@
1
+ ---
2
+ summary: "Congress.gov identifier aliases, meaningful committee matches, and quota-aware errors."
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.8.0 — 2026-10-13
8
+
9
+ ## Changed
10
+
11
+ - **Document and summary bounds** now return `ValidationError` (-32007) for `document_too_large` and `offset_past_end`, replacing `InvalidParams` (-32602). Consumers matching numeric codes must migrate; malformed arguments still use -32602. ([#74](https://github.com/cyanheads/congressgov-mcp-server/issues/74))
12
+ - **List operations** reject entity identities they formerly ignored with `incompatible_identity` and compatible-operation guidance; remove the identity to browse or select the detail operation. ([#68](https://github.com/cyanheads/congressgov-mcp-server/issues/68))
13
+ - **Bill inputs** accept `type`/`number`, case-insensitive bill types, and any-case `relatedbills`; **CRS inputs** accept `id`, `reportId`, and `report_id`. Alias collisions reject; advertised canonical input schemas stay unchanged. ([#79](https://github.com/cyanheads/congressgov-mcp-server/issues/79), [#81](https://github.com/cyanheads/congressgov-mcp-server/issues/81))
14
+ - **Development tooling** pins Bun 1.4.2 → 1.4.3 in package-manager and Docker surfaces, synchronizes framework skills, and corrects the MCP SDK documentation baseline to the already-installed 2.3.1.
15
+
16
+ ## Fixed
17
+
18
+ - **Committee typo matching** requires every query token to qualify and ranks ties deterministically before pagination; unrelated candidates disappear, and capped suggestions may contain different tied rows. ([#69](https://github.com/cyanheads/congressgov-mcp-server/issues/69))
19
+ - **Quota protection** reserves failed, retried, and concurrent attempts before dispatch, honors upstream hourly bounds, and applies demo 30/hour plus 50/day and registered 5,000/hour fallbacks. Recovery retains `Retry-After` and distinguishes local accounting from shared quotas. ([#71](https://github.com/cyanheads/congressgov-mcp-server/issues/71))
20
+ - **Request deadlines and HTTP timeouts** return `upstream_timeout` with recovery and retry metadata; HTTP timeout responses retain their status, and cancellation remains cancellation. ([#78](https://github.com/cyanheads/congressgov-mcp-server/issues/78))
21
+
22
+ ## Dependencies
23
+
24
+ - **@cyanheads/mcp-ts-core** ^0.13.14 → ^0.13.15.
25
+ - **@types/node** ^26.6.4 → ^26.6.5.
@@ -0,0 +1,28 @@
1
+ ---
2
+ summary: "Framework errors preserve Markdown-bearing text, startup failures identify invalid configuration, and dependencies and maintenance tooling are refreshed."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.8.1 — 2026-10-25
8
+
9
+ ## Changed
10
+
11
+ - **Framework error rendering** escapes Markdown-bearing messages and recovery hints in `content[]`, preserving the original structured values.
12
+ - **Framework configuration failures** identify the environment variable and schema path at startup.
13
+ - **Maintenance tooling and references** sync with the framework, including audit attribution by the installed root version, configuration examples, and framework API guidance.
14
+ - **Hosted client examples** give separate Claude Code, Cline, Cursor, and Claude Desktop connection instructions.
15
+
16
+ ## Fixed
17
+
18
+ - **Large-document tests** verify each complete-document window independently, preserving exact text and continuation assertions without extending deadlines.
19
+
20
+ ## Dependencies
21
+
22
+ - `@cyanheads/mcp-ts-core` ^0.13.15 → ^0.13.16.
23
+ - `zod` ^4.6.5 → ^4.6.7.
24
+ - `@biomejs/biome` ^2.5.15 → ^2.6.2.
25
+ - `ignore` ^7.0.12 → ^7.0.13.
26
+ - `tsc-alias` ^1.9.7 → ^1.9.8.
27
+ - `vitest` ^5.0.3 → ^5.0.5.
28
+ - Bun 1.4.3 → 1.4.4 (`packageManager`, Docker stages, and README badge).
@@ -36,7 +36,7 @@ const ServerConfigSchema = z.object({
36
36
  apiKey: z
37
37
  .string()
38
38
  .default('DEMO_KEY')
39
- .describe('Congress.gov API key from api.data.gov — optional (DEMO_KEY: 30 req/hr, own key: 5000 req/hr)'),
39
+ .describe('Congress.gov API key from api.data.gov — optional (fallbacks: DEMO_KEY 30/hour and 50/day per IP, registered key 5000/hour; upstream hourly quota headers take precedence)'),
40
40
  baseUrl: z
41
41
  .string()
42
42
  .url()
@@ -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,qBAAqB,CAAC,IAAI,GAAS,IAAI,IAAI,EAAE;IAC3D,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;GAMG;AACH,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACrD,OAAO,KAAK;aACT,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;aACzC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,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tB,CAAC"}
@@ -8,7 +8,7 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
8
8
  text: "text";
9
9
  xml: "xml";
10
10
  }>>;
11
- operation: z.ZodEnum<{
11
+ operation: z.ZodPreprocess<z.ZodEnum<{
12
12
  actions: "actions";
13
13
  amendments: "amendments";
14
14
  committees: "committees";
@@ -21,9 +21,9 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
21
21
  summaries: "summaries";
22
22
  text: "text";
23
23
  titles: "titles";
24
- }>;
24
+ }>, unknown>;
25
25
  congress: z.ZodNumber;
26
- billType: z.ZodOptional<z.ZodEnum<{
26
+ billType: z.ZodOptional<z.ZodPreprocess<z.ZodEnum<{
27
27
  hconres: "hconres";
28
28
  hjres: "hjres";
29
29
  hr: "hr";
@@ -32,7 +32,7 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
32
32
  sconres: "sconres";
33
33
  sjres: "sjres";
34
34
  sres: "sres";
35
- }>>;
35
+ }>, unknown>>;
36
36
  billNumber: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
37
37
  fromDateTime: z.ZodOptional<z.ZodString>;
38
38
  toDateTime: z.ZodOptional<z.ZodString>;
@@ -66,8 +66,8 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
66
66
  readonly reason: 'rate_limited';
67
67
  readonly thrownBy: 'service';
68
68
  readonly retryable: true;
69
- readonly when: 'The Congress.gov API rate limit (5,000 requests/hour per key) was exceeded.';
70
- readonly recovery: 'Wait for the hourly rate-limit window to reset before retrying, or reduce the request frequency.';
69
+ readonly when: 'A process-local attempt budget or the shared upstream credential/IP quota was reached; upstream hourly limits vary and DEMO_KEY also has a daily quota.';
70
+ readonly recovery: 'Follow Retry-After when supplied; otherwise wait and reduce request frequency. This process cannot account for other clients sharing the key or demo IP.';
71
71
  }, {
72
72
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
73
73
  readonly reason: 'invalid_request';
@@ -82,6 +82,13 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
82
82
  readonly retryable: true;
83
83
  readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
84
84
  readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
85
+ }, {
86
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Timeout;
87
+ readonly reason: 'upstream_timeout';
88
+ readonly thrownBy: 'service';
89
+ readonly retryable: true;
90
+ readonly when: 'The Congress.gov request deadline expired or the upstream returned an HTTP timeout response.';
91
+ readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
85
92
  }, {
86
93
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
87
94
  readonly reason: 'document_unavailable';
@@ -102,19 +109,25 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
102
109
  readonly when: 'www.congress.gov did not return a readable document — a non-2xx status, a network failure, an empty body, or a content type that is not text or XML.';
103
110
  readonly recovery: 'Retry after a short delay; if the failure persists, request a different format or read the document at the sourceUrl the text operation returns.';
104
111
  }, {
105
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
112
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
106
113
  readonly reason: 'document_too_large';
107
114
  readonly thrownBy: 'service';
108
115
  readonly retryable: false;
109
116
  readonly when: 'The document is larger than the byte ceiling this server retrieves, so no character window can be served from it.';
110
117
  readonly recovery: 'Read the document at the sourceUrl the text operation returns. A document this size clears the ceiling in every format it publishes, so switching format reaches the same limit.';
111
118
  }, {
112
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
119
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
113
120
  readonly reason: 'offset_past_end';
114
121
  readonly thrownBy: 'service';
115
122
  readonly retryable: false;
116
123
  readonly when: "characterOffset is at or beyond the last character of every text the call would window — the document on 'content', or every returned row's summary text on 'summaries' — so the window would be empty.";
117
124
  readonly recovery: "Restart the walk at characterOffset 0 and follow the response's nextOffset (or a summary row's textNextOffset), which goes null once the text has been read to the end.";
125
+ }, {
126
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
127
+ readonly reason: 'incompatible_identity';
128
+ readonly retryable: false;
129
+ readonly when: 'A list operation carries an entity identifier that only a detail operation uses.';
130
+ readonly recovery: 'Remove the named identity field to browse, or select the compatible operation named in the error and supply its required identifiers.';
118
131
  }], {
119
132
  effectiveQuery: z.ZodString;
120
133
  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;AAqDjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoWzB,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;AA6DjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4WzB,CAAC"}
@@ -6,13 +6,13 @@ import { tool, z } from '@cyanheads/mcp-ts-core';
6
6
  import { validationError } from '@cyanheads/mcp-ts-core/errors';
7
7
  import { formatBills } from '../format-helpers.js';
8
8
  import { summaryContinuationCall, summaryWindowNotice, windowSummaryPage, } from '../summary-window.js';
9
- import { buildEffectiveQuery, congressErrorContracts, documentErrorContracts, documentWindowInput, listEnrichment, listOrDetail, MAX_CONTENT_CHARACTERS, normalizeOptionalString, notifyIfNoMatches, numericIdentifier, toIdentifierNumber, validateDateTimeRange, validateIsoDateTime, } from '../tool-helpers.js';
9
+ import { buildEffectiveQuery, congressErrorContracts, documentErrorContracts, documentWindowInput, identityErrorContracts, listEnrichment, listOrDetail, MAX_CONTENT_CHARACTERS, normalizeOptionalString, notifyIfNoMatches, numericIdentifier, toIdentifierNumber, validateDateTimeRange, validateIsoDateTime, } from '../tool-helpers.js';
10
10
  import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
11
11
  import { BILL_TYPE_CODES } from '../../../services/congress-api/types.js';
12
12
  import { getCongressDocuments } from '../../../services/congress-documents/congress-documents-service.js';
13
13
  import { describeFormat, selectDocumentUrl, } from '../../../services/congress-documents/document-formats.js';
14
- const BillTypeEnum = z.enum(BILL_TYPE_CODES);
15
- const OperationEnum = z.enum([
14
+ const BillTypeEnum = z.preprocess((value) => (typeof value === 'string' ? value.toLowerCase() : value), z.enum(BILL_TYPE_CODES));
15
+ const OperationEnum = z.preprocess((value) => typeof value === 'string' && value.toLowerCase() === 'relatedbills' ? 'related' : value, z.enum([
16
16
  'list',
17
17
  'get',
18
18
  'actions',
@@ -25,7 +25,7 @@ const OperationEnum = z.enum([
25
25
  'titles',
26
26
  'related',
27
27
  'content',
28
- ]);
28
+ ]));
29
29
  const SUB_RESOURCE_MAP = {
30
30
  related: 'relatedbills',
31
31
  };
@@ -33,7 +33,8 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
33
33
  title: 'Congress.gov Bill Lookup',
34
34
  description: `Browse and retrieve U.S. legislative bill data from Congress.gov. Discover bills by filtering on congress, bill type, and date range — there is no keyword search. Use 'list' to browse (requires congress, defaults to most-recently-updated first), 'get' for full bill detail (sponsor, policy area, CBO estimates, law info), or drill into a specific bill with 'actions', 'amendments', 'cosponsors', 'committees', 'subjects', 'summaries', 'text', 'titles', or 'related' (each requires congress + billType + billNumber). 'text' lists the published versions and their format URLs; 'content' then reads one version's actual text, a bounded character window at a time. 'summaries' takes an optional versionCode selector and returns each row's text a bounded character window at a time — a row past the window carries textTotalCharacters/textTruncated/textNextOffset, and characterOffset reads on from there.`,
35
35
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
36
- errors: [...congressErrorContracts, ...documentErrorContracts],
36
+ errors: [...congressErrorContracts, ...documentErrorContracts, ...identityErrorContracts],
37
+ inputAliases: { type: 'billType', number: 'billNumber' },
37
38
  input: z.object({
38
39
  operation: OperationEnum.describe('Which data to retrieve.'),
39
40
  congress: z.number().int().positive().describe('Congress number (e.g., 118, 119).'),
@@ -76,6 +77,9 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
76
77
  const toDateTime = validateIsoDateTime(normalizeOptionalString(input.toDateTime), 'toDateTime');
77
78
  validateDateTimeRange(fromDateTime, toDateTime);
78
79
  if (input.operation === 'list') {
80
+ if (input.billNumber !== undefined) {
81
+ throw ctx.fail('incompatible_identity', "'list' does not use billNumber. Remove billNumber to browse, or use 'get' with congress, billType, and billNumber.", { field: 'billNumber', operation: input.operation });
82
+ }
79
83
  const result = await api.listBills({
80
84
  congress: input.congress,
81
85
  billType: input.billType,
@@ -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,sCAA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