@cyanheads/congressgov-mcp-server 0.3.15 → 0.3.17
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 +2 -2
- package/CLAUDE.md +2 -2
- package/README.md +2 -2
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/prompts/definitions/bill-analysis.prompt.d.ts.map +1 -1
- package/dist/mcp-server/prompts/definitions/bill-analysis.prompt.js +3 -2
- package/dist/mcp-server/prompts/definitions/bill-analysis.prompt.js.map +1 -1
- package/dist/mcp-server/prompts/definitions/legislative-research.prompt.d.ts.map +1 -1
- package/dist/mcp-server/prompts/definitions/legislative-research.prompt.js +4 -3
- package/dist/mcp-server/prompts/definitions/legislative-research.prompt.js.map +1 -1
- package/dist/mcp-server/resources/definitions/bill.resource.d.ts +10 -1
- package/dist/mcp-server/resources/definitions/bill.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/bill.resource.js +12 -3
- package/dist/mcp-server/resources/definitions/bill.resource.js.map +1 -1
- package/dist/mcp-server/resources/definitions/committee.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/committee.resource.js +7 -2
- package/dist/mcp-server/resources/definitions/committee.resource.js.map +1 -1
- package/dist/mcp-server/resources/definitions/current-congress.resource.js +1 -1
- package/dist/mcp-server/resources/definitions/current-congress.resource.js.map +1 -1
- package/dist/mcp-server/resources/definitions/member.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/member.resource.js +4 -1
- package/dist/mcp-server/resources/definitions/member.resource.js.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.js +4 -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 +5 -6
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.js +3 -2
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-reports.tool.js +6 -1
- package/dist/mcp-server/tools/definitions/committee-reports.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/crs-reports.tool.js +2 -1
- package/dist/mcp-server/tools/definitions/crs-reports.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/daily-record.tool.js +4 -3
- package/dist/mcp-server/tools/definitions/daily-record.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/enacted-laws.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/enacted-laws.tool.js +7 -3
- package/dist/mcp-server/tools/definitions/enacted-laws.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/member-lookup.tool.js +4 -3
- package/dist/mcp-server/tools/definitions/member-lookup.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/roll-votes.tool.js +2 -1
- package/dist/mcp-server/tools/definitions/roll-votes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.js +4 -3
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.js.map +1 -1
- package/dist/mcp-server/tools/format-helpers.d.ts.map +1 -1
- package/dist/mcp-server/tools/format-helpers.js +33 -3
- package/dist/mcp-server/tools/format-helpers.js.map +1 -1
- package/dist/services/congress-api/congress-api-service.d.ts +6 -1
- package/dist/services/congress-api/congress-api-service.d.ts.map +1 -1
- package/dist/services/congress-api/congress-api-service.js +94 -38
- package/dist/services/congress-api/congress-api-service.js.map +1 -1
- package/dist/services/congress-api/types.d.ts +7 -4
- package/dist/services/congress-api/types.d.ts.map +1 -1
- package/dist/services/congress-api/types.js +11 -1
- package/dist/services/congress-api/types.js.map +1 -1
- package/package.json +6 -5
- 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.3.
|
|
4
|
+
**Version:** 0.3.17
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
6
6
|
|
|
7
7
|
> **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.
|
|
@@ -262,7 +262,7 @@ Each per-version file opens with YAML frontmatter:
|
|
|
262
262
|
|
|
263
263
|
```markdown
|
|
264
264
|
---
|
|
265
|
-
summary: One-line headline, ≤
|
|
265
|
+
summary: One-line headline, ≤350 chars # required — powers the rollup index
|
|
266
266
|
breaking: false # optional — true flags breaking changes
|
|
267
267
|
security: false # optional — true flags security fixes
|
|
268
268
|
---
|
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** congressgov-mcp-server
|
|
4
|
-
**Version:** 0.3.
|
|
4
|
+
**Version:** 0.3.17
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
6
6
|
|
|
7
7
|
> **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.
|
|
@@ -262,7 +262,7 @@ Each per-version file opens with YAML frontmatter:
|
|
|
262
262
|
|
|
263
263
|
```markdown
|
|
264
264
|
---
|
|
265
|
-
summary: One-line headline, ≤
|
|
265
|
+
summary: One-line headline, ≤350 chars # required — powers the rollup index
|
|
266
266
|
breaking: false # optional — true flags breaking changes
|
|
267
267
|
security: false # optional — true flags security fixes
|
|
268
268
|
---
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](https://www.npmjs.com/package/@cyanheads/congressgov-mcp-server) [](https://www.npmjs.com/package/@cyanheads/congressgov-mcp-server) [](./CHANGELOG.md) [](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) [](https://modelcontextprotocol.io/)
|
|
11
11
|
|
|
12
12
|
[](./LICENSE) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
13
13
|
|
|
@@ -232,7 +232,7 @@ All configuration is validated at startup via Zod schemas in `src/config/server-
|
|
|
232
232
|
| `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `warning`, `error`, etc.) | `info` |
|
|
233
233
|
| `LOGS_DIR` | Directory for log files (Node.js only). | `<project-root>/logs` |
|
|
234
234
|
| `STORAGE_PROVIDER_TYPE` | Storage backend | `in-memory` |
|
|
235
|
-
| `OTEL_ENABLED` | Enable OpenTelemetry | `false` |
|
|
235
|
+
| `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry) (spans, metrics, completion logs) | `false` |
|
|
236
236
|
|
|
237
237
|
## Running the server
|
|
238
238
|
|
package/dist/index.js
CHANGED
|
@@ -55,6 +55,7 @@ await createApp({
|
|
|
55
55
|
withSource(billAnalysisPrompt, 'prompts', 'bill-analysis.prompt.ts'),
|
|
56
56
|
withSource(legislativeResearchPrompt, 'prompts', 'legislative-research.prompt.ts'),
|
|
57
57
|
],
|
|
58
|
+
instructions: `Use the congressgov_* tools to access U.S. legislative data via the Congress.gov API v3: bills, enacted laws, members, committees, House roll call votes, presidential nominations, CRS reports, and the daily Congressional Record. There is no keyword search — browse by congress number, bill/report type, date range, chamber, state, and district. Bills are addressed by congress + billType + billNumber (e.g. 118/hr/1234), members by bioguideId, committees by chamber-prefix codes.`,
|
|
58
59
|
landing: {
|
|
59
60
|
repoRoot: REPO_ROOT,
|
|
60
61
|
tagline: 'U.S. legislative data — bills, votes, members, committees — via MCP.',
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAOH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,iEAAiE,CAAC;AAC5G,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2DAA2D,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,uDAAuD,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uDAAuD,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAA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qBAAqB,CAAC;QAC1D,UAAU,CAAC,oBAAoB,EAAE,OAAO,EAAE,2BAA2B,CAAC;QACtE,UAAU,CAAC,eAAe,EAAE,OAAO,EAAE,sBAAsB,CAAC;KAC7D;IACD,SAAS,EAAE;QACT,UAAU,CAAC,uBAAuB,EAAE,WAAW,EAAE,8BAA8B,CAAC;QAChF,UAAU,CAAC,iBAAiB,EAAE,WAAW,EAAE,wBAAwB,CAAC;QACpE,UAAU,CAAC,cAAc,EAAE,WAAW,EAAE,oBAAoB,CAAC;QAC7D,UAAU,CAAC,YAAY,EAAE,WAAW,EAAE,kBAAkB,CAAC;QACzD,UAAU,CAAC,iBAAiB,EAAE,WAAW,EAAE,uBAAuB,CAAC;KACpE;IACD,OAAO,EAAE;QACP,UAAU,CAAC,kBAAkB,EAAE,SAAS,EAAE,yBAAyB,CAAC;QACpE,UAAU,CAAC,yBAAyB,EAAE,SAAS,EAAE,gCAAgC,CAAC;KACnF;IACD,YAAY,EAAE,ieAAie;IAC/e,OAAO,EAAE;QACP,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,sEAAsE;KAChF;IACD,KAAK;QACH,eAAe,EAAE,CAAC;IACpB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bill-analysis.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/bill-analysis.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,kBAAkB;;;;
|
|
1
|
+
{"version":3,"file":"bill-analysis.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/bill-analysis.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,kBAAkB;;;;kBA+B7B,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { prompt, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
export const billAnalysisPrompt = prompt('congressgov_bill_analysis', {
|
|
7
|
-
description: 'Structured framework for analyzing a bill: summary, sponsors, committee referrals, action timeline, related legislation,
|
|
7
|
+
description: 'Structured framework for analyzing a bill: summary, sponsors, committee referrals, action timeline, related legislation, policy implications, and outlook.',
|
|
8
8
|
args: z.object({
|
|
9
9
|
congress: z.string().describe('Congress number (e.g., 118).'),
|
|
10
10
|
billType: z.string().describe('Bill type code (e.g., hr, s).'),
|
|
@@ -28,7 +28,8 @@ export const billAnalysisPrompt = prompt('congressgov_bill_analysis', {
|
|
|
28
28
|
Use these tools as needed:
|
|
29
29
|
- congressgov_bill_lookup (operations: get, actions, cosponsors, committees, summaries, text, related)
|
|
30
30
|
- congressgov_member_lookup (to understand sponsor/cosponsor profiles)
|
|
31
|
-
- congressgov_committee_lookup (to understand committee context)
|
|
31
|
+
- congressgov_committee_lookup (to understand committee context)
|
|
32
|
+
- congressgov_committee_reports (to retrieve the committee report on the bill, if reported out)`,
|
|
32
33
|
},
|
|
33
34
|
},
|
|
34
35
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bill-analysis.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/bill-analysis.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,2BAA2B,EAAE;IACpE,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"bill-analysis.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/bill-analysis.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,2BAA2B,EAAE;IACpE,WAAW,EACT,4JAA4J;IAC9J,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;QAC7D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;QAC9D,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;KAC7D,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QAClB;YACE,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,gBAAgB,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,UAAU,aAAa,IAAI,CAAC,QAAQ;;;;;;;;;;;;;;gGAcN;aACzF;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legislative-research.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/legislative-research.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,yBAAyB;;;
|
|
1
|
+
{"version":3,"file":"legislative-research.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/legislative-research.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,yBAAyB;;;kBA2CpC,CAAC"}
|
|
@@ -29,9 +29,10 @@ Since the Congress.gov API has no keyword search, use these discovery strategies
|
|
|
29
29
|
|
|
30
30
|
1. **CRS Reports** — Use congressgov_crs_reports to find nonpartisan policy analyses on this topic.
|
|
31
31
|
2. **Recent Summaries** — Use congressgov_bill_summaries with a broad date range to find recently summarized bills that may relate to this topic.
|
|
32
|
-
3. **
|
|
33
|
-
4. **
|
|
34
|
-
5. **
|
|
32
|
+
3. **Bill Detail** — Once candidate bills surface, use congressgov_bill_lookup with operation='get' (and sub-resources like 'actions', 'cosponsors', 'related') for full sponsor, status, and policy area data.
|
|
33
|
+
4. **Committee Activity** — Identify relevant committees using congressgov_committee_lookup, then check their recent bills and reports.
|
|
34
|
+
5. **Key Members** — Identify members known for this policy area, then check their sponsored legislation via congressgov_member_lookup.
|
|
35
|
+
6. **Floor Activity** — Check congressgov_daily_record for recent floor debate on the topic.
|
|
35
36
|
|
|
36
37
|
Synthesize findings into:
|
|
37
38
|
- **Landscape** — What legislation is active on this topic? What stage are key bills at?
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legislative-research.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/legislative-research.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,kCAAkC,EAAE;IAClF,WAAW,EACT,uJAAuJ;IACzJ,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,CAAC,iFAAiF,CAAC;QAC9F,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,4DAA4D,CAAC;KAC1E,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;QACjB,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ;YAChC,CAAC,CAAC,gBAAgB,IAAI,CAAC,QAAQ,cAAc;YAC7C,CAAC,CAAC,2FAA2F,CAAC;QAEhG,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,uBAAuB,IAAI,CAAC,KAAK,oCAAoC,YAAY
|
|
1
|
+
{"version":3,"file":"legislative-research.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/legislative-research.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,kCAAkC,EAAE;IAClF,WAAW,EACT,uJAAuJ;IACzJ,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,CAAC,iFAAiF,CAAC;QAC9F,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,4DAA4D,CAAC;KAC1E,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;QACjB,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ;YAChC,CAAC,CAAC,gBAAgB,IAAI,CAAC,QAAQ,cAAc;YAC7C,CAAC,CAAC,2FAA2F,CAAC;QAEhG,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,uBAAuB,IAAI,CAAC,KAAK,oCAAoC,YAAY;;;;;;;;;;;;;;;;oEAgB7B;iBAC3D;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -5,7 +5,16 @@
|
|
|
5
5
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
export declare const billResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<z.ZodObject<{
|
|
7
7
|
congress: z.ZodString;
|
|
8
|
-
billType: z.
|
|
8
|
+
billType: z.ZodEnum<{
|
|
9
|
+
hr: "hr";
|
|
10
|
+
s: "s";
|
|
11
|
+
hjres: "hjres";
|
|
12
|
+
sjres: "sjres";
|
|
13
|
+
hconres: "hconres";
|
|
14
|
+
sconres: "sconres";
|
|
15
|
+
hres: "hres";
|
|
16
|
+
sres: "sres";
|
|
17
|
+
}>;
|
|
9
18
|
billNumber: z.ZodString;
|
|
10
19
|
}, z.core.$strip>, undefined, undefined>;
|
|
11
20
|
//# sourceMappingURL=bill.resource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bill.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/bill.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAIrD,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"bill.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/bill.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAIrD,eAAO,MAAM,YAAY;;;;;;;;;;;;;wCAmCvB,CAAC"}
|
|
@@ -4,14 +4,23 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { resource, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
7
|
+
import { BILL_TYPE_CODES } from '../../../services/congress-api/types.js';
|
|
7
8
|
export const billResource = resource('congress://bill/{congress}/{billType}/{billNumber}', {
|
|
8
9
|
name: 'bill-detail',
|
|
9
10
|
description: 'Bill detail: sponsor, status, policy area, committees, latest action.',
|
|
10
11
|
mimeType: 'application/json',
|
|
11
12
|
params: z.object({
|
|
12
|
-
congress: z
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
congress: z
|
|
14
|
+
.string()
|
|
15
|
+
.regex(/^\d+$/, 'Congress must be a positive integer (e.g., 118).')
|
|
16
|
+
.describe('Congress number (e.g., 118).'),
|
|
17
|
+
billType: z
|
|
18
|
+
.enum(BILL_TYPE_CODES)
|
|
19
|
+
.describe(`Bill type code: one of ${BILL_TYPE_CODES.join(', ')}.`),
|
|
20
|
+
billNumber: z
|
|
21
|
+
.string()
|
|
22
|
+
.regex(/^\d+$/, 'Bill number must be a positive integer (e.g., 3076).')
|
|
23
|
+
.describe('Bill number (e.g., 3076).'),
|
|
15
24
|
}),
|
|
16
25
|
async handler(params, ctx) {
|
|
17
26
|
const api = getCongressApi();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bill.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/bill.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"bill.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/bill.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,oDAAoD,EAAE;IACzF,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,uEAAuE;IACpF,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,KAAK,CAAC,OAAO,EAAE,kDAAkD,CAAC;aAClE,QAAQ,CAAC,8BAA8B,CAAC;QAC3C,QAAQ,EAAE,CAAC;aACR,IAAI,CAAC,eAAe,CAAC;aACrB,QAAQ,CAAC,0BAA0B,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QACpE,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,KAAK,CAAC,OAAO,EAAE,sDAAsD,CAAC;aACtE,QAAQ,CAAC,2BAA2B,CAAC;KACzC,CAAC;IAEF,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,MAAM,GAAG,GAAG,cAAc,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,OAAO,CAC9B;YACE,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;YACjC,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;SACtC,EACD,GAAG,CACJ,CAAC;QACF,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,uBAAuB,EAAE;YACpC,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"committee.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/committee.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGrD,eAAO,MAAM,iBAAiB;;
|
|
1
|
+
{"version":3,"file":"committee.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/committee.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGrD,eAAO,MAAM,iBAAiB;;wCA6B5B,CAAC"}
|
|
@@ -9,7 +9,10 @@ export const committeeResource = resource('congress://committee/{committeeCode}'
|
|
|
9
9
|
description: 'Committee detail: name, chamber, subcommittees, history, legislation counts.',
|
|
10
10
|
mimeType: 'application/json',
|
|
11
11
|
params: z.object({
|
|
12
|
-
committeeCode: z
|
|
12
|
+
committeeCode: z
|
|
13
|
+
.string()
|
|
14
|
+
.regex(/^[hsj][a-z0-9]{3,8}$/, "Committee system code must start with 'h' (House), 's' (Senate), or 'j' (Joint) followed by 3-8 lowercase alphanumeric chars (e.g., 'hsju00').")
|
|
15
|
+
.describe("Committee system code (e.g., 'hsju00')."),
|
|
13
16
|
}),
|
|
14
17
|
async handler(params, ctx) {
|
|
15
18
|
const api = getCongressApi();
|
|
@@ -20,7 +23,9 @@ export const committeeResource = resource('congress://committee/{committeeCode}'
|
|
|
20
23
|
: 'house';
|
|
21
24
|
const result = await api.getCommittee(chamber, params.committeeCode, ctx);
|
|
22
25
|
ctx.log.info('Committee resource fetched', { committeeCode: params.committeeCode });
|
|
23
|
-
|
|
26
|
+
const history = result.committee.history;
|
|
27
|
+
const name = history?.[0]?.officialName ?? history?.[0]?.libraryOfCongressName ?? null;
|
|
28
|
+
return { name, chamber, ...result.committee };
|
|
24
29
|
},
|
|
25
30
|
});
|
|
26
31
|
//# sourceMappingURL=committee.resource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"committee.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/committee.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,sCAAsC,EAAE;IAChF,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,8EAA8E;IAC3F,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,aAAa,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"committee.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/committee.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,sCAAsC,EAAE;IAChF,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,8EAA8E;IAC3F,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,KAAK,CACJ,sBAAsB,EACtB,gJAAgJ,CACjJ;aACA,QAAQ,CAAC,yCAAyC,CAAC;KACvD,CAAC;IAEF,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,MAAM,GAAG,GAAG,cAAc,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC;YAClD,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC;gBACpC,CAAC,CAAC,OAAO;gBACT,CAAC,CAAC,OAAO,CAAC;QACd,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;QAC1E,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;QACpF,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,OAEpB,CAAC;QACd,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,qBAAqB,IAAI,IAAI,CAAC;QACvF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAChD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -16,7 +16,7 @@ export const currentCongressResource = resource('congress://current', {
|
|
|
16
16
|
async handler(_params, ctx) {
|
|
17
17
|
const api = getCongressApi();
|
|
18
18
|
const congress = await api.getCurrentCongress(ctx);
|
|
19
|
-
ctx.log.info('Current congress fetched', { congress: congress.
|
|
19
|
+
ctx.log.info('Current congress fetched', { congress: congress.number });
|
|
20
20
|
return congress;
|
|
21
21
|
},
|
|
22
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"current-congress.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/current-congress.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC,oBAAoB,EAAE;IACpE,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,yFAAyF;IAC3F,QAAQ,EAAE,kBAAkB;IAE5B,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACjB,SAAS,EAAE;YACT,EAAE,GAAG,EAAE,oBAAoB,EAAE,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB,EAAE;SACtF;KACF,CAAC;IAEF,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG;QACxB,MAAM,GAAG,GAAG,cAAc,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;QACnD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"current-congress.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/current-congress.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC,oBAAoB,EAAE;IACpE,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,yFAAyF;IAC3F,QAAQ,EAAE,kBAAkB;IAE5B,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACjB,SAAS,EAAE;YACT,EAAE,GAAG,EAAE,oBAAoB,EAAE,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB,EAAE;SACtF;KACF,CAAC;IAEF,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG;QACxB,MAAM,GAAG,GAAG,cAAc,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;QACnD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QACxE,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/member.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGrD,eAAO,MAAM,cAAc;;
|
|
1
|
+
{"version":3,"file":"member.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/member.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGrD,eAAO,MAAM,cAAc;;wCAoBzB,CAAC"}
|
|
@@ -9,7 +9,10 @@ export const memberResource = resource('congress://member/{bioguideId}', {
|
|
|
9
9
|
description: 'Member profile: name, state, party, terms, leadership, office, legislation counts.',
|
|
10
10
|
mimeType: 'application/json',
|
|
11
11
|
params: z.object({
|
|
12
|
-
bioguideId: z
|
|
12
|
+
bioguideId: z
|
|
13
|
+
.string()
|
|
14
|
+
.regex(/^[A-Z]\d{6}$/, 'Bioguide ID must be one uppercase letter followed by 6 digits (e.g., P000197).')
|
|
15
|
+
.describe('Bioguide identifier for the member (e.g., P000197).'),
|
|
13
16
|
}),
|
|
14
17
|
async handler(params, ctx) {
|
|
15
18
|
const api = getCongressApi();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/member.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,gCAAgC,EAAE;IACvE,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,oFAAoF;IACjG,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,UAAU,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"member.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/member.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,gCAAgC,EAAE;IACvE,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,oFAAoF;IACjG,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,KAAK,CACJ,cAAc,EACd,gFAAgF,CACjF;aACA,QAAQ,CAAC,qDAAqD,CAAC;KACnE,CAAC;IAEF,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,MAAM,GAAG,GAAG,cAAc,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAC3D,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;QAC3E,OAAO,MAAM,CAAC,MAAM,CAAC;IACvB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -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;AA4BjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6DA2FzB,CAAC"}
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
* @module mcp-server/tools/definitions/bill-lookup
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
6
7
|
import { formatBills } from '../../../mcp-server/tools/format-helpers.js';
|
|
7
8
|
import { normalizeOptionalString } from '../../../mcp-server/tools/tool-helpers.js';
|
|
8
9
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
9
|
-
|
|
10
|
+
import { BILL_TYPE_CODES } from '../../../services/congress-api/types.js';
|
|
11
|
+
const BillTypeEnum = z.enum(BILL_TYPE_CODES);
|
|
10
12
|
const OperationEnum = z.enum([
|
|
11
13
|
'list',
|
|
12
14
|
'get',
|
|
@@ -63,7 +65,7 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
|
|
|
63
65
|
return result;
|
|
64
66
|
}
|
|
65
67
|
if (!input.billType || !input.billNumber) {
|
|
66
|
-
throw
|
|
68
|
+
throw validationError(`The '${input.operation}' operation requires congress, billType, and billNumber. Use 'list' first to find the bill, then request its ${input.operation}.`, { operation: input.operation, billType: input.billType, billNumber: input.billNumber });
|
|
67
69
|
}
|
|
68
70
|
if (input.operation === 'get') {
|
|
69
71
|
const result = await api.getBill({
|
|
@@ -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;
|
|
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,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,O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AAC,QAAQ;YACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,WAAW;SACZ,CAAC,CAAC;QACH,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;AAUjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;6DA6D5B,CAAC"}
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
* @module mcp-server/tools/definitions/bill-summaries
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
6
7
|
import { formatSummaries } from '../../../mcp-server/tools/format-helpers.js';
|
|
7
8
|
import { normalizeOptionalString } from '../../../mcp-server/tools/tool-helpers.js';
|
|
8
9
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
10
|
+
import { BILL_TYPE_CODES } from '../../../services/congress-api/types.js';
|
|
9
11
|
const DEFAULT_LOOKBACK_MS = 7 * 24 * 60 * 60 * 1000;
|
|
10
12
|
export const billSummariesTool = tool('congressgov_bill_summaries', {
|
|
11
|
-
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
|
|
13
|
+
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, use congressgov_bill_lookup with operation='summaries' instead.`,
|
|
12
14
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
13
15
|
input: z.object({
|
|
14
16
|
congress: z
|
|
@@ -17,10 +19,7 @@ export const billSummariesTool = tool('congressgov_bill_summaries', {
|
|
|
17
19
|
.positive()
|
|
18
20
|
.optional()
|
|
19
21
|
.describe('Congress number. Optional — omit for summaries across all congresses.'),
|
|
20
|
-
billType: z
|
|
21
|
-
.enum(['hr', 's', 'hjres', 'sjres', 'hconres', 'sconres', 'hres', 'sres'])
|
|
22
|
-
.optional()
|
|
23
|
-
.describe("Bill type filter. Requires 'congress'."),
|
|
22
|
+
billType: z.enum(BILL_TYPE_CODES).optional().describe("Bill type filter. Requires 'congress'."),
|
|
24
23
|
fromDateTime: z
|
|
25
24
|
.string()
|
|
26
25
|
.optional()
|
|
@@ -38,7 +37,7 @@ export const billSummariesTool = tool('congressgov_bill_summaries', {
|
|
|
38
37
|
const fromDateTimeInput = normalizeOptionalString(input.fromDateTime);
|
|
39
38
|
const toDateTimeInput = normalizeOptionalString(input.toDateTime);
|
|
40
39
|
if (input.billType && !input.congress) {
|
|
41
|
-
throw
|
|
40
|
+
throw validationError("The 'billType' filter requires 'congress'. Provide both or omit billType to browse across all types.", { field: 'congress', billType: input.billType });
|
|
42
41
|
}
|
|
43
42
|
const fromDateTime = fromDateTimeInput ??
|
|
44
43
|
(!toDateTimeInput
|
|
@@ -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,IAA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Q;YACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,YAAY;YACZ,UAAU,EAAE,eAAe;YAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,EACD,GAAG,CACJ,CAAC;QACF,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAChE,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -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;AAOjD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;6DA6F9B,CAAC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @module mcp-server/tools/definitions/committee-lookup
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
6
7
|
import { formatCommittees } from '../../../mcp-server/tools/format-helpers.js';
|
|
7
8
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
8
9
|
export const committeeLookupTool = tool('congressgov_committee_lookup', {
|
|
@@ -43,7 +44,7 @@ export const committeeLookupTool = tool('congressgov_committee_lookup', {
|
|
|
43
44
|
return result;
|
|
44
45
|
}
|
|
45
46
|
if (!input.chamber || !input.committeeCode) {
|
|
46
|
-
throw
|
|
47
|
+
throw validationError(`The '${input.operation}' operation requires chamber and committeeCode. Use 'list' to discover available committees.`, { operation: input.operation, chamber: input.chamber, committeeCode: input.committeeCode });
|
|
47
48
|
}
|
|
48
49
|
if (input.operation === 'get') {
|
|
49
50
|
const result = await api.getCommittee(input.chamber, input.committeeCode, ctx);
|
|
@@ -51,7 +52,7 @@ export const committeeLookupTool = tool('congressgov_committee_lookup', {
|
|
|
51
52
|
return result;
|
|
52
53
|
}
|
|
53
54
|
if (input.operation === 'nominations' && input.chamber !== 'senate') {
|
|
54
|
-
throw
|
|
55
|
+
throw validationError("Nominations are only referred to Senate committees. Use chamber='senate' or a Senate committee code (s-prefix).", { field: 'chamber', chamber: input.chamber });
|
|
55
56
|
}
|
|
56
57
|
if (input.operation === 'bills' && input.order === 'recent') {
|
|
57
58
|
return fetchCommitteeBillsRecent({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"committee-lookup.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/committee-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"committee-lookup.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/committee-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAGjF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,8BAA8B,EAAE;IACtE,WAAW,EAAE,uaAAua;IACpb,WAAW,EAAE,EAAE,YAAY,EA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T,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE;KACzC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"committee-reports.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/committee-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"committee-reports.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/committee-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAMjD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;6DAqF/B,CAAC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @module mcp-server/tools/definitions/committee-reports
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
6
7
|
import { formatCommitteeReports } from '../../../mcp-server/tools/format-helpers.js';
|
|
7
8
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
8
9
|
export const committeeReportsTool = tool('congressgov_committee_reports', {
|
|
@@ -42,7 +43,11 @@ export const committeeReportsTool = tool('congressgov_committee_reports', {
|
|
|
42
43
|
return result;
|
|
43
44
|
}
|
|
44
45
|
if (!input.reportType || !input.reportNumber) {
|
|
45
|
-
throw
|
|
46
|
+
throw validationError(`The '${input.operation}' operation requires reportType and reportNumber. Use 'list' to browse available reports.`, {
|
|
47
|
+
operation: input.operation,
|
|
48
|
+
reportType: input.reportType,
|
|
49
|
+
reportNumber: input.reportNumber,
|
|
50
|
+
});
|
|
46
51
|
}
|
|
47
52
|
if (input.operation === 'text') {
|
|
48
53
|
const result = await api.getCommitteeReportText({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"committee-reports.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/committee-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"committee-reports.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/committee-reports.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,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,+BAA+B,EAAE;IACxE,WAAW,EAAE,6RAA6R;IAC1S,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;QAC9E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QAClE,UAAU,EAAE,CAAC;aACV,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;aAC9B,QAAQ,EAAE;aACV,QAAQ,CAAC,oDAAoD,CAAC;QACjE,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,GAAG,EAAE;aACL,QAAQ,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AGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"crs-reports.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/crs-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAMjD,eAAO,MAAM,cAAc;;;;;;;;6DAmCzB,CAAC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @module mcp-server/tools/definitions/crs-reports
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
6
7
|
import { formatCrsReports } from '../../../mcp-server/tools/format-helpers.js';
|
|
7
8
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
8
9
|
export const crsReportsTool = tool('congressgov_crs_reports', {
|
|
@@ -27,7 +28,7 @@ export const crsReportsTool = tool('congressgov_crs_reports', {
|
|
|
27
28
|
return result;
|
|
28
29
|
}
|
|
29
30
|
if (!input.reportNumber) {
|
|
30
|
-
throw
|
|
31
|
+
throw validationError("The 'get' operation requires reportNumber. Report IDs use letter-number codes (e.g., R40097). Use 'list' to browse available reports.", { field: 'reportNumber' });
|
|
31
32
|
}
|
|
32
33
|
const result = await api.getCrsReport({ reportNumber: input.reportNumber }, ctx);
|
|
33
34
|
ctx.log.info('CRS report retrieved', { reportNumber: input.reportNumber });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crs-reports.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/crs-reports.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"crs-reports.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/crs-reports.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,GAAG,GAAG,cAAc,EAAE,CAAC;QAE7B,IAAI,KAAK,CAAC,SAAS,KAAK,MAAM,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC;YAC3F,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;YAClE,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;YACxB,MAAM,eAAe,CACnB,uIAAuI,EACvI,EAAE,KAAK,EAAE,cAAc,EAAE,CAC1B,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,EAAE,GAAG,CAAC,CAAC;QACjF,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;QAC3E,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daily-record.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/daily-record.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"daily-record.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/daily-record.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAMjD,eAAO,MAAM,eAAe;;;;;;;;;;6DA0E1B,CAAC"}
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
* @module mcp-server/tools/definitions/daily-record
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
6
7
|
import { formatDailyRecord } from '../../../mcp-server/tools/format-helpers.js';
|
|
7
8
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
8
9
|
export const dailyRecordTool = tool('congressgov_daily_record', {
|
|
9
|
-
description: `Browse the daily Congressional Record — floor speeches, debates, and legislative text published each day Congress is in session. Navigation is hierarchical: list →
|
|
10
|
+
description: `Browse the daily Congressional Record — floor speeches, debates, and legislative text published each day Congress is in session. Navigation is hierarchical: volumes (via 'list') → issues (via 'issues') → articles (via 'articles'). Use 'list' to find recent volumes, 'issues' to see what's in a volume, and 'articles' to access individual speeches and debate sections.`,
|
|
10
11
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
11
12
|
input: z.object({
|
|
12
13
|
operation: z.enum(['list', 'issues', 'articles']).describe('Which data to retrieve.'),
|
|
@@ -35,7 +36,7 @@ export const dailyRecordTool = tool('congressgov_daily_record', {
|
|
|
35
36
|
return result;
|
|
36
37
|
}
|
|
37
38
|
if (!input.volumeNumber) {
|
|
38
|
-
throw
|
|
39
|
+
throw validationError(`The '${input.operation}' operation requires volumeNumber. Use 'list' to browse available Congressional Record volumes.`, { field: 'volumeNumber', operation: input.operation });
|
|
39
40
|
}
|
|
40
41
|
if (input.operation === 'issues') {
|
|
41
42
|
const result = await api.getDailyIssues({
|
|
@@ -47,7 +48,7 @@ export const dailyRecordTool = tool('congressgov_daily_record', {
|
|
|
47
48
|
return result;
|
|
48
49
|
}
|
|
49
50
|
if (!input.issueNumber) {
|
|
50
|
-
throw
|
|
51
|
+
throw validationError("The 'articles' operation requires both volumeNumber and issueNumber. Use 'issues' to see available issues within a volume.", { field: 'issueNumber' });
|
|
51
52
|
}
|
|
52
53
|
const result = await api.getDailyArticles({
|
|
53
54
|
volumeNumber: input.volumeNumber,
|