@cyanheads/congressgov-mcp-server 0.3.18 → 0.3.19
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 +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +5 -3
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts +4 -0
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.js +11 -3
- package/dist/mcp-server/tools/definitions/bill-lookup.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 +24 -9
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/enacted-laws.tool.js +1 -1
- package/dist/mcp-server/tools/definitions/enacted-laws.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts +4 -0
- package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/roll-votes.tool.js +45 -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 +20 -5
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.js.map +1 -1
- package/dist/mcp-server/tools/format-helpers.d.ts +2 -2
- package/dist/mcp-server/tools/format-helpers.d.ts.map +1 -1
- package/dist/mcp-server/tools/format-helpers.js +437 -27
- package/dist/mcp-server/tools/format-helpers.js.map +1 -1
- package/dist/services/congress-api/congress-api-service.d.ts.map +1 -1
- package/dist/services/congress-api/congress-api-service.js +64 -13
- package/dist/services/congress-api/congress-api-service.js.map +1 -1
- package/dist/services/congress-api/types.d.ts +1 -0
- package/dist/services/congress-api/types.d.ts.map +1 -1
- package/package.json +1 -1
- 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.19
|
|
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.
|
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.19
|
|
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.
|
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
|
|
|
@@ -42,8 +42,9 @@ Ten read-only tools for querying U.S. legislative data:
|
|
|
42
42
|
|
|
43
43
|
Browse and retrieve U.S. legislative bill data from Congress.gov.
|
|
44
44
|
|
|
45
|
-
- Filter by congress number, bill type, and date range
|
|
45
|
+
- Filter by congress number, bill type, and update-date range
|
|
46
46
|
- Retrieve detailed sub-resources: actions, amendments, committees, cosponsors, related bills, subjects, summaries, text versions, and titles
|
|
47
|
+
- `list` defaults to `order='recent'` (newest update-date first); pass `order='oldest'` for ascending
|
|
47
48
|
- Pagination support for browsing large result sets
|
|
48
49
|
|
|
49
50
|
---
|
|
@@ -64,7 +65,7 @@ Browse congressional committees and their legislation, reports, and nominations.
|
|
|
64
65
|
|
|
65
66
|
- Filter by chamber (House, Senate, Joint)
|
|
66
67
|
- Retrieve committee bills, reports, and nominations
|
|
67
|
-
-
|
|
68
|
+
- Detail and sub-resource lookups need only `committeeCode` — `chamber` is auto-detected from the code
|
|
68
69
|
- Committee bills default to `order='recent'` (newest-first); pass `order='oldest'` for ascending update-date order
|
|
69
70
|
|
|
70
71
|
---
|
|
@@ -75,6 +76,7 @@ Retrieve House roll call vote data and individual member voting positions.
|
|
|
75
76
|
|
|
76
77
|
- Browse roll call votes by congress and session
|
|
77
78
|
- Retrieve individual member voting positions per roll call
|
|
79
|
+
- `list` defaults to `order='recent'` (newest update-date first); pass `order='oldest'` for ascending
|
|
78
80
|
|
|
79
81
|
---
|
|
80
82
|
|
|
@@ -31,6 +31,10 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
|
|
|
31
31
|
billNumber: z.ZodOptional<z.ZodNumber>;
|
|
32
32
|
fromDateTime: z.ZodOptional<z.ZodString>;
|
|
33
33
|
toDateTime: z.ZodOptional<z.ZodString>;
|
|
34
|
+
order: z.ZodDefault<z.ZodEnum<{
|
|
35
|
+
recent: "recent";
|
|
36
|
+
oldest: "oldest";
|
|
37
|
+
}>>;
|
|
34
38
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
35
39
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
36
40
|
}, z.core.$strip>, z.ZodObject<{}, z.core.$loose>, undefined>;
|
|
@@ -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;AA4BjD,eAAO,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6DAuGzB,CAAC"}
|
|
@@ -26,7 +26,7 @@ const SUB_RESOURCE_MAP = {
|
|
|
26
26
|
related: 'relatedbills',
|
|
27
27
|
};
|
|
28
28
|
export const billLookupTool = tool('congressgov_bill_lookup', {
|
|
29
|
-
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), '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).`,
|
|
29
|
+
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).`,
|
|
30
30
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
31
31
|
input: z.object({
|
|
32
32
|
operation: OperationEnum.describe('Which data to retrieve.'),
|
|
@@ -41,8 +41,15 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
|
|
|
41
41
|
fromDateTime: z
|
|
42
42
|
.string()
|
|
43
43
|
.optional()
|
|
44
|
-
.describe(
|
|
45
|
-
toDateTime: z
|
|
44
|
+
.describe("Start of date range filter (ISO 8601). Filters by the bill's update date — when Congress.gov last touched the record — not by the bill's latest legislative action."),
|
|
45
|
+
toDateTime: z
|
|
46
|
+
.string()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe('End of date range filter (ISO 8601). Same field semantics as fromDateTime.'),
|
|
49
|
+
order: z
|
|
50
|
+
.enum(['recent', 'oldest'])
|
|
51
|
+
.default('recent')
|
|
52
|
+
.describe("Sort order for 'list' (sorts by update date). 'recent' (default) is newest first; 'oldest' is ascending. Ignored by other operations."),
|
|
46
53
|
limit: z.number().int().min(1).max(250).default(20).describe('Results per page (1-250).'),
|
|
47
54
|
offset: z.number().int().min(0).default(0).describe('Pagination offset.'),
|
|
48
55
|
}),
|
|
@@ -58,6 +65,7 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
|
|
|
58
65
|
billType: input.billType,
|
|
59
66
|
fromDateTime,
|
|
60
67
|
toDateTime,
|
|
68
|
+
sort: input.order === 'oldest' ? 'updateDate asc' : 'updateDate desc',
|
|
61
69
|
limit: input.limit,
|
|
62
70
|
offset: input.offset,
|
|
63
71
|
}, ctx);
|
|
@@ -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,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,eAAe,EAAwB,MAAM,kCAAkC,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.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;AAgBjD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;6DAuG9B,CAAC"}
|
|
@@ -6,8 +6,19 @@ import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
|
6
6
|
import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
7
7
|
import { formatCommittees } from '../../../mcp-server/tools/format-helpers.js';
|
|
8
8
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
9
|
+
/** Committee codes carry chamber in the first letter (h=House, s=Senate, j=Joint). */
|
|
10
|
+
function inferChamberFromCode(code) {
|
|
11
|
+
const first = code[0]?.toLowerCase();
|
|
12
|
+
if (first === 's')
|
|
13
|
+
return 'senate';
|
|
14
|
+
if (first === 'j')
|
|
15
|
+
return 'joint';
|
|
16
|
+
if (first === 'h')
|
|
17
|
+
return 'house';
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
9
20
|
export const committeeLookupTool = tool('congressgov_committee_lookup', {
|
|
10
|
-
description: `Browse congressional committees and their legislation, reports, and nominations. Committee codes follow the pattern chamber-prefix (h/s/j) + abbreviation + number — use 'list' to discover codes, then 'get' or drill into 'bills', 'reports', or 'nominations' ('nominations' is Senate-only). The 'bills' sub-resource defaults to 'recent' order (newest update-date first); pass order='oldest' for ascending update-date order.`,
|
|
21
|
+
description: `Browse congressional committees and their legislation, reports, and nominations. Committee codes follow the pattern chamber-prefix (h/s/j) + abbreviation + number — use 'list' to discover codes, then 'get' or drill into 'bills', 'reports', or 'nominations' ('nominations' is Senate-only). 'get' and sub-resources only need committeeCode (chamber is inferred from the prefix); pass chamber explicitly to override. The 'bills' sub-resource defaults to 'recent' order (newest update-date first); pass order='oldest' for ascending update-date order.`,
|
|
11
22
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
12
23
|
input: z.object({
|
|
13
24
|
operation: z
|
|
@@ -17,7 +28,7 @@ export const committeeLookupTool = tool('congressgov_committee_lookup', {
|
|
|
17
28
|
chamber: z
|
|
18
29
|
.enum(['house', 'senate', 'joint'])
|
|
19
30
|
.optional()
|
|
20
|
-
.describe("Chamber filter
|
|
31
|
+
.describe("Chamber filter for 'list', or override for 'get' and sub-resources (otherwise inferred from committeeCode prefix)."),
|
|
21
32
|
committeeCode: z
|
|
22
33
|
.string()
|
|
23
34
|
.optional()
|
|
@@ -43,27 +54,31 @@ export const committeeLookupTool = tool('congressgov_committee_lookup', {
|
|
|
43
54
|
ctx.log.info('Committees listed', { count: result.data.length });
|
|
44
55
|
return result;
|
|
45
56
|
}
|
|
46
|
-
if (!input.
|
|
47
|
-
throw validationError(`The '${input.operation}' operation requires
|
|
57
|
+
if (!input.committeeCode) {
|
|
58
|
+
throw validationError(`The '${input.operation}' operation requires committeeCode. Use 'list' to discover available committees.`, { operation: input.operation, committeeCode: input.committeeCode });
|
|
59
|
+
}
|
|
60
|
+
const chamber = input.chamber ?? inferChamberFromCode(input.committeeCode);
|
|
61
|
+
if (!chamber) {
|
|
62
|
+
throw validationError(`Could not infer chamber from committeeCode '${input.committeeCode}'. Pass chamber explicitly ('house', 'senate', or 'joint').`, { field: 'committeeCode', committeeCode: input.committeeCode });
|
|
48
63
|
}
|
|
49
64
|
if (input.operation === 'get') {
|
|
50
|
-
const result = await api.getCommittee(
|
|
65
|
+
const result = await api.getCommittee(chamber, input.committeeCode, ctx);
|
|
51
66
|
ctx.log.info('Committee retrieved', { committeeCode: input.committeeCode });
|
|
52
67
|
return result;
|
|
53
68
|
}
|
|
54
|
-
if (input.operation === 'nominations' &&
|
|
55
|
-
throw validationError("Nominations are only referred to Senate committees. Use chamber='senate' or a Senate committee code (s-prefix).", { field: 'chamber', chamber
|
|
69
|
+
if (input.operation === 'nominations' && chamber !== 'senate') {
|
|
70
|
+
throw validationError("Nominations are only referred to Senate committees. Use chamber='senate' or a Senate committee code (s-prefix).", { field: 'chamber', chamber });
|
|
56
71
|
}
|
|
57
72
|
if (input.operation === 'bills' && input.order === 'recent') {
|
|
58
73
|
return fetchCommitteeBillsRecent({
|
|
59
|
-
chamber
|
|
74
|
+
chamber,
|
|
60
75
|
committeeCode: input.committeeCode,
|
|
61
76
|
limit: input.limit,
|
|
62
77
|
offset: input.offset,
|
|
63
78
|
}, ctx);
|
|
64
79
|
}
|
|
65
80
|
const result = await api.getCommitteeSubResource({
|
|
66
|
-
chamber
|
|
81
|
+
chamber,
|
|
67
82
|
committeeCode: input.committeeCode,
|
|
68
83
|
subResource: input.operation,
|
|
69
84
|
limit: input.limit,
|
|
@@ -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;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,
|
|
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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MAAM,CAAC,MAAM,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,uBAAuB,CAC9C;QACE,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,WAAW,EAAE,OAAO;QACpB,KAAK,EAAE,cAAc;QACrB,MAAM,EAAE,SAAS;KAClB,EACD,GAAG,CACJ,CAAC;IAEF,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IAC5C,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,GAAG,cAAc,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;IAElG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,0CAA0C,EAAE;QACvD,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,KAAK;QACL,QAAQ,EAAE,QAAQ,CAAC,MAAM;QACzB,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,MAAM;QACT,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE;KACzC,CAAC;AACJ,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
|
7
7
|
import { formatLaws } from '../../../mcp-server/tools/format-helpers.js';
|
|
8
8
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
9
9
|
export const enactedLawsTool = tool('congressgov_enacted_laws', {
|
|
10
|
-
description: `Browse enacted public and private laws from Congress.gov.
|
|
10
|
+
description: `Browse enacted public and private laws from Congress.gov. 'list' is the primary value — it filters bills by enactment status and law type ('pub' or 'priv'), which 'bill_lookup' cannot. 'get' is provided for symmetry but returns the same payload as 'bill_lookup' with operation='get' on the origin bill (the upstream /law endpoint mirrors /bill); prefer 'bill_lookup' as canonical for detail. The 'laws' array on the origin bill carries the public/private law citation (e.g. {"number":"118-2","type":"Public Law"}).`,
|
|
11
11
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
12
12
|
input: z.object({
|
|
13
13
|
operation: z.enum(['list', 'get']).describe('Which data to retrieve.'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enacted-laws.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/enacted-laws.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,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,0BAA0B,EAAE;IAC9D,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"enacted-laws.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/enacted-laws.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,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,0BAA0B,EAAE;IAC9D,WAAW,EAAE,ogBAAogB;IACjhB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,S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AC,OAAO;gBACtB,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB,EACD,GAAG,CACJ,CAAC;YACF,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;YACrF,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;YACvC,MAAM,eAAe,CACnB,8GAA8G,EAC9G,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CACvD,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,CAC7B;YACE,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,SAAS,EAAE,KAAK,CAAC,SAAS;SAC3B,EACD,GAAG,CACJ,CAAC;QACF,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE;YAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,SAAS,EAAE,KAAK,CAAC,SAAS;SAC3B,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -12,6 +12,10 @@ export declare const rollVotesTool: import("@cyanheads/mcp-ts-core").ToolDefinit
|
|
|
12
12
|
congress: z.ZodNumber;
|
|
13
13
|
session: z.ZodNumber;
|
|
14
14
|
voteNumber: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
order: z.ZodDefault<z.ZodEnum<{
|
|
16
|
+
recent: "recent";
|
|
17
|
+
oldest: "oldest";
|
|
18
|
+
}>>;
|
|
15
19
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
16
20
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
17
21
|
}, z.core.$strip>, z.ZodObject<{}, z.core.$loose>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roll-votes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/roll-votes.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"roll-votes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/roll-votes.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAMjD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;6DAiFxB,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
|
7
7
|
import { formatVotes } from '../../../mcp-server/tools/format-helpers.js';
|
|
8
8
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
9
9
|
export const rollVotesTool = tool('congressgov_roll_votes', {
|
|
10
|
-
description: `Retrieve House roll call vote data and individual member voting positions — House-only, as Senate vote data is not yet in the Congress.gov API. Use 'list' to find votes by congress and session, 'get' for vote details (question, result, associated bill), or 'members' for how each representative voted.`,
|
|
10
|
+
description: `Retrieve House roll call vote data and individual member voting positions — House-only, as Senate vote data is not yet in the Congress.gov API. Use 'list' to find votes by congress and session (defaults to most-recently-updated first), 'get' for vote details (question, result, associated bill), or 'members' for how each representative voted.`,
|
|
11
11
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
12
12
|
input: z.object({
|
|
13
13
|
operation: z.enum(['list', 'get', 'members']).describe('Which data to retrieve.'),
|
|
@@ -24,6 +24,10 @@ export const rollVotesTool = tool('congressgov_roll_votes', {
|
|
|
24
24
|
.positive()
|
|
25
25
|
.optional()
|
|
26
26
|
.describe("Roll call vote number. Required for 'get' and 'members'."),
|
|
27
|
+
order: z
|
|
28
|
+
.enum(['recent', 'oldest'])
|
|
29
|
+
.default('recent')
|
|
30
|
+
.describe("Sort order for 'list' (sorts by update date). 'recent' (default) is newest first; 'oldest' is ascending. The upstream API ignores sort params on this endpoint, so 'recent' is implemented client-side by fetching the tail and reversing. Ignored by 'get' and 'members'."),
|
|
27
31
|
limit: z.number().int().min(1).max(250).default(20).describe('Results per page (1-250).'),
|
|
28
32
|
offset: z.number().int().min(0).default(0).describe('Pagination offset.'),
|
|
29
33
|
}),
|
|
@@ -32,6 +36,14 @@ export const rollVotesTool = tool('congressgov_roll_votes', {
|
|
|
32
36
|
async handler(input, ctx) {
|
|
33
37
|
const api = getCongressApi();
|
|
34
38
|
if (input.operation === 'list') {
|
|
39
|
+
if (input.order === 'recent') {
|
|
40
|
+
return fetchVotesRecent({
|
|
41
|
+
congress: input.congress,
|
|
42
|
+
session: input.session,
|
|
43
|
+
limit: input.limit,
|
|
44
|
+
offset: input.offset,
|
|
45
|
+
}, ctx);
|
|
46
|
+
}
|
|
35
47
|
const result = await api.listVotes({
|
|
36
48
|
congress: input.congress,
|
|
37
49
|
session: input.session,
|
|
@@ -59,4 +71,36 @@ export const rollVotesTool = tool('congressgov_roll_votes', {
|
|
|
59
71
|
return result;
|
|
60
72
|
},
|
|
61
73
|
});
|
|
74
|
+
/**
|
|
75
|
+
* Fetch roll call votes in newest-first order. The /house-vote/{c}/{s} endpoint
|
|
76
|
+
* returns rows in an opaque order and ignores sort params, so probe the total
|
|
77
|
+
* count, fetch the tail, and reverse client-side. `offset` is interpreted in
|
|
78
|
+
* the reversed (recent) view — offset=0 always returns the most recent page.
|
|
79
|
+
*/
|
|
80
|
+
async function fetchVotesRecent(params, ctx) {
|
|
81
|
+
const api = getCongressApi();
|
|
82
|
+
const probe = await api.listVotes({ congress: params.congress, session: params.session, limit: 1, offset: 0 }, ctx);
|
|
83
|
+
const total = probe.pagination.count;
|
|
84
|
+
if (total === 0 || params.offset >= total) {
|
|
85
|
+
return { data: [], pagination: { count: total, nextOffset: null } };
|
|
86
|
+
}
|
|
87
|
+
const absOffset = Math.max(0, total - params.offset - params.limit);
|
|
88
|
+
const effectiveLimit = Math.min(params.limit, total - params.offset);
|
|
89
|
+
const result = await api.listVotes({
|
|
90
|
+
congress: params.congress,
|
|
91
|
+
session: params.session,
|
|
92
|
+
limit: effectiveLimit,
|
|
93
|
+
offset: absOffset,
|
|
94
|
+
}, ctx);
|
|
95
|
+
const reversed = [...result.data].reverse();
|
|
96
|
+
const nextOffset = params.offset + effectiveLimit < total ? params.offset + effectiveLimit : null;
|
|
97
|
+
ctx.log.info('Votes listed (recent order)', {
|
|
98
|
+
congress: params.congress,
|
|
99
|
+
session: params.session,
|
|
100
|
+
total,
|
|
101
|
+
returned: reversed.length,
|
|
102
|
+
offset: params.offset,
|
|
103
|
+
});
|
|
104
|
+
return { ...result, data: reversed, pagination: { count: total, nextOffset } };
|
|
105
|
+
}
|
|
62
106
|
//# sourceMappingURL=roll-votes.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roll-votes.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/roll-votes.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"roll-votes.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/roll-votes.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,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,wBAAwB,EAAE;IAC1D,WAAW,EAAE,yVAAyV;IACtW,WAAW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AAC,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,SAAS,CAChC;QACE,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK,EAAE,cAAc;QACrB,MAAM,EAAE,SAAS;KAClB,EACD,GAAG,CACJ,CAAC;IACF,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IAC5C,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,GAAG,cAAc,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;IAClG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,6BAA6B,EAAE;QAC1C,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK;QACL,QAAQ,EAAE,QAAQ,CAAC,MAAM;QACzB,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC;AACjF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"senate-nominations.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/senate-nominations.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAMjD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"senate-nominations.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/senate-nominations.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAMjD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;6DAyGhC,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
|
7
7
|
import { formatNominations } from '../../../mcp-server/tools/format-helpers.js';
|
|
8
8
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
9
9
|
export const senateNominationsTool = tool('congressgov_senate_nominations', {
|
|
10
|
-
description: `Browse presidential nominations to federal positions and track the Senate confirmation process. Use 'list' to browse, 'get' for nomination detail, 'actions'/'committees'/'hearings' for confirmation pipeline data, or 'nominees' to retrieve individual appointees in a multi-nominee batch. Nominations use 'PN' (Presidential Nomination) numbering
|
|
10
|
+
description: `Browse presidential nominations to federal positions and track the Senate confirmation process. Use 'list' to browse, 'get' for nomination detail, 'actions'/'committees'/'hearings' for confirmation pipeline data, or 'nominees' to retrieve individual appointees in a multi-nominee batch. Nominations use 'PN' (Presidential Nomination) numbering. Most nominations carry confirmation activity on the parent (e.g., PN1000); multi-part parents (e.g., PN851) carry no activity of their own — their actions, committees, hearings, and nominees live on partitioned children (PN851-1, PN851-2, …). 'get' on a parent that has no \`nominees\` array signals the partitioned form is needed for everything below it.`,
|
|
11
11
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
12
12
|
input: z.object({
|
|
13
13
|
operation: z
|
|
@@ -17,13 +17,13 @@ export const senateNominationsTool = tool('congressgov_senate_nominations', {
|
|
|
17
17
|
nominationNumber: z
|
|
18
18
|
.string()
|
|
19
19
|
.optional()
|
|
20
|
-
.describe("Nomination number (e.g
|
|
20
|
+
.describe("Nomination number. Use the bare form (e.g. '1000') for nominations whose activity sits on the parent; use the partitioned form (e.g. '851-1') for sub-resources of a multi-part nomination. Required for detail operations."),
|
|
21
21
|
ordinal: z
|
|
22
22
|
.number()
|
|
23
23
|
.int()
|
|
24
24
|
.positive()
|
|
25
25
|
.optional()
|
|
26
|
-
.describe("Batch ordinal within a multi-nominee nomination. Each ordinal addresses a group of nominees; the 'nominees' operation returns every individual in that batch. Use 'get' first to see available ordinals on the nomination's `nominees` array."),
|
|
26
|
+
.describe("Batch ordinal within a multi-nominee nomination. Each ordinal addresses a group of nominees; the 'nominees' operation returns every individual in that batch. Use 'get' first to see available ordinals on the nomination's `nominees` array (multi-part parents have no nominees array — use a partitioned form like '851-1' instead)."),
|
|
27
27
|
limit: z.number().int().min(1).max(250).default(20).describe('Results per page (1-250).'),
|
|
28
28
|
offset: z.number().int().min(0).default(0).describe('Pagination offset.'),
|
|
29
29
|
}),
|
|
@@ -67,7 +67,7 @@ export const senateNominationsTool = tool('congressgov_senate_nominations', {
|
|
|
67
67
|
nominationNumber: input.nominationNumber,
|
|
68
68
|
ordinal: input.ordinal,
|
|
69
69
|
});
|
|
70
|
-
return result;
|
|
70
|
+
return withParentFormHint(result, input.nominationNumber);
|
|
71
71
|
}
|
|
72
72
|
const result = await api.getNominationSubResource({
|
|
73
73
|
congress: input.congress,
|
|
@@ -81,7 +81,22 @@ export const senateNominationsTool = tool('congressgov_senate_nominations', {
|
|
|
81
81
|
nominationNumber: input.nominationNumber,
|
|
82
82
|
subResource: input.operation,
|
|
83
83
|
});
|
|
84
|
-
return result;
|
|
84
|
+
return withParentFormHint(result, input.nominationNumber);
|
|
85
85
|
},
|
|
86
86
|
});
|
|
87
|
+
/**
|
|
88
|
+
* Sub-resource calls (actions/committees/hearings/nominees) against a bare
|
|
89
|
+
* parent number (e.g. '851') silently return 0 results when the nomination is
|
|
90
|
+
* a multi-part parent — those sub-resources live on the partitioned children.
|
|
91
|
+
* Attach a hint the formatter can render so callers know to try the partitioned
|
|
92
|
+
* form.
|
|
93
|
+
*/
|
|
94
|
+
function withParentFormHint(result, nominationNumber) {
|
|
95
|
+
if (result.data.length > 0 || nominationNumber.includes('-'))
|
|
96
|
+
return result;
|
|
97
|
+
return {
|
|
98
|
+
...result,
|
|
99
|
+
emptyHint: `If \`${nominationNumber}\` is a multi-part parent, its actions/committees/hearings/nominees live on the partitioned children. Try \`${nominationNumber}-1\` (and -2, -3, …) instead.`,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
87
102
|
//# sourceMappingURL=senate-nominations.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"senate-nominations.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/senate-nominations.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,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,gCAAgC,EAAE;IAC1E,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"senate-nominations.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/senate-nominations.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,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,gCAAgC,EAAE;IAC1E,WAAW,EAAE,8rBAA8rB;IAC3sB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,E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, unknown>): Text
|
|
|
32
32
|
/** Enacted public and private laws. */
|
|
33
33
|
export declare const formatLaws: (result: Record<string, unknown>) => TextBlock[];
|
|
34
34
|
/** House roll call votes and member voting positions. */
|
|
35
|
-
export declare
|
|
35
|
+
export declare function formatVotes(result: Record<string, unknown>): TextBlock[];
|
|
36
36
|
/** Presidential nominations and Senate confirmation pipeline. */
|
|
37
|
-
export declare
|
|
37
|
+
export declare function formatNominations(result: Record<string, unknown>): TextBlock[];
|
|
38
38
|
export {};
|
|
39
39
|
//# sourceMappingURL=format-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-helpers.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/format-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,KAAK,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"format-helpers.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/format-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,KAAK,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AA66BhD,sFAAsF;AACtF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAAE,CAUxE;AAqCD,2DAA2D;AAC3D,eAAO,MAAM,eAAe,WA3DhB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,SAAS,EA2DkB,CAAC;AAEpE,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAAE,CAoB1E;AAWD,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,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