@cyanheads/congressgov-mcp-server 0.3.11 → 0.3.12
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 +1 -1
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts +1 -18
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.js +2 -42
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts +1 -7
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.js +2 -11
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts +1 -13
- package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/crs-reports.tool.js +1 -36
- package/dist/mcp-server/tools/definitions/crs-reports.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts +1 -8
- package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/member-lookup.tool.js +1 -16
- package/dist/mcp-server/tools/definitions/member-lookup.tool.js.map +1 -1
- package/dist/mcp-server/tools/tool-helpers.d.ts +1 -8
- package/dist/mcp-server/tools/tool-helpers.d.ts.map +1 -1
- package/dist/mcp-server/tools/tool-helpers.js +1 -15
- package/dist/mcp-server/tools/tool-helpers.js.map +1 -1
- 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.3.
|
|
4
|
+
**Version:** 0.3.12
|
|
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/AGENTS.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.12
|
|
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
|
|
|
@@ -33,22 +33,5 @@ export declare const billLookupTool: import("@cyanheads/mcp-ts-core").ToolDefini
|
|
|
33
33
|
toDateTime: z.ZodOptional<z.ZodString>;
|
|
34
34
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
35
35
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
36
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
-
data: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
38
|
-
pagination: z.ZodOptional<z.ZodObject<{
|
|
39
|
-
count: z.ZodNumber;
|
|
40
|
-
nextOffset: z.ZodNullable<z.ZodNumber>;
|
|
41
|
-
}, z.core.$strip>>;
|
|
42
|
-
bill: z.ZodOptional<z.ZodObject<{
|
|
43
|
-
congress: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
44
|
-
type: z.ZodOptional<z.ZodString>;
|
|
45
|
-
number: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
46
|
-
title: z.ZodOptional<z.ZodString>;
|
|
47
|
-
updateDate: z.ZodOptional<z.ZodString>;
|
|
48
|
-
latestAction: z.ZodOptional<z.ZodObject<{
|
|
49
|
-
actionDate: z.ZodOptional<z.ZodString>;
|
|
50
|
-
text: z.ZodOptional<z.ZodString>;
|
|
51
|
-
}, z.core.$loose>>;
|
|
52
|
-
}, z.core.$loose>>;
|
|
53
|
-
}, z.core.$loose>>;
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$loose>>;
|
|
54
37
|
//# sourceMappingURL=bill-lookup.tool.d.ts.map
|
|
@@ -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;AA2BjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDA0FzB,CAAC"}
|
|
@@ -4,35 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { formatBills } from '../../../mcp-server/tools/format-helpers.js';
|
|
7
|
-
import {
|
|
7
|
+
import { normalizeOptionalString } from '../../../mcp-server/tools/tool-helpers.js';
|
|
8
8
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
9
|
-
const PaginationSchema = createPaginationSchema('Total number of matching records.');
|
|
10
|
-
const BillDetailSchema = z
|
|
11
|
-
.object({
|
|
12
|
-
congress: StringOrNumberSchema.optional().describe('Congress number when Congress.gov includes it.'),
|
|
13
|
-
type: z.string().optional().describe('Bill type code when provided by Congress.gov.'),
|
|
14
|
-
number: StringOrNumberSchema.optional().describe('Bill number when provided by Congress.gov.'),
|
|
15
|
-
title: z
|
|
16
|
-
.string()
|
|
17
|
-
.optional()
|
|
18
|
-
.describe('Bill title when provided by Congress.gov. Omitted when unknown.'),
|
|
19
|
-
updateDate: z
|
|
20
|
-
.string()
|
|
21
|
-
.optional()
|
|
22
|
-
.describe('Last update timestamp when provided by Congress.gov.'),
|
|
23
|
-
latestAction: z
|
|
24
|
-
.object({
|
|
25
|
-
actionDate: z
|
|
26
|
-
.string()
|
|
27
|
-
.optional()
|
|
28
|
-
.describe('Latest action date when provided by Congress.gov.'),
|
|
29
|
-
text: z.string().optional().describe('Latest action text when provided by Congress.gov.'),
|
|
30
|
-
})
|
|
31
|
-
.passthrough()
|
|
32
|
-
.optional()
|
|
33
|
-
.describe('Latest action summary when provided by Congress.gov.'),
|
|
34
|
-
})
|
|
35
|
-
.passthrough();
|
|
36
9
|
const BillTypeEnum = z.enum(['hr', 's', 'hjres', 'sjres', 'hconres', 'sconres', 'hres', 'sres']);
|
|
37
10
|
const OperationEnum = z.enum([
|
|
38
11
|
'list',
|
|
@@ -71,20 +44,7 @@ export const billLookupTool = tool('congressgov_bill_lookup', {
|
|
|
71
44
|
limit: z.number().int().min(1).max(250).default(20).describe('Results per page (1-250).'),
|
|
72
45
|
offset: z.number().int().min(0).default(0).describe('Pagination offset.'),
|
|
73
46
|
}),
|
|
74
|
-
output: z
|
|
75
|
-
.object({
|
|
76
|
-
data: z
|
|
77
|
-
.array(z.unknown())
|
|
78
|
-
.optional()
|
|
79
|
-
.describe('List or sub-resource records for list and drill-down operations. Preserves upstream item shapes instead of narrowing them.'),
|
|
80
|
-
pagination: PaginationSchema.optional().describe('Pagination metadata for list and sub-resource operations.'),
|
|
81
|
-
bill: BillDetailSchema.optional().describe('Bill detail for operation="get".'),
|
|
82
|
-
})
|
|
83
|
-
.passthrough()
|
|
84
|
-
.refine((result) => (Array.isArray(result.data) && !!result.pagination) || !!result.bill, {
|
|
85
|
-
message: 'Expected either paginated list data or a bill detail object.',
|
|
86
|
-
})
|
|
87
|
-
.describe('Bill data from Congress.gov API.'),
|
|
47
|
+
output: z.object({}).passthrough().describe('Bill data from Congress.gov API.'),
|
|
88
48
|
format: formatBills,
|
|
89
49
|
async handler(input, ctx) {
|
|
90
50
|
const api = getCongressApi();
|
|
@@ -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;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,
|
|
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;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAGjF,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,E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 -19,11 +19,5 @@ export declare const billSummariesTool: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
19
19
|
toDateTime: z.ZodOptional<z.ZodString>;
|
|
20
20
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
21
21
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
22
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
-
data: z.ZodArray<z.ZodUnknown>;
|
|
24
|
-
pagination: z.ZodObject<{
|
|
25
|
-
count: z.ZodNumber;
|
|
26
|
-
nextOffset: z.ZodNullable<z.ZodNumber>;
|
|
27
|
-
}, z.core.$strip>;
|
|
28
|
-
}, z.core.$loose>>;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$loose>>;
|
|
29
23
|
//# sourceMappingURL=bill-summaries.tool.d.ts.map
|
|
@@ -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;AAQjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;kDA+D5B,CAAC"}
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { formatSummaries } from '../../../mcp-server/tools/format-helpers.js';
|
|
7
|
-
import {
|
|
7
|
+
import { normalizeOptionalString } from '../../../mcp-server/tools/tool-helpers.js';
|
|
8
8
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
9
9
|
const DEFAULT_LOOKBACK_MS = 7 * 24 * 60 * 60 * 1000;
|
|
10
|
-
const PaginationSchema = createPaginationSchema('Total number of matching summaries.');
|
|
11
10
|
export const billSummariesTool = tool('congressgov_bill_summaries', {
|
|
12
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 (lastSummaryUpdateDate), 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.`,
|
|
13
12
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
@@ -33,15 +32,7 @@ export const billSummariesTool = tool('congressgov_bill_summaries', {
|
|
|
33
32
|
limit: z.number().int().min(1).max(250).default(20).describe('Results per page (1-250).'),
|
|
34
33
|
offset: z.number().int().min(0).default(0).describe('Pagination offset.'),
|
|
35
34
|
}),
|
|
36
|
-
output: z
|
|
37
|
-
.object({
|
|
38
|
-
data: z
|
|
39
|
-
.array(z.unknown())
|
|
40
|
-
.describe('Bill summaries returned by Congress.gov. Preserves upstream item shapes instead of narrowing them.'),
|
|
41
|
-
pagination: PaginationSchema.describe('Pagination metadata for the returned summaries.'),
|
|
42
|
-
})
|
|
43
|
-
.passthrough()
|
|
44
|
-
.describe('Bill summary data from Congress.gov API.'),
|
|
35
|
+
output: z.object({}).passthrough().describe('Bill summary data from Congress.gov API.'),
|
|
45
36
|
format: formatSummaries,
|
|
46
37
|
async handler(input, ctx) {
|
|
47
38
|
const fromDateTimeInput = normalizeOptionalString(input.fromDateTime);
|
|
@@ -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;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAs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K,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"}
|
|
@@ -11,17 +11,5 @@ export declare const crsReportsTool: import("@cyanheads/mcp-ts-core").ToolDefini
|
|
|
11
11
|
reportNumber: z.ZodOptional<z.ZodString>;
|
|
12
12
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
13
13
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
14
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
-
data: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
16
|
-
pagination: z.ZodOptional<z.ZodObject<{
|
|
17
|
-
count: z.ZodNumber;
|
|
18
|
-
nextOffset: z.ZodNullable<z.ZodNumber>;
|
|
19
|
-
}, z.core.$strip>>;
|
|
20
|
-
report: z.ZodOptional<z.ZodObject<{
|
|
21
|
-
reportNumber: z.ZodOptional<z.ZodString>;
|
|
22
|
-
title: z.ZodOptional<z.ZodString>;
|
|
23
|
-
summary: z.ZodOptional<z.ZodString>;
|
|
24
|
-
updateDate: z.ZodOptional<z.ZodString>;
|
|
25
|
-
}, z.core.$loose>>;
|
|
26
|
-
}, z.core.$loose>>;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$loose>>;
|
|
27
15
|
//# sourceMappingURL=crs-reports.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAKjD,eAAO,MAAM,cAAc;;;;;;;;kDAkCzB,CAAC"}
|
|
@@ -4,29 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { formatCrsReports } from '../../../mcp-server/tools/format-helpers.js';
|
|
7
|
-
import { createPaginationSchema } from '../../../mcp-server/tools/tool-helpers.js';
|
|
8
7
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
9
|
-
const PaginationSchema = createPaginationSchema('Total number of matching CRS reports.');
|
|
10
|
-
const CrsReportSchema = z
|
|
11
|
-
.object({
|
|
12
|
-
reportNumber: z
|
|
13
|
-
.string()
|
|
14
|
-
.optional()
|
|
15
|
-
.describe('CRS report identifier when provided by Congress.gov.'),
|
|
16
|
-
title: z
|
|
17
|
-
.string()
|
|
18
|
-
.optional()
|
|
19
|
-
.describe('CRS report title when provided by Congress.gov. Omitted when unknown.'),
|
|
20
|
-
summary: z
|
|
21
|
-
.string()
|
|
22
|
-
.optional()
|
|
23
|
-
.describe('CRS report summary when provided by Congress.gov. Omitted when unknown.'),
|
|
24
|
-
updateDate: z
|
|
25
|
-
.string()
|
|
26
|
-
.optional()
|
|
27
|
-
.describe('Last update timestamp when provided by Congress.gov.'),
|
|
28
|
-
})
|
|
29
|
-
.passthrough();
|
|
30
8
|
export const crsReportsTool = tool('congressgov_crs_reports', {
|
|
31
9
|
description: `Browse and retrieve CRS (Congressional Research Service) reports — nonpartisan policy analyses by subject-matter experts at the Library of Congress, covering policy areas, legislative proposals, and legal questions. Report IDs use letter-number codes (e.g., R40097, RL33612, IF12345). Use 'list' to browse available reports or 'get' for full detail (authors, topics, summary, download formats).`,
|
|
32
10
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
@@ -39,20 +17,7 @@ export const crsReportsTool = tool('congressgov_crs_reports', {
|
|
|
39
17
|
limit: z.number().int().min(1).max(250).default(20).describe('Results per page (1-250).'),
|
|
40
18
|
offset: z.number().int().min(0).default(0).describe('Pagination offset.'),
|
|
41
19
|
}),
|
|
42
|
-
output: z
|
|
43
|
-
.object({
|
|
44
|
-
data: z
|
|
45
|
-
.array(z.unknown())
|
|
46
|
-
.optional()
|
|
47
|
-
.describe('CRS report list results when operation="list". Preserves upstream item shapes instead of narrowing them.'),
|
|
48
|
-
pagination: PaginationSchema.optional().describe('Pagination metadata for list results.'),
|
|
49
|
-
report: CrsReportSchema.optional().describe('CRS report detail when operation="get".'),
|
|
50
|
-
})
|
|
51
|
-
.passthrough()
|
|
52
|
-
.refine((result) => (Array.isArray(result.data) && !!result.pagination) || !!result.report, {
|
|
53
|
-
message: 'Expected either paginated list data or a CRS report detail object.',
|
|
54
|
-
})
|
|
55
|
-
.describe('CRS report data from Congress.gov API.'),
|
|
20
|
+
output: z.object({}).passthrough().describe('CRS report data from Congress.gov API.'),
|
|
56
21
|
format: formatCrsReports,
|
|
57
22
|
async handler(input, ctx) {
|
|
58
23
|
const api = getCongressApi();
|
|
@@ -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;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,
|
|
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;A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AK,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,IAAI,KAAK,CACb,uIAAuI,CACxI,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"}
|
|
@@ -17,12 +17,5 @@ export declare const memberLookupTool: import("@cyanheads/mcp-ts-core").ToolDefi
|
|
|
17
17
|
currentMember: z.ZodOptional<z.ZodBoolean>;
|
|
18
18
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
19
19
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
20
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
-
data: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
22
|
-
pagination: z.ZodOptional<z.ZodObject<{
|
|
23
|
-
count: z.ZodNumber;
|
|
24
|
-
nextOffset: z.ZodNullable<z.ZodNumber>;
|
|
25
|
-
}, z.core.$strip>>;
|
|
26
|
-
member: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
27
|
-
}, z.core.$loose>>;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$loose>>;
|
|
28
21
|
//# sourceMappingURL=member-lookup.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member-lookup.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/member-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"member-lookup.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/member-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAKjD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;kDA+F3B,CAAC"}
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { formatMembers } from '../../../mcp-server/tools/format-helpers.js';
|
|
7
|
-
import { createPaginationSchema, UnknownRecordSchema } from '../../../mcp-server/tools/tool-helpers.js';
|
|
8
7
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
9
|
-
const PaginationSchema = createPaginationSchema('Total number of matching members or bills.');
|
|
10
8
|
export const memberLookupTool = tool('congressgov_member_lookup', {
|
|
11
9
|
description: `Discover congressional members and their legislative activity. There is no name search — use 'list' with stateCode (optionally with district), with a congress number, or with currentMember=true to find members. Once you have a bioguideId, use 'get' for full profile or 'sponsored'/'cosponsored' for their legislative portfolio.`,
|
|
12
10
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
@@ -37,20 +35,7 @@ export const memberLookupTool = tool('congressgov_member_lookup', {
|
|
|
37
35
|
limit: z.number().int().min(1).max(250).default(20).describe('Results per page (1-250).'),
|
|
38
36
|
offset: z.number().int().min(0).default(0).describe('Pagination offset.'),
|
|
39
37
|
}),
|
|
40
|
-
output: z
|
|
41
|
-
.object({
|
|
42
|
-
data: z
|
|
43
|
-
.array(z.unknown())
|
|
44
|
-
.optional()
|
|
45
|
-
.describe('Paginated member or legislation results. Preserves upstream item shapes.'),
|
|
46
|
-
pagination: PaginationSchema.optional().describe('Pagination metadata for list, sponsored, and cosponsored operations.'),
|
|
47
|
-
member: UnknownRecordSchema.optional().describe('Member profile detail when operation="get".'),
|
|
48
|
-
})
|
|
49
|
-
.passthrough()
|
|
50
|
-
.refine((result) => (Array.isArray(result.data) && !!result.pagination) || !!result.member, {
|
|
51
|
-
message: 'Expected either paginated list data or a member detail object.',
|
|
52
|
-
})
|
|
53
|
-
.describe('Member data from Congress.gov API.'),
|
|
38
|
+
output: z.object({}).passthrough().describe('Member data from Congress.gov API.'),
|
|
54
39
|
format: formatMembers,
|
|
55
40
|
async handler(input, ctx) {
|
|
56
41
|
const api = getCongressApi();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member-lookup.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/member-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"member-lookup.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/member-lookup.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,2BAA2B,EAAE;IAChE,WAAW,EAAE,yUAAyU;IACtV,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAA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E,GAAG,CAAC,CAAC;YAC1D,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;YACnE,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,MAAM,IAAI,GACR,KAAK,CAAC,SAAS,KAAK,WAAW,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,yBAAyB,CAAC;QACxF,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,oBAAoB,CAC3C;YACE,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,IAAI;YACJ,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,EACD,GAAG,CACJ,CAAC;QACF,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,8BAA8B,EAAE;YAC3C,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,IAAI,EAAE,KAAK,CAAC,SAAS;SACtB,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Shared
|
|
2
|
+
* @fileoverview Shared utilities for Congress.gov tool definitions.
|
|
3
3
|
* @module mcp-server/tools/tool-helpers
|
|
4
4
|
*/
|
|
5
|
-
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
-
export declare const StringOrNumberSchema: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
7
|
-
export declare const UnknownRecordSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
8
|
-
export declare function createPaginationSchema(countDescription: string): z.ZodObject<{
|
|
9
|
-
count: z.ZodNumber;
|
|
10
|
-
nextOffset: z.ZodNullable<z.ZodNumber>;
|
|
11
|
-
}, z.core.$strip>;
|
|
12
5
|
export declare function normalizeOptionalString(value: string | undefined): string | undefined;
|
|
13
6
|
//# sourceMappingURL=tool-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-helpers.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/tool-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,
|
|
1
|
+
{"version":3,"file":"tool-helpers.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/tool-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGrF"}
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Shared
|
|
2
|
+
* @fileoverview Shared utilities for Congress.gov tool definitions.
|
|
3
3
|
* @module mcp-server/tools/tool-helpers
|
|
4
4
|
*/
|
|
5
|
-
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
-
export const StringOrNumberSchema = z.union([z.number(), z.string()]);
|
|
7
|
-
export const UnknownRecordSchema = z.record(z.string(), z.unknown());
|
|
8
|
-
export function createPaginationSchema(countDescription) {
|
|
9
|
-
return z.object({
|
|
10
|
-
count: z.number().int().nonnegative().describe(countDescription),
|
|
11
|
-
nextOffset: z
|
|
12
|
-
.number()
|
|
13
|
-
.int()
|
|
14
|
-
.nonnegative()
|
|
15
|
-
.nullable()
|
|
16
|
-
.describe('Offset to request the next page, or null when there is no next page.'),
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
5
|
export function normalizeOptionalString(value) {
|
|
20
6
|
const normalized = value?.trim();
|
|
21
7
|
return normalized || undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-helpers.js","sourceRoot":"","sources":["../../../src/mcp-server/tools/tool-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,
|
|
1
|
+
{"version":3,"file":"tool-helpers.js","sourceRoot":"","sources":["../../../src/mcp-server/tools/tool-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,uBAAuB,CAAC,KAAyB;IAC/D,MAAM,UAAU,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;IACjC,OAAO,UAAU,IAAI,SAAS,CAAC;AACjC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/congressgov-mcp-server",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "Access U.S. congressional data - bills, votes, members, committees - through MCP. STDIO & Streamable HTTP.",
|
|
5
5
|
"mcpName": "io.github.cyanheads/congressgov-mcp-server",
|
|
6
6
|
"type": "module",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@cyanheads/mcp-ts-core": "^0.
|
|
68
|
+
"@cyanheads/mcp-ts-core": "^0.5.2",
|
|
69
69
|
"pino-pretty": "^13.1.3"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
package/server.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/cyanheads/congressgov-mcp-server",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.12",
|
|
10
10
|
"remotes": [
|
|
11
11
|
{
|
|
12
12
|
"type": "streamable-http",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
20
20
|
"identifier": "@cyanheads/congressgov-mcp-server",
|
|
21
21
|
"runtimeHint": "bun",
|
|
22
|
-
"version": "0.3.
|
|
22
|
+
"version": "0.3.12",
|
|
23
23
|
"packageArguments": [
|
|
24
24
|
{
|
|
25
25
|
"type": "positional",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
55
55
|
"identifier": "@cyanheads/congressgov-mcp-server",
|
|
56
56
|
"runtimeHint": "bun",
|
|
57
|
-
"version": "0.3.
|
|
57
|
+
"version": "0.3.12",
|
|
58
58
|
"packageArguments": [
|
|
59
59
|
{
|
|
60
60
|
"type": "positional",
|