@cyanheads/congressgov-mcp-server 0.7.4 → 0.8.0
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.
- package/AGENTS.md +10 -7
- package/CLAUDE.md +10 -7
- package/Dockerfile +3 -3
- package/README.md +9 -5
- package/changelog/0.8.x/0.8.0.md +25 -0
- package/dist/config/server-config.js +1 -1
- package/dist/config/server-config.js.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts +21 -8
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.js +9 -5
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts +9 -2
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.d.ts +9 -2
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.js +12 -15
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts +17 -4
- package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-reports.tool.js +5 -2
- package/dist/mcp-server/tools/definitions/committee-reports.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts +15 -2
- package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/crs-reports.tool.js +6 -2
- package/dist/mcp-server/tools/definitions/crs-reports.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts +17 -4
- package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/daily-record.tool.js +5 -2
- package/dist/mcp-server/tools/definitions/daily-record.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/enacted-laws.tool.d.ts +9 -2
- package/dist/mcp-server/tools/definitions/enacted-laws.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts +9 -2
- package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts +15 -2
- package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/roll-votes.tool.js +5 -2
- package/dist/mcp-server/tools/definitions/roll-votes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.d.ts +15 -2
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.js +5 -2
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.js.map +1 -1
- package/dist/mcp-server/tools/tool-helpers.d.ts +20 -5
- package/dist/mcp-server/tools/tool-helpers.d.ts.map +1 -1
- package/dist/mcp-server/tools/tool-helpers.js +23 -5
- package/dist/mcp-server/tools/tool-helpers.js.map +1 -1
- package/dist/services/congress-api/congress-api-service.d.ts +8 -3
- package/dist/services/congress-api/congress-api-service.d.ts.map +1 -1
- package/dist/services/congress-api/congress-api-service.js +83 -18
- package/dist/services/congress-api/congress-api-service.js.map +1 -1
- package/dist/services/congress-documents/congress-documents-service.js +3 -3
- package/dist/services/congress-documents/congress-documents-service.js.map +1 -1
- package/package.json +4 -4
- package/server.json +5 -5
package/AGENTS.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** congressgov-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
4
|
+
**Version:** 0.8.0
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
|
-
**MCP SDK:** `@modelcontextprotocol/server` ^2.
|
|
7
|
+
**MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
|
|
8
8
|
**Zod:** ^4.6.5
|
|
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.
|
|
@@ -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.
|
|
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
|
|
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(
|
|
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 })` |
|
|
@@ -377,7 +380,7 @@ docker buildx build --platform linux/amd64,linux/arm64 \
|
|
|
377
380
|
--push .
|
|
378
381
|
```
|
|
379
382
|
|
|
380
|
-
|
|
383
|
+
The `release-and-publish` run handles npm, MCP Registry, bundle, GitHub Release, and GHCR publishing.
|
|
381
384
|
|
|
382
385
|
---
|
|
383
386
|
|
package/CLAUDE.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** congressgov-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.
|
|
4
|
+
**Version:** 0.8.0
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
|
-
**MCP SDK:** `@modelcontextprotocol/server` ^2.
|
|
7
|
+
**MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
|
|
8
8
|
**Zod:** ^4.6.5
|
|
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.
|
|
@@ -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.
|
|
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
|
|
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(
|
|
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 })` |
|
|
@@ -377,7 +380,7 @@ docker buildx build --platform linux/amd64,linux/arm64 \
|
|
|
377
380
|
--push .
|
|
378
381
|
```
|
|
379
382
|
|
|
380
|
-
|
|
383
|
+
The `release-and-publish` run handles npm, MCP Registry, bundle, GitHub Release, and GHCR publishing.
|
|
381
384
|
|
|
382
385
|
---
|
|
383
386
|
|
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.
|
|
12
|
+
FROM --platform=$BUILDPLATFORM oven/bun:1.4.3 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.
|
|
48
|
+
FROM --platform=$BUILDPLATFORM oven/bun:1.4.3 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.
|
|
115
|
+
FROM oven/bun:1.4.3-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
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/congressgov-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/congressgov-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -71,6 +71,7 @@ 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
|
+
- Copied bill-row keys `type` and `number` are accepted as `billType` and `billNumber`; bill type codes are case-insensitive, and `relatedbills` (any case) selects `related`. Send one name per field: canonical and alias keys together are rejected.
|
|
74
75
|
- `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
76
|
- `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`
|
|
76
77
|
|
|
@@ -94,6 +95,7 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
|
|
|
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
97
|
- 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`
|
|
98
|
+
- Exact matches require every query token; typo matches require each token to match a name token at the similarity floor. Blank filters browse normally; unrelated tokens return no matches.
|
|
97
99
|
- `bills` is newest first by default (`order`), and its rows carry no titles, so chain `congressgov_bill_lookup` `get` per row
|
|
98
100
|
|
|
99
101
|
---
|
|
@@ -124,6 +126,7 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
|
|
|
124
126
|
### `congressgov_crs_reports` <sub>tool</sub>
|
|
125
127
|
|
|
126
128
|
- `list` browses the catalog; `get` takes a `reportNumber` such as `R40097`, `RL33612`, or `IF12345`
|
|
129
|
+
- `id`, `reportId`, and `report_id` are accepted as `reportNumber`. Send only one identifier key; canonical and alias keys together, or multiple aliases, are rejected.
|
|
127
130
|
- `get` returns authors, topics, summary, and download formats
|
|
128
131
|
|
|
129
132
|
---
|
|
@@ -206,14 +209,15 @@ Congress.gov-specific:
|
|
|
206
209
|
- 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
210
|
- 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
211
|
- `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`
|
|
212
|
+
- Optional API key from [api.data.gov](https://api.data.gov/signup/): documented fallbacks are `DEMO_KEY` 30 requests/hour and 50/day per IP, registered keys 5,000/hour. Valid upstream hourly quota headers override the fallback; actual quotas vary
|
|
210
213
|
- Opt-in local SQLite FTS5 mirror (`CONGRESS_MIRROR_ENABLED`) adds keyword search over bill titles and CRS summaries
|
|
211
214
|
|
|
212
215
|
Agent-friendly output:
|
|
213
216
|
|
|
214
217
|
- 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
|
|
218
|
+
- `list` rejects entity identities it would discard: bill `billNumber`, vote `voteNumber`, nomination `nominationNumber`, CRS/committee `reportNumber`, and Record `volumeNumber`. The `incompatible_identity` domain error names the detail operation to select or the field to remove; pagination and defaulted selectors remain accepted.
|
|
215
219
|
- 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 `
|
|
220
|
+
- 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`, `upstream_error`, and `upstream_timeout` reasons, each with a recovery hint. Document byte ceilings and exhausted document/summary offsets use domain validation (-32007); malformed arguments remain protocol invalid parameters (-32602)
|
|
217
221
|
|
|
218
222
|
## Getting started
|
|
219
223
|
|
|
@@ -301,7 +305,7 @@ MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 CONGRESS_API_KEY=your-api-key bun run
|
|
|
301
305
|
### Prerequisites
|
|
302
306
|
|
|
303
307
|
- [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/)
|
|
308
|
+
- Optional: a free [api.data.gov key](https://api.data.gov/signup/) uses a documented fallback of 5,000 requests/hour instead of the demo fallback of 30/hour and 50/day per IP. Upstream hourly headers may advertise a different quota.
|
|
305
309
|
|
|
306
310
|
### Installation
|
|
307
311
|
|
|
@@ -334,7 +338,7 @@ cp .env.example .env
|
|
|
334
338
|
|
|
335
339
|
| Variable | Description | Default |
|
|
336
340
|
|:---|:---|:---|
|
|
337
|
-
| `CONGRESS_API_KEY` | API key from [api.data.gov](https://api.data.gov/signup/). `DEMO_KEY`
|
|
341
|
+
| `CONGRESS_API_KEY` | API key from [api.data.gov](https://api.data.gov/signup/). Fallbacks: `DEMO_KEY` 30/hour and 50/day per IP; registered key 5,000/hour. Upstream hourly quota headers take precedence. | `DEMO_KEY` |
|
|
338
342
|
| `CONGRESS_API_BASE_URL` | Congress.gov API base URL. | `https://api.congress.gov/v3` |
|
|
339
343
|
| `CONGRESS_MIRROR_ENABLED` | Enable the local bill search mirror and the `congressgov_search_bills` tool. | `false` |
|
|
340
344
|
| `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.
|
|
@@ -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 (
|
|
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,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G;IACH,UAAU,EAAE,CAAC;SACV,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACxE,QAAQ,CAAC,uEAAuE,CAAC;CACrF,CAAC,CAAC;AAIH,IAAI,OAAiC,CAAC;AAEtC,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,MAAM,EAAE,kBAAkB;QAC1B,OAAO,EAAE,uBAAuB;QAChC,aAAa,EAAE,yBAAyB;QACxC,UAAU,EAAE,sBAAsB;QAClC,iBAAiB,EAAE,8BAA8B;QACjD,UAAU,EAAE,4BAA4B;KACzC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,iBAAiB;IAC/B,OAAO,GAAG,SAAS,CAAC;AACtB,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: '
|
|
70
|
-
readonly recovery: '
|
|
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.
|
|
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.
|
|
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;
|
|
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,sC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AA8B;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"}
|
|
@@ -37,8 +37,8 @@ export declare const billSummariesTool: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
37
37
|
readonly reason: 'rate_limited';
|
|
38
38
|
readonly thrownBy: 'service';
|
|
39
39
|
readonly retryable: true;
|
|
40
|
-
readonly when: '
|
|
41
|
-
readonly recovery: '
|
|
40
|
+
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.';
|
|
41
|
+
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.';
|
|
42
42
|
}, {
|
|
43
43
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
|
|
44
44
|
readonly reason: 'invalid_request';
|
|
@@ -53,6 +53,13 @@ export declare const billSummariesTool: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
53
53
|
readonly retryable: true;
|
|
54
54
|
readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
|
|
55
55
|
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
56
|
+
}, {
|
|
57
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Timeout;
|
|
58
|
+
readonly reason: 'upstream_timeout';
|
|
59
|
+
readonly thrownBy: 'service';
|
|
60
|
+
readonly retryable: true;
|
|
61
|
+
readonly when: 'The Congress.gov request deadline expired or the upstream returned an HTTP timeout response.';
|
|
62
|
+
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
56
63
|
}], {
|
|
57
64
|
effectiveQuery: z.ZodString;
|
|
58
65
|
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;AAwBjD,eAAO,MAAM,iBAAiB
|
|
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;AAwBjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmH5B,CAAC"}
|
|
@@ -44,8 +44,8 @@ export declare const committeeLookupTool: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
44
44
|
readonly reason: 'rate_limited';
|
|
45
45
|
readonly thrownBy: 'service';
|
|
46
46
|
readonly retryable: true;
|
|
47
|
-
readonly when: '
|
|
48
|
-
readonly recovery: '
|
|
47
|
+
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.';
|
|
48
|
+
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.';
|
|
49
49
|
}, {
|
|
50
50
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
|
|
51
51
|
readonly reason: 'invalid_request';
|
|
@@ -60,6 +60,13 @@ export declare const committeeLookupTool: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
60
60
|
readonly retryable: true;
|
|
61
61
|
readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
|
|
62
62
|
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
63
|
+
}, {
|
|
64
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Timeout;
|
|
65
|
+
readonly reason: 'upstream_timeout';
|
|
66
|
+
readonly thrownBy: 'service';
|
|
67
|
+
readonly retryable: true;
|
|
68
|
+
readonly when: 'The Congress.gov request deadline expired or the upstream returned an HTTP timeout response.';
|
|
69
|
+
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
63
70
|
}], {
|
|
64
71
|
effectiveQuery: z.ZodString;
|
|
65
72
|
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;
|
|
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;AAgHjD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8N9B,CAAC"}
|
|
@@ -42,10 +42,9 @@ const FUZZY_MAX_RESULTS = 5;
|
|
|
42
42
|
/**
|
|
43
43
|
* Filter a committee list by name using a two-pass strategy:
|
|
44
44
|
* 1. Primary: every token in `filter` appears in the normalized committee name.
|
|
45
|
-
* 2. Fuzzy fallback (only when primary is empty):
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* `approximate: true`.
|
|
45
|
+
* 2. Fuzzy fallback (only when primary is empty): each query token must meet the
|
|
46
|
+
* bigram-Dice floor against a name token. Rank by mean token similarity, then
|
|
47
|
+
* normalized name and system code, keeping at most five approximate matches.
|
|
49
48
|
*
|
|
50
49
|
* Never throws — no match returns an empty array.
|
|
51
50
|
*/
|
|
@@ -61,21 +60,19 @@ function filterCommittees(items, filter) {
|
|
|
61
60
|
});
|
|
62
61
|
if (primary.length > 0)
|
|
63
62
|
return primary;
|
|
64
|
-
|
|
65
|
-
// the whole name — long committee names share common bigrams with the query and
|
|
66
|
-
// would otherwise rank as spurious "approximate" matches. Keep the top few.
|
|
67
|
-
const filterBigrams = bigrams(normFilter);
|
|
63
|
+
const queryBigrams = tokens.map(bigrams);
|
|
68
64
|
const scored = items
|
|
69
65
|
.map((item) => {
|
|
70
66
|
const name = typeof item.name === 'string' ? normalizeForMatch(item.name) : '';
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
67
|
+
const nameBigrams = name.split(' ').filter(Boolean).map(bigrams);
|
|
68
|
+
const tokenScores = queryBigrams.map((query) => Math.max(0, ...nameBigrams.map((candidate) => diceCoeff(query, candidate))));
|
|
69
|
+
const qualifies = tokenScores.every((score) => score >= FUZZY_THRESHOLD);
|
|
70
|
+
const score = tokenScores.reduce((sum, value) => sum + value, 0) / tokenScores.length;
|
|
71
|
+
const code = typeof item.systemCode === 'string' ? item.systemCode : '';
|
|
72
|
+
return { item, name, code, score, qualifies };
|
|
76
73
|
})
|
|
77
|
-
.filter(({
|
|
78
|
-
.sort((a, b) => b.score - a.score)
|
|
74
|
+
.filter(({ qualifies }) => qualifies)
|
|
75
|
+
.sort((a, b) => b.score - a.score || a.name.localeCompare(b.name) || a.code.localeCompare(b.code))
|
|
79
76
|
.slice(0, FUZZY_MAX_RESULTS);
|
|
80
77
|
return scored.map(({ item }) => ({ ...item, approximate: true }));
|
|
81
78
|
}
|