@cyanheads/congressgov-mcp-server 0.7.1 → 0.7.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.
- package/AGENTS.md +10 -5
- package/CLAUDE.md +10 -5
- package/README.md +8 -3
- package/changelog/0.7.x/0.7.2.md +20 -0
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts +5 -4
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.js +93 -2
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.js +32 -4
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts +2 -2
- package/dist/mcp-server/tools/format-helpers.d.ts.map +1 -1
- package/dist/mcp-server/tools/format-helpers.js +85 -30
- package/dist/mcp-server/tools/format-helpers.js.map +1 -1
- package/dist/mcp-server/tools/summary-window.d.ts +112 -0
- package/dist/mcp-server/tools/summary-window.d.ts.map +1 -0
- package/dist/mcp-server/tools/summary-window.js +182 -0
- package/dist/mcp-server/tools/summary-window.js.map +1 -0
- package/dist/mcp-server/tools/tool-helpers.d.ts +19 -2
- package/dist/mcp-server/tools/tool-helpers.d.ts.map +1 -1
- package/dist/mcp-server/tools/tool-helpers.js +19 -2
- package/dist/mcp-server/tools/tool-helpers.js.map +1 -1
- package/dist/services/congress-documents/extract-text-stream.js +1 -1
- package/dist/services/congress-documents/extract-text-stream.js.map +1 -1
- package/dist/services/congress-documents/extract-text.d.ts +0 -6
- package/dist/services/congress-documents/extract-text.d.ts.map +1 -1
- package/dist/services/congress-documents/extract-text.js +4 -37
- package/dist/services/congress-documents/extract-text.js.map +1 -1
- package/dist/services/congress-mirror/normalize.d.ts +4 -1
- package/dist/services/congress-mirror/normalize.d.ts.map +1 -1
- package/dist/services/congress-mirror/normalize.js +8 -12
- package/dist/services/congress-mirror/normalize.js.map +1 -1
- package/dist/services/senate-lis/parse.d.ts.map +1 -1
- package/dist/services/senate-lis/parse.js +74 -2
- package/dist/services/senate-lis/parse.js.map +1 -1
- package/dist/services/senate-lis/types.d.ts +8 -1
- package/dist/services/senate-lis/types.d.ts.map +1 -1
- package/dist/utils/character-references.d.ts +27 -0
- package/dist/utils/character-references.d.ts.map +1 -0
- package/dist/utils/character-references.js +60 -0
- package/dist/utils/character-references.js.map +1 -0
- package/package.json +2 -2
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** congressgov-mcp-server
|
|
4
|
-
**Version:** 0.7.
|
|
4
|
+
**Version:** 0.7.2
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` + `@modelcontextprotocol/client` ^2.0.0
|
|
@@ -68,18 +68,20 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
|
|
|
68
68
|
|
|
69
69
|
| Name | Description |
|
|
70
70
|
|:-----|:------------|
|
|
71
|
-
| `congressgov_bill_lookup` | Browse, filter, and retrieve bill data (actions, sponsors, summaries, text, related bills) + bounded document text via `content` |
|
|
71
|
+
| `congressgov_bill_lookup` | Browse, filter, and retrieve bill data (actions, sponsors, summaries, text, related bills) + bounded document text via `content`; `summaries` takes `versionCode` and the shared `characterOffset`/`characterLimit` window |
|
|
72
72
|
| `congressgov_enacted_laws` | Browse enacted public and private laws by congress |
|
|
73
73
|
| `congressgov_member_lookup` | Discover members by state/district/congress, retrieve legislative portfolios |
|
|
74
74
|
| `congressgov_committee_lookup` | Browse committees and retrieve legislation, reports, nominations |
|
|
75
75
|
| `congressgov_roll_votes` | Retrieve House and Senate roll call votes and member voting positions |
|
|
76
76
|
| `congressgov_senate_nominations` | Browse presidential nominations, track Senate confirmation pipeline |
|
|
77
|
-
| `congressgov_bill_summaries` | Browse recent CRS bill summaries — the "what's happening" feed |
|
|
77
|
+
| `congressgov_bill_summaries` | Browse recent CRS bill summaries — the "what's happening" feed, bounded by the shared summary page budget and per-row text window |
|
|
78
78
|
| `congressgov_crs_reports` | Browse and retrieve nonpartisan CRS policy analysis reports |
|
|
79
79
|
| `congressgov_committee_reports` | Browse and retrieve committee reports accompanying legislation + bounded report text via `content` |
|
|
80
80
|
| `congressgov_daily_record` | Browse daily Congressional Record — floor speeches, debates, proceedings + bounded article text via `content` |
|
|
81
81
|
| `congressgov_search_bills` | Keyword-search bill titles/summaries via the opt-in local FTS mirror — off by default |
|
|
82
82
|
|
|
83
|
+
**Summary bounding** (`src/mcp-server/tools/summary-window.ts`, constants in `tool-helpers.ts`). Both summary surfaces enforce two limits. `SUMMARY_PAGE_CHARACTERS` stops a page once its serialized rows reach the budget — the first row always returns, `pagination.nextOffset` counts the rows actually returned, and an enrichment notice discloses the stop. `DEFAULT_SUMMARY_TEXT_CHARACTERS` bounds one row's upstream `text`; a windowed row gains `textTotalCharacters` / `textTruncated` / `textNextOffset`, and its window end is retracted off any HTML tag or character reference it would otherwise split (unless the construct is wider than the whole window, where the requested limit wins). A row inside both limits is returned untouched, so an unbounded page stays byte-identical. `congressgov_bill_lookup` `summaries` overrides the row window with `characterOffset`/`characterLimit` and selects one version with `versionCode` — Congress.gov publishes no version filter, so selection reads the bill's whole summary list and matches client-side.
|
|
84
|
+
|
|
83
85
|
### Resources (5)
|
|
84
86
|
|
|
85
87
|
| URI Template | Description |
|
|
@@ -114,6 +116,7 @@ src/
|
|
|
114
116
|
congress-documents-service.ts # www.congress.gov document fetch — host allowlist, byte ceiling, character window
|
|
115
117
|
document-formats.ts # Format label → URL resolution over upstream format lists
|
|
116
118
|
extract-text.ts # GPO `<pre>` / XML body → deterministic plain text
|
|
119
|
+
extract-text-stream.ts # Incremental twin of extract-text.ts — one character window, constant memory
|
|
117
120
|
types.ts # Document format + content window types
|
|
118
121
|
congress-mirror/
|
|
119
122
|
congress-mirror-service.ts # Mirror read path — FTS5 search, ready(), sync accessor
|
|
@@ -147,6 +150,8 @@ src/
|
|
|
147
150
|
prompts/definitions/
|
|
148
151
|
bill-analysis.prompt.ts # congressgov_bill_analysis
|
|
149
152
|
legislative-research.prompt.ts # congressgov_legislative_research
|
|
153
|
+
utils/
|
|
154
|
+
character-references.ts # Single-pass HTML/XML character-reference decoding
|
|
150
155
|
scripts/
|
|
151
156
|
_mirror-context.ts # Shared bootstrap for the mirror lifecycle CLI scripts
|
|
152
157
|
congress-mirror-init.ts # mirror:init — full out-of-band mirror build
|
|
@@ -179,7 +184,7 @@ Four services. `CongressApiService` backs nine tools and the House branch of `co
|
|
|
179
184
|
- The fetch is bounded: a 25 MB ceiling (refused on `Content-Length`, else mid-stream), a 30s deadline, and a content-type allowlist
|
|
180
185
|
- The body is extracted as it streams and only the requested window is retained, so a read's live set is flat in the size of the document (transient allocation is not — peak RSS runs above a buffered read); the ceiling bounds how long a response may run, not how much of one fits in a buffer
|
|
181
186
|
- The structured response is bounded by an exact character window — `structuredContent.content.text` and its offsets index the extracted plain text and are never snapped to section breaks, so feeding `nextOffset` back walks a document with no overlap and no gap; `content[]` wraps that unchanged window in a dynamically safe Markdown fence for presentation
|
|
182
|
-
- `extract-text.ts` unwraps GPO's `<pre>` print output verbatim (whitespace is the document's structure), while no-`<pre>` XML gains one space only at an otherwise-unseparated sibling close→open element boundary; both readings decode
|
|
187
|
+
- `extract-text.ts` unwraps GPO's `<pre>` print output verbatim (whitespace is the document's structure), while no-`<pre>` XML gains one space only at an otherwise-unseparated sibling close→open element boundary; both readings decode character references through `src/utils/character-references.ts` — the one decoder every HTML/XML → text path in the server shares, single-pass so an escaped reference stays escaped — and `extract-text-stream.ts` is their incremental twin, pinned byte-for-byte against the whole-string extractor
|
|
183
188
|
|
|
184
189
|
**`CongressMirrorService`** — local SQLite FTS5 mirror of bill title + CRS summary text, backing `congressgov_search_bills` only:
|
|
185
190
|
- Opt-in via `CONGRESS_MIRROR_ENABLED` (off by default); built out-of-band via the `mirror:init`/`mirror:refresh` scripts, never on server startup
|
|
@@ -212,7 +217,7 @@ All tools share these patterns. The service layer handles them uniformly:
|
|
|
212
217
|
| Invalid params | `validationError('...', { field })` |
|
|
213
218
|
| Network error | `serviceUnavailable('Unable to reach the Congress.gov API.')` |
|
|
214
219
|
|
|
215
|
-
The `content` operation adds `documentErrorContracts` (tool-helpers) on top: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, and `offset_past_end
|
|
220
|
+
The `content` operation adds `documentErrorContracts` (tool-helpers) on top: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, and `offset_past_end` — the last of which `congressgov_bill_lookup` also raises from its `summaries` branch when `characterOffset` is past the end of every returned row's text. `CongressDocumentsService` raises each with a matching `data.reason` and resolves the hint via `ctx.recoveryFor` — note that `ctx.fail` does **not** auto-populate `recovery`, so handler-side `ctx.fail` calls must spread `ctx.recoveryFor(reason)` into their data or the hint never reaches the wire.
|
|
216
221
|
|
|
217
222
|
Service-only contract reasons carry `thrownBy: 'service'`; handler-local reasons remain checked by `error-contract-unthrown`. `RequestCancelled` is a baseline code and needs no contract entry. Retry predicates compose `defaultIsTransient` with the existing exclusion of `RateLimited` codes and preserve upstream `retryable: false`.
|
|
218
223
|
|
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** congressgov-mcp-server
|
|
4
|
-
**Version:** 0.7.
|
|
4
|
+
**Version:** 0.7.2
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` + `@modelcontextprotocol/client` ^2.0.0
|
|
@@ -68,18 +68,20 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
|
|
|
68
68
|
|
|
69
69
|
| Name | Description |
|
|
70
70
|
|:-----|:------------|
|
|
71
|
-
| `congressgov_bill_lookup` | Browse, filter, and retrieve bill data (actions, sponsors, summaries, text, related bills) + bounded document text via `content` |
|
|
71
|
+
| `congressgov_bill_lookup` | Browse, filter, and retrieve bill data (actions, sponsors, summaries, text, related bills) + bounded document text via `content`; `summaries` takes `versionCode` and the shared `characterOffset`/`characterLimit` window |
|
|
72
72
|
| `congressgov_enacted_laws` | Browse enacted public and private laws by congress |
|
|
73
73
|
| `congressgov_member_lookup` | Discover members by state/district/congress, retrieve legislative portfolios |
|
|
74
74
|
| `congressgov_committee_lookup` | Browse committees and retrieve legislation, reports, nominations |
|
|
75
75
|
| `congressgov_roll_votes` | Retrieve House and Senate roll call votes and member voting positions |
|
|
76
76
|
| `congressgov_senate_nominations` | Browse presidential nominations, track Senate confirmation pipeline |
|
|
77
|
-
| `congressgov_bill_summaries` | Browse recent CRS bill summaries — the "what's happening" feed |
|
|
77
|
+
| `congressgov_bill_summaries` | Browse recent CRS bill summaries — the "what's happening" feed, bounded by the shared summary page budget and per-row text window |
|
|
78
78
|
| `congressgov_crs_reports` | Browse and retrieve nonpartisan CRS policy analysis reports |
|
|
79
79
|
| `congressgov_committee_reports` | Browse and retrieve committee reports accompanying legislation + bounded report text via `content` |
|
|
80
80
|
| `congressgov_daily_record` | Browse daily Congressional Record — floor speeches, debates, proceedings + bounded article text via `content` |
|
|
81
81
|
| `congressgov_search_bills` | Keyword-search bill titles/summaries via the opt-in local FTS mirror — off by default |
|
|
82
82
|
|
|
83
|
+
**Summary bounding** (`src/mcp-server/tools/summary-window.ts`, constants in `tool-helpers.ts`). Both summary surfaces enforce two limits. `SUMMARY_PAGE_CHARACTERS` stops a page once its serialized rows reach the budget — the first row always returns, `pagination.nextOffset` counts the rows actually returned, and an enrichment notice discloses the stop. `DEFAULT_SUMMARY_TEXT_CHARACTERS` bounds one row's upstream `text`; a windowed row gains `textTotalCharacters` / `textTruncated` / `textNextOffset`, and its window end is retracted off any HTML tag or character reference it would otherwise split (unless the construct is wider than the whole window, where the requested limit wins). A row inside both limits is returned untouched, so an unbounded page stays byte-identical. `congressgov_bill_lookup` `summaries` overrides the row window with `characterOffset`/`characterLimit` and selects one version with `versionCode` — Congress.gov publishes no version filter, so selection reads the bill's whole summary list and matches client-side.
|
|
84
|
+
|
|
83
85
|
### Resources (5)
|
|
84
86
|
|
|
85
87
|
| URI Template | Description |
|
|
@@ -114,6 +116,7 @@ src/
|
|
|
114
116
|
congress-documents-service.ts # www.congress.gov document fetch — host allowlist, byte ceiling, character window
|
|
115
117
|
document-formats.ts # Format label → URL resolution over upstream format lists
|
|
116
118
|
extract-text.ts # GPO `<pre>` / XML body → deterministic plain text
|
|
119
|
+
extract-text-stream.ts # Incremental twin of extract-text.ts — one character window, constant memory
|
|
117
120
|
types.ts # Document format + content window types
|
|
118
121
|
congress-mirror/
|
|
119
122
|
congress-mirror-service.ts # Mirror read path — FTS5 search, ready(), sync accessor
|
|
@@ -147,6 +150,8 @@ src/
|
|
|
147
150
|
prompts/definitions/
|
|
148
151
|
bill-analysis.prompt.ts # congressgov_bill_analysis
|
|
149
152
|
legislative-research.prompt.ts # congressgov_legislative_research
|
|
153
|
+
utils/
|
|
154
|
+
character-references.ts # Single-pass HTML/XML character-reference decoding
|
|
150
155
|
scripts/
|
|
151
156
|
_mirror-context.ts # Shared bootstrap for the mirror lifecycle CLI scripts
|
|
152
157
|
congress-mirror-init.ts # mirror:init — full out-of-band mirror build
|
|
@@ -179,7 +184,7 @@ Four services. `CongressApiService` backs nine tools and the House branch of `co
|
|
|
179
184
|
- The fetch is bounded: a 25 MB ceiling (refused on `Content-Length`, else mid-stream), a 30s deadline, and a content-type allowlist
|
|
180
185
|
- The body is extracted as it streams and only the requested window is retained, so a read's live set is flat in the size of the document (transient allocation is not — peak RSS runs above a buffered read); the ceiling bounds how long a response may run, not how much of one fits in a buffer
|
|
181
186
|
- The structured response is bounded by an exact character window — `structuredContent.content.text` and its offsets index the extracted plain text and are never snapped to section breaks, so feeding `nextOffset` back walks a document with no overlap and no gap; `content[]` wraps that unchanged window in a dynamically safe Markdown fence for presentation
|
|
182
|
-
- `extract-text.ts` unwraps GPO's `<pre>` print output verbatim (whitespace is the document's structure), while no-`<pre>` XML gains one space only at an otherwise-unseparated sibling close→open element boundary; both readings decode
|
|
187
|
+
- `extract-text.ts` unwraps GPO's `<pre>` print output verbatim (whitespace is the document's structure), while no-`<pre>` XML gains one space only at an otherwise-unseparated sibling close→open element boundary; both readings decode character references through `src/utils/character-references.ts` — the one decoder every HTML/XML → text path in the server shares, single-pass so an escaped reference stays escaped — and `extract-text-stream.ts` is their incremental twin, pinned byte-for-byte against the whole-string extractor
|
|
183
188
|
|
|
184
189
|
**`CongressMirrorService`** — local SQLite FTS5 mirror of bill title + CRS summary text, backing `congressgov_search_bills` only:
|
|
185
190
|
- Opt-in via `CONGRESS_MIRROR_ENABLED` (off by default); built out-of-band via the `mirror:init`/`mirror:refresh` scripts, never on server startup
|
|
@@ -212,7 +217,7 @@ All tools share these patterns. The service layer handles them uniformly:
|
|
|
212
217
|
| Invalid params | `validationError('...', { field })` |
|
|
213
218
|
| Network error | `serviceUnavailable('Unable to reach the Congress.gov API.')` |
|
|
214
219
|
|
|
215
|
-
The `content` operation adds `documentErrorContracts` (tool-helpers) on top: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, and `offset_past_end
|
|
220
|
+
The `content` operation adds `documentErrorContracts` (tool-helpers) on top: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, and `offset_past_end` — the last of which `congressgov_bill_lookup` also raises from its `summaries` branch when `characterOffset` is past the end of every returned row's text. `CongressDocumentsService` raises each with a matching `data.reason` and resolves the hint via `ctx.recoveryFor` — note that `ctx.fail` does **not** auto-populate `recovery`, so handler-side `ctx.fail` calls must spread `ctx.recoveryFor(reason)` into their data or the hint never reaches the wire.
|
|
216
221
|
|
|
217
222
|
Service-only contract reasons carry `thrownBy: 'service'`; handler-local reasons remain checked by `error-contract-unthrown`. `RequestCancelled` is a baseline code and needs no contract entry. Retry predicates compose `defaultIsTransient` with the existing exclusion of `RateLimited` codes and preserve upstream `retryable: false`.
|
|
218
223
|
|
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
|
|
|
@@ -73,7 +73,8 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
|
|
|
73
73
|
- Operations: `list` (browse by congress/billType/date range — no keyword search), `get` (full detail), or drill into `actions`, `amendments`, `cosponsors`, `committees`, `subjects`, `summaries`, `text`, `titles`, `related`
|
|
74
74
|
- `list` defaults to `order='recent'` (newest update-date first); `limit` 1–250, `offset` pagination
|
|
75
75
|
- `content` reads a text version's actual document text: select the version with `textVersionIndex` (0-based, against `text`'s order), the window with `characterOffset`/`characterLimit` (1–100,000 chars, default 25,000), and follow `nextOffset` to walk a full bill
|
|
76
|
-
-
|
|
76
|
+
- `summaries` selects one version with `versionCode` (the code a summary row carries — `00` introduced, `49` public law) and reads each row's text through the same `characterOffset`/`characterLimit` window; a row past the window carries `textTotalCharacters`, `textTruncated`, and `textNextOffset`, and a window end never splits an HTML tag or character reference, so following `textNextOffset` reassembles the upstream text exactly
|
|
77
|
+
- Typed failures on `content`: `document_unavailable`, `format_unavailable`, `document_fetch_failed`, `document_too_large`, `offset_past_end`, alongside the shared `not_found` / `rate_limited` / `invalid_request` / `upstream_error` set — `offset_past_end` also covers a `summaries` call whose `characterOffset` is past the end of every returned row
|
|
77
78
|
|
|
78
79
|
---
|
|
79
80
|
|
|
@@ -108,6 +109,7 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
|
|
|
108
109
|
|
|
109
110
|
- `chamber` is `house` (default, Congress.gov API) or `senate` (the Senate's official LIS XML feed — the API exposes no Senate votes)
|
|
110
111
|
- `list` browses by congress + session (1 or 2), newest-first by default (computed client-side for strict ordering); `get` returns tallies and party breakdown, `members` returns each member's recorded position
|
|
112
|
+
- Senate `list` rows carry the feed's year-less `voteDate` ("19-Dec") alongside a derived `voteDateIso` (`2023-12-19`), resolved across the whole session — including the January votes of a session that sat past December 31
|
|
111
113
|
- Roll call numbers reset each session and are specific to one chamber
|
|
112
114
|
- `limit` 1–250, `offset` pagination for `list` and `members`
|
|
113
115
|
|
|
@@ -125,7 +127,9 @@ Bill, member, and committee data is also reachable through `congressgov_bill_loo
|
|
|
125
127
|
|
|
126
128
|
- Filters by `congress` and `billType` (requires `congress`); date filters apply to the CRS summary's update time, not the bill's action date
|
|
127
129
|
- Defaults to summaries updated in the last 7 days when neither date bound is supplied
|
|
128
|
-
-
|
|
130
|
+
- A page stops adding rows once they reach a fixed response-character budget: at least one row always returns, `pagination.nextOffset` resumes at the first row not returned, and a notice discloses the stop
|
|
131
|
+
- A summary past the per-row window arrives as an exact character window carrying `textTotalCharacters`, `textTruncated`, and `textNextOffset`; the notice names the `congressgov_bill_lookup` call that reads on from there
|
|
132
|
+
- For summaries of one specific bill — and to read a windowed summary to the end — use `congressgov_bill_lookup` with `operation='summaries'` instead
|
|
129
133
|
|
|
130
134
|
---
|
|
131
135
|
|
|
@@ -407,6 +411,7 @@ The Dockerfile defaults to HTTP transport, stateless session mode, and logs to `
|
|
|
407
411
|
| `src/services/congress-documents/` | Bounded document-text fetch — host allowlist, byte ceiling, character window. |
|
|
408
412
|
| `src/services/congress-mirror/` | Local SQLite FTS5 bill-search mirror — ingest, normalize, schema. |
|
|
409
413
|
| `src/services/senate-lis/` | Senate LIS XML client for Senate roll call votes. |
|
|
414
|
+
| `src/utils/` | Shared pure helpers — single-pass HTML/XML character-reference decoding. |
|
|
410
415
|
| `scripts/` | Mirror lifecycle CLI scripts (`mirror:init` / `mirror:refresh` / `mirror:verify`). |
|
|
411
416
|
| `tests/` | Unit and integration tests, mirroring the `src/` structure. |
|
|
412
417
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Character references now decode in a single pass, closing three CodeQL double-escaping alerts. This release also resolves Senate roll-call vote dates and bounds summary text windows."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.7.2 — 2026-09-22
|
|
8
|
+
|
|
9
|
+
## Fixed
|
|
10
|
+
|
|
11
|
+
- **`congressgov_roll_votes` Senate list rows** now carry a resolved `voteDateIso` beside the menu's year-less `voteDate`, derived by walking the session's vote sequence across December→January rollovers. ([#67](https://github.com/cyanheads/congressgov-mcp-server/issues/67))
|
|
12
|
+
- **`congressgov_bill_summaries` and `congressgov_bill_lookup` `summaries`** now bound page size and per-row summary text — a windowed row carries `textTotalCharacters`/`textTruncated`/`textNextOffset`, and `summaries` gains a `versionCode` selector. ([#70](https://github.com/cyanheads/congressgov-mcp-server/issues/70))
|
|
13
|
+
|
|
14
|
+
## Security
|
|
15
|
+
|
|
16
|
+
- **Character references** decode in a single pass through a shared decoder (`src/utils/character-references.ts`) — replacing the two `replace()` chains in tool formatting and the one in the search mirror, and taking over the single-pass decoder document extraction already used. A reference naming an inherited object member (`&constructor;`) now stays verbatim instead of resolving to it. Closes three CodeQL `js/double-escaping` alerts. ([#73](https://github.com/cyanheads/congressgov-mcp-server/issues/73))
|
|
17
|
+
|
|
18
|
+
## Dependencies
|
|
19
|
+
|
|
20
|
+
- `@types/node` `^26.6.1` → `^26.6.2`
|
|
@@ -8,8 +8,6 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
|
|
|
8
8
|
text: "text";
|
|
9
9
|
xml: "xml";
|
|
10
10
|
}>>;
|
|
11
|
-
characterOffset: z.ZodDefault<z.ZodNumber>;
|
|
12
|
-
characterLimit: z.ZodDefault<z.ZodNumber>;
|
|
13
11
|
operation: z.ZodEnum<{
|
|
14
12
|
actions: "actions";
|
|
15
13
|
amendments: "amendments";
|
|
@@ -45,6 +43,9 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
|
|
|
45
43
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
46
44
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
47
45
|
textVersionIndex: z.ZodDefault<z.ZodNumber>;
|
|
46
|
+
versionCode: z.ZodOptional<z.ZodString>;
|
|
47
|
+
characterOffset: z.ZodDefault<z.ZodNumber>;
|
|
48
|
+
characterLimit: z.ZodDefault<z.ZodNumber>;
|
|
48
49
|
}, z.core.$strip>, z.ZodObject<{
|
|
49
50
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$loose>>>;
|
|
50
51
|
pagination: z.ZodOptional<z.ZodObject<{
|
|
@@ -112,8 +113,8 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
|
|
|
112
113
|
readonly reason: 'offset_past_end';
|
|
113
114
|
readonly thrownBy: 'service';
|
|
114
115
|
readonly retryable: false;
|
|
115
|
-
readonly when:
|
|
116
|
-
readonly recovery:
|
|
116
|
+
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
|
+
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.";
|
|
117
118
|
}], {
|
|
118
119
|
effectiveQuery: z.ZodString;
|
|
119
120
|
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;AAqDjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoWzB,CAAC"}
|
|
@@ -5,7 +5,8 @@
|
|
|
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 '../format-helpers.js';
|
|
8
|
-
import {
|
|
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
10
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
10
11
|
import { BILL_TYPE_CODES } from '../../../services/congress-api/types.js';
|
|
11
12
|
import { getCongressDocuments } from '../../../services/congress-documents/congress-documents-service.js';
|
|
@@ -30,7 +31,7 @@ const SUB_RESOURCE_MAP = {
|
|
|
30
31
|
};
|
|
31
32
|
export const billLookupTool = tool('congressgov_bill_lookup', {
|
|
32
33
|
title: 'Congress.gov Bill Lookup',
|
|
33
|
-
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.`,
|
|
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.`,
|
|
34
35
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
35
36
|
errors: [...congressErrorContracts, ...documentErrorContracts],
|
|
36
37
|
input: z.object({
|
|
@@ -58,7 +59,13 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
|
|
|
58
59
|
.min(0)
|
|
59
60
|
.default(0)
|
|
60
61
|
.describe("Which text version 'content' reads, 0-based against the same order 'text' returns — 0 is the most recent version. Ignored by other operations."),
|
|
62
|
+
versionCode: z
|
|
63
|
+
.string()
|
|
64
|
+
.optional()
|
|
65
|
+
.describe("Which summary version 'summaries' returns — the versionCode a summary row carries ('00' introduced, '49' public law). Selection runs over the bill's whole summary list, which Congress.gov publishes no filter for, and limit/offset then page the matching rows. Omit to return every version. Ignored by other operations."),
|
|
61
66
|
...documentWindowInput,
|
|
67
|
+
characterOffset: documentWindowInput.characterOffset.describe("First character to return, 0-based — of the document on 'content', and of every returned row's summary text on 'summaries'. Offsets are exact and are never snapped to a section or paragraph break, so feeding back the response's nextOffset (or a summary row's textNextOffset) walks the whole text with every character returned exactly once."),
|
|
68
|
+
characterLimit: documentWindowInput.characterLimit.describe(`Maximum characters to return (1-${MAX_CONTENT_CHARACTERS}) — for the document window on 'content', and for each row's summary text on 'summaries'. Legislative documents run past a million characters and an enacted bill's summary past two hundred thousand, so either takes several windows.`),
|
|
62
69
|
}),
|
|
63
70
|
output: listOrDetail({ bill: 'record', content: 'record' }, "Bill record (sponsor, policy area, latest action, CBO estimates, law citation) for `get`; absent for `list` and sub-resources. For `content`, an alternative key 'content' carries {text, format, sourceUrl, documentTitle, totalCharacters, offset, truncated, nextOffset} — one exact character window of the document."),
|
|
64
71
|
enrichment: listEnrichment,
|
|
@@ -167,6 +174,90 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
|
|
|
167
174
|
},
|
|
168
175
|
};
|
|
169
176
|
}
|
|
177
|
+
if (input.operation === 'summaries') {
|
|
178
|
+
/** Narrowed above; a closure below reads it, where the narrowing is lost. */
|
|
179
|
+
const billType = input.billType;
|
|
180
|
+
const versionCode = normalizeOptionalString(input.versionCode);
|
|
181
|
+
/**
|
|
182
|
+
* Congress.gov publishes no version filter on the summaries sub-resource,
|
|
183
|
+
* so a selection reads the bill's whole list — the API's own page ceiling
|
|
184
|
+
* — and matches client-side. Without one the caller's own page is fetched
|
|
185
|
+
* unchanged.
|
|
186
|
+
*/
|
|
187
|
+
const result = await api.getBillSubResource({
|
|
188
|
+
congress: input.congress,
|
|
189
|
+
billType: input.billType,
|
|
190
|
+
billNumber,
|
|
191
|
+
subResource: 'summaries',
|
|
192
|
+
limit: versionCode ? 250 : input.limit,
|
|
193
|
+
offset: versionCode ? 0 : input.offset,
|
|
194
|
+
}, ctx);
|
|
195
|
+
let page = result;
|
|
196
|
+
if (versionCode) {
|
|
197
|
+
const matched = result.data.filter((row) => row.versionCode === versionCode);
|
|
198
|
+
const selected = matched.slice(input.offset, input.offset + input.limit);
|
|
199
|
+
page = {
|
|
200
|
+
...result,
|
|
201
|
+
data: selected,
|
|
202
|
+
pagination: {
|
|
203
|
+
count: matched.length,
|
|
204
|
+
nextOffset: input.offset + selected.length < matched.length
|
|
205
|
+
? input.offset + selected.length
|
|
206
|
+
: null,
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
const bounded = windowSummaryPage(page, {
|
|
211
|
+
offset: input.offset,
|
|
212
|
+
characterOffset: input.characterOffset,
|
|
213
|
+
characterLimit: input.characterLimit,
|
|
214
|
+
});
|
|
215
|
+
if (bounded.offsetPastEnd) {
|
|
216
|
+
throw ctx.fail('offset_past_end', `characterOffset ${input.characterOffset} is at or past the end of every summary returned for ${input.billType.toUpperCase()} ${billNumber}.`, {
|
|
217
|
+
...ctx.recoveryFor('offset_past_end'),
|
|
218
|
+
characterOffset: input.characterOffset,
|
|
219
|
+
versionCode,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
ctx.log.info('Bill summaries retrieved', {
|
|
223
|
+
congress: input.congress,
|
|
224
|
+
billType: input.billType,
|
|
225
|
+
billNumber,
|
|
226
|
+
versionCode,
|
|
227
|
+
count: bounded.page.data.length,
|
|
228
|
+
droppedRows: bounded.droppedRows,
|
|
229
|
+
windowedRows: bounded.windowed.length,
|
|
230
|
+
});
|
|
231
|
+
ctx.enrich.echo(buildEffectiveQuery(`summaries for ${input.billType.toUpperCase()} ${billNumber} in the ${input.congress}th Congress`, { versionCode }));
|
|
232
|
+
ctx.enrich.total(bounded.page.pagination.count);
|
|
233
|
+
/**
|
|
234
|
+
* `count` is the matched-row total, so gating on it says "no such version"
|
|
235
|
+
* only when there is none — a page whose own offset ran past the matching
|
|
236
|
+
* rows renders as past-the-end, the same split `notifyIfNoMatches` keeps.
|
|
237
|
+
*/
|
|
238
|
+
if (versionCode && bounded.page.pagination.count === 0) {
|
|
239
|
+
const available = [
|
|
240
|
+
...new Set(result.data
|
|
241
|
+
.map((row) => row.versionCode)
|
|
242
|
+
.filter((code) => typeof code === 'string')),
|
|
243
|
+
];
|
|
244
|
+
ctx.enrich.notice(`No summary with versionCode '${versionCode}' for ${input.billType.toUpperCase()} ${billNumber}.${available.length > 0
|
|
245
|
+
? ` Versions published: ${available.join(', ')}.`
|
|
246
|
+
: ' Congress.gov publishes no summaries for this bill.'}`);
|
|
247
|
+
return bounded.page;
|
|
248
|
+
}
|
|
249
|
+
notifyIfNoMatches(ctx, bounded.page, `No summaries found for ${input.billType.toUpperCase()} ${billNumber}.`);
|
|
250
|
+
const notice = summaryWindowNotice(bounded, input.limit, (row) => summaryContinuationCall({
|
|
251
|
+
congress: input.congress,
|
|
252
|
+
billType,
|
|
253
|
+
billNumber,
|
|
254
|
+
versionCode: typeof row.row.versionCode === 'string' ? row.row.versionCode : versionCode,
|
|
255
|
+
characterOffset: row.nextOffset ?? 0,
|
|
256
|
+
}));
|
|
257
|
+
if (notice)
|
|
258
|
+
ctx.enrich.notice(notice);
|
|
259
|
+
return bounded.page;
|
|
260
|
+
}
|
|
170
261
|
const subResource = SUB_RESOURCE_MAP[input.operation] ?? input.operation;
|
|
171
262
|
const result = await api.getBillSubResource({
|
|
172
263
|
congress: input.congress,
|
|
@@ -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,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,uB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AAK,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"}
|
|
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,uBAAuB,EACvB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB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AM,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"}
|
|
@@ -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;
|
|
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"}
|
|
@@ -5,13 +5,14 @@
|
|
|
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 '../format-helpers.js';
|
|
8
|
+
import { summaryContinuationCall, summaryWindowNotice, windowSummaryPage, } from '../summary-window.js';
|
|
8
9
|
import { buildEffectiveQuery, congressErrorContracts, listEnrichment, listOutput, normalizeOptionalString, notifyIfNoMatches, validateDateTimeRange, validateIsoDateTime, } from '../tool-helpers.js';
|
|
9
10
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
10
11
|
import { BILL_TYPE_CODES } from '../../../services/congress-api/types.js';
|
|
11
12
|
const DEFAULT_LOOKBACK_MS = 7 * 24 * 60 * 60 * 1000;
|
|
12
13
|
export const billSummariesTool = tool('congressgov_bill_summaries', {
|
|
13
14
|
title: 'Congress.gov Bill Summaries',
|
|
14
|
-
description: `Browse recent CRS (Congressional Research Service) bill summaries — plain-language summaries of bills at each legislative stage, useful for answering "what's happening in Congress?". The fromDateTime/toDateTime filters apply to the summary's update time, not the bill's action date, so results include recently rewritten summaries of older bills. Defaults to summaries updated in the last 7 days. Each item shows both the bill's action date and the summary update date. For summaries of one specific bill
|
|
15
|
+
description: `Browse recent CRS (Congressional Research Service) bill summaries — plain-language summaries of bills at each legislative stage, useful for answering "what's happening in Congress?". The fromDateTime/toDateTime filters apply to the summary's update time, not the bill's action date, so results include recently rewritten summaries of older bills. Defaults to summaries updated in the last 7 days. Each item shows both the bill's action date and the summary update date. A page stops adding rows once it reaches a fixed response-character budget, and a summary longer than the per-row window arrives as an exact character window carrying textTotalCharacters/textTruncated/textNextOffset; pagination.nextOffset continues the page and a row's textNextOffset continues its text. For summaries of one specific bill — and to read a windowed summary to the end — use congressgov_bill_lookup with operation='summaries' instead.`,
|
|
15
16
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
16
17
|
errors: congressErrorContracts,
|
|
17
18
|
input: z.object({
|
|
@@ -59,7 +60,12 @@ export const billSummariesTool = tool('congressgov_bill_summaries', {
|
|
|
59
60
|
limit: input.limit,
|
|
60
61
|
offset: input.offset,
|
|
61
62
|
}, ctx);
|
|
62
|
-
|
|
63
|
+
const bounded = windowSummaryPage(result, { offset: input.offset });
|
|
64
|
+
ctx.log.info('Summaries listed', {
|
|
65
|
+
count: bounded.page.data.length,
|
|
66
|
+
droppedRows: bounded.droppedRows,
|
|
67
|
+
windowedRows: bounded.windowed.length,
|
|
68
|
+
});
|
|
63
69
|
ctx.enrich.echo(buildEffectiveQuery('bill summaries', {
|
|
64
70
|
congress: input.congress,
|
|
65
71
|
billType: input.billType,
|
|
@@ -67,8 +73,30 @@ export const billSummariesTool = tool('congressgov_bill_summaries', {
|
|
|
67
73
|
toDateTime: toDateTimeInput,
|
|
68
74
|
}));
|
|
69
75
|
ctx.enrich.total(result.pagination.count);
|
|
70
|
-
notifyIfNoMatches(ctx,
|
|
71
|
-
|
|
76
|
+
notifyIfNoMatches(ctx, bounded.page, 'No summaries found. Try broadening the date range or removing billType/congress filters.');
|
|
77
|
+
/**
|
|
78
|
+
* A windowed row's continuation is a single-bill call, so it names the bill
|
|
79
|
+
* the row itself carries — `bill.type` arrives upper-cased upstream and the
|
|
80
|
+
* builder lower-cases it to the code the input enum takes.
|
|
81
|
+
*/
|
|
82
|
+
const notice = summaryWindowNotice(bounded, input.limit, (row) => {
|
|
83
|
+
const bill = row.row.bill;
|
|
84
|
+
if (!bill || typeof bill !== 'object' || Array.isArray(bill))
|
|
85
|
+
return;
|
|
86
|
+
const { congress, type, number } = bill;
|
|
87
|
+
if (congress == null || type == null || number == null)
|
|
88
|
+
return;
|
|
89
|
+
return summaryContinuationCall({
|
|
90
|
+
congress: Number(congress),
|
|
91
|
+
billType: String(type),
|
|
92
|
+
billNumber: String(number),
|
|
93
|
+
versionCode: typeof row.row.versionCode === 'string' ? row.row.versionCode : undefined,
|
|
94
|
+
characterOffset: row.nextOffset ?? 0,
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
if (notice)
|
|
98
|
+
ctx.enrich.notice(notice);
|
|
99
|
+
return bounded.page;
|
|
72
100
|
},
|
|
73
101
|
});
|
|
74
102
|
//# sourceMappingURL=bill-summaries.tool.js.map
|
|
@@ -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,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,KAAK,EAAE,6BAA6B;IACpC,WAAW,EAAE,
|
|
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,M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IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;gBAAE,OAAO;YACrE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAA+B,CAAC;YACnE,IAAI,QAAQ,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI;gBAAE,OAAO;YAC/D,OAAO,uBAAuB,CAAC;gBAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;gBAC1B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;gBACtB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC;gBAC1B,WAAW,EAAE,OAAO,GAAG,CAAC,GAAG,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;gBACtF,eAAe,EAAE,GAAG,CAAC,UAAU,IAAI,CAAC;aACrC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,IAAI,MAAM;YAAE,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEtC,OAAO,OAAO,CAAC,IAAI,CAAC;IACtB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -93,8 +93,8 @@ export declare const committeeReportsTool: import("@cyanheads/mcp-ts-core").Tool
|
|
|
93
93
|
readonly reason: 'offset_past_end';
|
|
94
94
|
readonly thrownBy: 'service';
|
|
95
95
|
readonly retryable: false;
|
|
96
|
-
readonly when:
|
|
97
|
-
readonly recovery:
|
|
96
|
+
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.";
|
|
97
|
+
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.";
|
|
98
98
|
}], {
|
|
99
99
|
effectiveQuery: z.ZodString;
|
|
100
100
|
totalCount: z.ZodNumber;
|
|
@@ -87,8 +87,8 @@ export declare const dailyRecordTool: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
87
87
|
readonly reason: 'offset_past_end';
|
|
88
88
|
readonly thrownBy: 'service';
|
|
89
89
|
readonly retryable: false;
|
|
90
|
-
readonly when:
|
|
91
|
-
readonly recovery:
|
|
90
|
+
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.";
|
|
91
|
+
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.";
|
|
92
92
|
}], {
|
|
93
93
|
effectiveQuery: z.ZodString;
|
|
94
94
|
totalCount: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-helpers.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/format-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;
|
|
1
|
+
{"version":3,"file":"format-helpers.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/format-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,KAAK,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AA45DhD,sFAAsF;AACtF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAAE,CAYxE;AAgDD,2DAA2D;AAC3D,eAAO,MAAM,eAAe,WA/EhB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,SAAS,EA+EkB,CAAC;AA8CpE,qDAAqD;AACrD,eAAO,MAAM,iBAAiB,WA9HlB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,SAAS,EA8HuB,CAAC;AAEzE,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,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