@cyanheads/congressgov-mcp-server 0.7.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +20 -14
- package/CLAUDE.md +20 -14
- package/Dockerfile +80 -48
- package/README.md +13 -7
- package/changelog/0.7.x/0.7.4.md +31 -0
- package/changelog/0.8.x/0.8.0.md +25 -0
- package/dist/config/server-config.js +1 -1
- package/dist/config/server-config.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts +21 -8
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.js +9 -5
- package/dist/mcp-server/tools/definitions/bill-lookup.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts +9 -2
- package/dist/mcp-server/tools/definitions/bill-summaries.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.d.ts +9 -2
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.js +12 -15
- package/dist/mcp-server/tools/definitions/committee-lookup.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts +17 -4
- package/dist/mcp-server/tools/definitions/committee-reports.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/committee-reports.tool.js +5 -3
- package/dist/mcp-server/tools/definitions/committee-reports.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts +15 -2
- package/dist/mcp-server/tools/definitions/crs-reports.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/crs-reports.tool.js +6 -2
- package/dist/mcp-server/tools/definitions/crs-reports.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts +17 -4
- package/dist/mcp-server/tools/definitions/daily-record.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/daily-record.tool.js +5 -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 +9 -2
- package/dist/mcp-server/tools/definitions/enacted-laws.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts +9 -2
- package/dist/mcp-server/tools/definitions/member-lookup.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts +15 -2
- package/dist/mcp-server/tools/definitions/roll-votes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/roll-votes.tool.js +5 -2
- package/dist/mcp-server/tools/definitions/roll-votes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.d.ts +15 -2
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.js +5 -2
- package/dist/mcp-server/tools/definitions/senate-nominations.tool.js.map +1 -1
- package/dist/mcp-server/tools/tool-helpers.d.ts +22 -7
- package/dist/mcp-server/tools/tool-helpers.d.ts.map +1 -1
- package/dist/mcp-server/tools/tool-helpers.js +25 -7
- package/dist/mcp-server/tools/tool-helpers.js.map +1 -1
- package/dist/services/congress-api/congress-api-service.d.ts +8 -3
- package/dist/services/congress-api/congress-api-service.d.ts.map +1 -1
- package/dist/services/congress-api/congress-api-service.js +83 -18
- package/dist/services/congress-api/congress-api-service.js.map +1 -1
- package/dist/services/congress-documents/congress-documents-service.d.ts.map +1 -1
- package/dist/services/congress-documents/congress-documents-service.js +26 -34
- package/dist/services/congress-documents/congress-documents-service.js.map +1 -1
- package/package.json +11 -11
- package/server.json +13 -27
|
@@ -40,8 +40,8 @@ export declare const dailyRecordTool: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
40
40
|
readonly reason: 'rate_limited';
|
|
41
41
|
readonly thrownBy: 'service';
|
|
42
42
|
readonly retryable: true;
|
|
43
|
-
readonly when: '
|
|
44
|
-
readonly recovery: '
|
|
43
|
+
readonly when: 'A process-local attempt budget or the shared upstream credential/IP quota was reached; upstream hourly limits vary and DEMO_KEY also has a daily quota.';
|
|
44
|
+
readonly recovery: 'Follow Retry-After when supplied; otherwise wait and reduce request frequency. This process cannot account for other clients sharing the key or demo IP.';
|
|
45
45
|
}, {
|
|
46
46
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
|
|
47
47
|
readonly reason: 'invalid_request';
|
|
@@ -56,6 +56,13 @@ export declare const dailyRecordTool: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
56
56
|
readonly retryable: true;
|
|
57
57
|
readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
|
|
58
58
|
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
59
|
+
}, {
|
|
60
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Timeout;
|
|
61
|
+
readonly reason: 'upstream_timeout';
|
|
62
|
+
readonly thrownBy: 'service';
|
|
63
|
+
readonly retryable: true;
|
|
64
|
+
readonly when: 'The Congress.gov request deadline expired or the upstream returned an HTTP timeout response.';
|
|
65
|
+
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
59
66
|
}, {
|
|
60
67
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
61
68
|
readonly reason: 'document_unavailable';
|
|
@@ -76,19 +83,25 @@ export declare const dailyRecordTool: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
76
83
|
readonly when: 'www.congress.gov did not return a readable document — a non-2xx status, a network failure, an empty body, or a content type that is not text or XML.';
|
|
77
84
|
readonly recovery: 'Retry after a short delay; if the failure persists, request a different format or read the document at the sourceUrl the text operation returns.';
|
|
78
85
|
}, {
|
|
79
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.
|
|
86
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
80
87
|
readonly reason: 'document_too_large';
|
|
81
88
|
readonly thrownBy: 'service';
|
|
82
89
|
readonly retryable: false;
|
|
83
90
|
readonly when: 'The document is larger than the byte ceiling this server retrieves, so no character window can be served from it.';
|
|
84
91
|
readonly recovery: 'Read the document at the sourceUrl the text operation returns. A document this size clears the ceiling in every format it publishes, so switching format reaches the same limit.';
|
|
85
92
|
}, {
|
|
86
|
-
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.
|
|
93
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
87
94
|
readonly reason: 'offset_past_end';
|
|
88
95
|
readonly thrownBy: 'service';
|
|
89
96
|
readonly retryable: false;
|
|
90
97
|
readonly when: "characterOffset is at or beyond the last character of every text the call would window — the document on 'content', or every returned row's summary text on 'summaries' — so the window would be empty.";
|
|
91
98
|
readonly recovery: "Restart the walk at characterOffset 0 and follow the response's nextOffset (or a summary row's textNextOffset), which goes null once the text has been read to the end.";
|
|
99
|
+
}, {
|
|
100
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
101
|
+
readonly reason: 'incompatible_identity';
|
|
102
|
+
readonly retryable: false;
|
|
103
|
+
readonly when: 'A list operation carries an entity identifier that only a detail operation uses.';
|
|
104
|
+
readonly recovery: 'Remove the named identity field to browse, or select the compatible operation named in the error and supply its required identifiers.';
|
|
92
105
|
}], {
|
|
93
106
|
effectiveQuery: z.ZodString;
|
|
94
107
|
totalCount: z.ZodNumber;
|
|
@@ -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;AAsBjD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwK1B,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
7
7
|
import { formatDailyRecord } from '../format-helpers.js';
|
|
8
|
-
import { congressErrorContracts, documentErrorContracts, documentWindowInput, listEnrichment, listOrDetail, notifyIfNoMatches, numericIdentifier, toIdentifierNumber, } from '../tool-helpers.js';
|
|
8
|
+
import { congressErrorContracts, documentErrorContracts, documentWindowInput, identityErrorContracts, listEnrichment, listOrDetail, notifyIfNoMatches, numericIdentifier, toIdentifierNumber, } from '../tool-helpers.js';
|
|
9
9
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
10
10
|
import { getCongressDocuments } from '../../../services/congress-documents/congress-documents-service.js';
|
|
11
11
|
import { describeFormat, selectDocumentUrl, } from '../../../services/congress-documents/document-formats.js';
|
|
@@ -13,7 +13,7 @@ export const dailyRecordTool = tool('congressgov_daily_record', {
|
|
|
13
13
|
title: 'Congress.gov Daily Record',
|
|
14
14
|
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. 'articles' lists each article and its format URLs; 'content' then reads one article's actual text, a bounded character window at a time.`,
|
|
15
15
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
16
|
-
errors: [...congressErrorContracts, ...documentErrorContracts],
|
|
16
|
+
errors: [...congressErrorContracts, ...documentErrorContracts, ...identityErrorContracts],
|
|
17
17
|
input: z.object({
|
|
18
18
|
operation: z
|
|
19
19
|
.enum(['list', 'issues', 'articles', 'content'])
|
|
@@ -36,6 +36,9 @@ export const dailyRecordTool = tool('congressgov_daily_record', {
|
|
|
36
36
|
async handler(input, ctx) {
|
|
37
37
|
const api = getCongressApi();
|
|
38
38
|
if (input.operation === 'list') {
|
|
39
|
+
if (input.volumeNumber !== undefined) {
|
|
40
|
+
throw ctx.fail('incompatible_identity', "'list' does not use volumeNumber. Remove volumeNumber to browse, or use 'issues' with volumeNumber (then 'articles' or 'content' with issueNumber).", { field: 'volumeNumber', operation: input.operation });
|
|
41
|
+
}
|
|
39
42
|
const result = await api.listDailyRecord({ limit: input.limit, offset: input.offset }, ctx);
|
|
40
43
|
ctx.log.info('Daily record listed');
|
|
41
44
|
ctx.enrich.echo('Congressional Record volumes');
|
|
@@ -79,7 +82,6 @@ export const dailyRecordTool = tool('congressgov_daily_record', {
|
|
|
79
82
|
const url = selectDocumentUrl(article.text, input.format);
|
|
80
83
|
if (!url) {
|
|
81
84
|
throw ctx.fail('format_unavailable', `This article publishes no '${input.format}' document (looked for ${describeFormat(input.format)}). The Congressional Record publishes Formatted Text and PDF only.`, {
|
|
82
|
-
...ctx.recoveryFor('format_unavailable'),
|
|
83
85
|
format: input.format,
|
|
84
86
|
articleIndex: input.articleIndex,
|
|
85
87
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daily-record.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/daily-record.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,EACL,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EACL,cAAc,EACd,iBAAiB,GAClB,MAAM,mDAAmD,CAAC;AAE3D,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,0BAA0B,EAAE;IAC9D,KAAK,EAAE,2BAA2B;IAClC,WAAW,EAAE,0fAA0f;IACvgB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,MAAM,EAAE,CAAC,GAAG,sBAAsB,EAAE,GAAG,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"daily-record.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/daily-record.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,EACL,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO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GAAG,CAAC,MAAM,CAAC,IAAI,CACb,WAAW,KAAK,CAAC,YAAY,cAAc,YAAY,WAAW,WAAW,KAAK,KAAK,CAAC,MAAM,eAAe,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CACzK,CAAC;YACF,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;YAC3C,OAAO;gBACL,OAAO,EAAE;oBACP,GAAG,QAAQ;oBACX,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,SAAS,EAAE,GAAG;oBACd,aAAa,EAAE,YAAY;iBAC5B;aACF,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,gBAAgB,CACvC;YACE,YAAY;YACZ,WAAW;YACX,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,EACD,GAAG,CACJ,CAAC;QACF,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC,CAAC;QAC/E,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,YAAY,WAAW,WAAW,EAAE,CAAC,CAAC;QAC7E,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1C,iBAAiB,CACf,GAAG,EACH,MAAM,EACN,gCAAgC,YAAY,WAAW,WAAW,GAAG,CACtE,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -35,8 +35,8 @@ export declare const enactedLawsTool: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
35
35
|
readonly reason: 'rate_limited';
|
|
36
36
|
readonly thrownBy: 'service';
|
|
37
37
|
readonly retryable: true;
|
|
38
|
-
readonly when: '
|
|
39
|
-
readonly recovery: '
|
|
38
|
+
readonly when: 'A process-local attempt budget or the shared upstream credential/IP quota was reached; upstream hourly limits vary and DEMO_KEY also has a daily quota.';
|
|
39
|
+
readonly recovery: 'Follow Retry-After when supplied; otherwise wait and reduce request frequency. This process cannot account for other clients sharing the key or demo IP.';
|
|
40
40
|
}, {
|
|
41
41
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
|
|
42
42
|
readonly reason: 'invalid_request';
|
|
@@ -51,6 +51,13 @@ export declare const enactedLawsTool: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
51
51
|
readonly retryable: true;
|
|
52
52
|
readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
|
|
53
53
|
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
54
|
+
}, {
|
|
55
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Timeout;
|
|
56
|
+
readonly reason: 'upstream_timeout';
|
|
57
|
+
readonly thrownBy: 'service';
|
|
58
|
+
readonly retryable: true;
|
|
59
|
+
readonly when: 'The Congress.gov request deadline expired or the upstream returned an HTTP timeout response.';
|
|
60
|
+
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
54
61
|
}], {
|
|
55
62
|
effectiveQuery: z.ZodString;
|
|
56
63
|
totalCount: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enacted-laws.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/enacted-laws.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAejD,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"enacted-laws.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/enacted-laws.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAejD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkF1B,CAAC"}
|
|
@@ -36,8 +36,8 @@ export declare const memberLookupTool: import("@cyanheads/mcp-ts-core").ToolDefi
|
|
|
36
36
|
readonly reason: 'rate_limited';
|
|
37
37
|
readonly thrownBy: 'service';
|
|
38
38
|
readonly retryable: true;
|
|
39
|
-
readonly when: '
|
|
40
|
-
readonly recovery: '
|
|
39
|
+
readonly when: 'A process-local attempt budget or the shared upstream credential/IP quota was reached; upstream hourly limits vary and DEMO_KEY also has a daily quota.';
|
|
40
|
+
readonly recovery: 'Follow Retry-After when supplied; otherwise wait and reduce request frequency. This process cannot account for other clients sharing the key or demo IP.';
|
|
41
41
|
}, {
|
|
42
42
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
|
|
43
43
|
readonly reason: 'invalid_request';
|
|
@@ -52,6 +52,13 @@ export declare const memberLookupTool: import("@cyanheads/mcp-ts-core").ToolDefi
|
|
|
52
52
|
readonly retryable: true;
|
|
53
53
|
readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
|
|
54
54
|
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
55
|
+
}, {
|
|
56
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Timeout;
|
|
57
|
+
readonly reason: 'upstream_timeout';
|
|
58
|
+
readonly thrownBy: 'service';
|
|
59
|
+
readonly retryable: true;
|
|
60
|
+
readonly when: 'The Congress.gov request deadline expired or the upstream returned an HTTP timeout response.';
|
|
61
|
+
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
55
62
|
}], {
|
|
56
63
|
effectiveQuery: z.ZodString;
|
|
57
64
|
totalCount: z.ZodNumber;
|
|
@@ -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;AAajD,eAAO,MAAM,gBAAgB
|
|
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;AAajD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0H3B,CAAC"}
|
|
@@ -43,8 +43,8 @@ export declare const rollVotesTool: import("@cyanheads/mcp-ts-core").ToolDefinit
|
|
|
43
43
|
readonly reason: 'rate_limited';
|
|
44
44
|
readonly thrownBy: 'service';
|
|
45
45
|
readonly retryable: true;
|
|
46
|
-
readonly when: '
|
|
47
|
-
readonly recovery: '
|
|
46
|
+
readonly when: 'A process-local attempt budget or the shared upstream credential/IP quota was reached; upstream hourly limits vary and DEMO_KEY also has a daily quota.';
|
|
47
|
+
readonly recovery: 'Follow Retry-After when supplied; otherwise wait and reduce request frequency. This process cannot account for other clients sharing the key or demo IP.';
|
|
48
48
|
}, {
|
|
49
49
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
|
|
50
50
|
readonly reason: 'invalid_request';
|
|
@@ -59,6 +59,19 @@ export declare const rollVotesTool: import("@cyanheads/mcp-ts-core").ToolDefinit
|
|
|
59
59
|
readonly retryable: true;
|
|
60
60
|
readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
|
|
61
61
|
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
62
|
+
}, {
|
|
63
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Timeout;
|
|
64
|
+
readonly reason: 'upstream_timeout';
|
|
65
|
+
readonly thrownBy: 'service';
|
|
66
|
+
readonly retryable: true;
|
|
67
|
+
readonly when: 'The Congress.gov request deadline expired or the upstream returned an HTTP timeout response.';
|
|
68
|
+
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
69
|
+
}, {
|
|
70
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
71
|
+
readonly reason: 'incompatible_identity';
|
|
72
|
+
readonly retryable: false;
|
|
73
|
+
readonly when: 'A list operation carries an entity identifier that only a detail operation uses.';
|
|
74
|
+
readonly recovery: 'Remove the named identity field to browse, or select the compatible operation named in the error and supply its required identifiers.';
|
|
62
75
|
}], {
|
|
63
76
|
effectiveQuery: z.ZodString;
|
|
64
77
|
totalCount: z.ZodNumber;
|
|
@@ -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;;;;;GAKG;AAGH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"roll-votes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/roll-votes.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAejD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmIxB,CAAC"}
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
8
8
|
import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
9
9
|
import { formatVotes } from '../format-helpers.js';
|
|
10
|
-
import { buildEffectiveQuery, congressErrorContracts, listEnrichment, listOrDetail, notifyIfNoMatches, } from '../tool-helpers.js';
|
|
10
|
+
import { buildEffectiveQuery, congressErrorContracts, identityErrorContracts, listEnrichment, listOrDetail, notifyIfNoMatches, } from '../tool-helpers.js';
|
|
11
11
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
12
12
|
import { getSenateVoteService } from '../../../services/senate-lis/senate-vote-service.js';
|
|
13
13
|
export const rollVotesTool = tool('congressgov_roll_votes', {
|
|
14
14
|
title: 'Congress.gov Roll Votes',
|
|
15
15
|
description: `Retrieve U.S. congressional roll call votes and individual member voting positions for either chamber. Set 'chamber' to 'house' (default, from the Congress.gov API) or 'senate' (from the Senate's official LIS feed). Use 'list' to find votes by congress and session (newest first by default), 'get' for vote details (question, result, tallies, party breakdown, associated bill/nomination/amendment), or 'members' for how each member voted.`,
|
|
16
16
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
17
|
-
errors: congressErrorContracts,
|
|
17
|
+
errors: [...congressErrorContracts, ...identityErrorContracts],
|
|
18
18
|
input: z.object({
|
|
19
19
|
operation: z.enum(['list', 'get', 'members']).describe('Which data to retrieve.'),
|
|
20
20
|
chamber: z
|
|
@@ -45,6 +45,9 @@ export const rollVotesTool = tool('congressgov_roll_votes', {
|
|
|
45
45
|
enrichment: listEnrichment,
|
|
46
46
|
format: formatVotes,
|
|
47
47
|
async handler(input, ctx) {
|
|
48
|
+
if (input.operation === 'list' && input.voteNumber !== undefined) {
|
|
49
|
+
throw ctx.fail('incompatible_identity', "'list' does not use voteNumber. Remove voteNumber to browse, or use 'get' or 'members' with congress, session, and voteNumber.", { field: 'voteNumber', operation: input.operation });
|
|
50
|
+
}
|
|
48
51
|
if (input.chamber === 'senate') {
|
|
49
52
|
return handleSenateVotes(input, ctx);
|
|
50
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roll-votes.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/roll-votes.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;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,EACL,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAEpF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,wBAAwB,EAAE;IAC1D,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,wbAAwb;IACrc,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,MAAM,EAAE,sBAAsB;
|
|
1
|
+
{"version":3,"file":"roll-votes.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/roll-votes.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;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,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAEpF,MAA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AAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAChB,MAAM,EAAE,GAAI,CAA6B,CAAC,UAAU,IAAI,EAAE,CAAC;QAC3D,MAAM,EAAE,GAAI,CAA6B,CAAC,UAAU,IAAI,EAAE,CAAC;QAC3D,OAAO,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACrE,MAAM,UAAU,GACd,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAClF,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,qCAAqC,EAAE;QAClD,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK,EAAE,GAAG,CAAC,MAAM;QACjB,QAAQ,EAAE,KAAK,CAAC,MAAM;QACtB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,gBAAgB,EAAE,CAAC,GAAG,cAAc;KACrC,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC;AAClF,CAAC"}
|
|
@@ -36,8 +36,8 @@ export declare const senateNominationsTool: import("@cyanheads/mcp-ts-core").Too
|
|
|
36
36
|
readonly reason: 'rate_limited';
|
|
37
37
|
readonly thrownBy: 'service';
|
|
38
38
|
readonly retryable: true;
|
|
39
|
-
readonly when: '
|
|
40
|
-
readonly recovery: '
|
|
39
|
+
readonly when: 'A process-local attempt budget or the shared upstream credential/IP quota was reached; upstream hourly limits vary and DEMO_KEY also has a daily quota.';
|
|
40
|
+
readonly recovery: 'Follow Retry-After when supplied; otherwise wait and reduce request frequency. This process cannot account for other clients sharing the key or demo IP.';
|
|
41
41
|
}, {
|
|
42
42
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
|
|
43
43
|
readonly reason: 'invalid_request';
|
|
@@ -52,6 +52,19 @@ export declare const senateNominationsTool: import("@cyanheads/mcp-ts-core").Too
|
|
|
52
52
|
readonly retryable: true;
|
|
53
53
|
readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
|
|
54
54
|
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
55
|
+
}, {
|
|
56
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Timeout;
|
|
57
|
+
readonly reason: 'upstream_timeout';
|
|
58
|
+
readonly thrownBy: 'service';
|
|
59
|
+
readonly retryable: true;
|
|
60
|
+
readonly when: 'The Congress.gov request deadline expired or the upstream returned an HTTP timeout response.';
|
|
61
|
+
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
62
|
+
}, {
|
|
63
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
64
|
+
readonly reason: 'incompatible_identity';
|
|
65
|
+
readonly retryable: false;
|
|
66
|
+
readonly when: 'A list operation carries an entity identifier that only a detail operation uses.';
|
|
67
|
+
readonly recovery: 'Remove the named identity field to browse, or select the compatible operation named in the error and supply its required identifiers.';
|
|
55
68
|
}], {
|
|
56
69
|
effectiveQuery: z.ZodString;
|
|
57
70
|
totalCount: z.ZodNumber;
|
|
@@ -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;AAGH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"senate-nominations.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/senate-nominations.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAcjD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuIhC,CAAC"}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { validationError } from '@cyanheads/mcp-ts-core/errors';
|
|
7
7
|
import { formatNominations } from '../format-helpers.js';
|
|
8
|
-
import { buildEffectiveQuery, congressErrorContracts, listEnrichment, listOrDetail, notifyIfNoMatches, } from '../tool-helpers.js';
|
|
8
|
+
import { buildEffectiveQuery, congressErrorContracts, identityErrorContracts, listEnrichment, listOrDetail, normalizeOptionalString, notifyIfNoMatches, } from '../tool-helpers.js';
|
|
9
9
|
import { getCongressApi } from '../../../services/congress-api/congress-api-service.js';
|
|
10
10
|
export const senateNominationsTool = tool('congressgov_senate_nominations', {
|
|
11
11
|
title: 'Congress.gov Senate Nominations',
|
|
12
12
|
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.`,
|
|
13
13
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
14
|
-
errors: congressErrorContracts,
|
|
14
|
+
errors: [...congressErrorContracts, ...identityErrorContracts],
|
|
15
15
|
input: z.object({
|
|
16
16
|
operation: z
|
|
17
17
|
.enum(['list', 'get', 'nominees', 'actions', 'committees', 'hearings'])
|
|
@@ -36,6 +36,9 @@ export const senateNominationsTool = tool('congressgov_senate_nominations', {
|
|
|
36
36
|
async handler(input, ctx) {
|
|
37
37
|
const api = getCongressApi();
|
|
38
38
|
if (input.operation === 'list') {
|
|
39
|
+
if (normalizeOptionalString(input.nominationNumber)) {
|
|
40
|
+
throw ctx.fail('incompatible_identity', "'list' does not use nominationNumber. Remove nominationNumber to browse, or use 'get' with congress and nominationNumber.", { field: 'nominationNumber', operation: input.operation });
|
|
41
|
+
}
|
|
39
42
|
const result = await api.listNominations({
|
|
40
43
|
congress: input.congress,
|
|
41
44
|
limit: input.limit,
|
|
@@ -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;AAGH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,gCAAgC,EAAE;IAC1E,KAAK,EAAE,iCAAiC;IACxC,WAAW,EAAE,8rBAA8rB;IAC3sB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,MAAM,EAAE,sBAAsB;
|
|
1
|
+
{"version":3,"file":"senate-nominations.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/senate-nominations.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;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,gCAAgC,EAAE;IAC1E,KAAK,EAAE,iCAAiC;IACxC,WAAW,EAAE,8rBAA8rB;IAC3sB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,MAAM,EAAE,CAAC,GAAG,sBAAsB,EAAE,GAAG,sBAAsB,CAAC;IAC9D,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC;aACT,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;aACtE,QAAQ,CAAC,yBAAyB,CAAC;QACtC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QAClE,gBAAgB,EAAE,CAAC;aAChB,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,6NAA6N,CAC9N;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,GAAG,EAAE;aACL,QA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AAK,CAAC,SAAS;SAC7B,CAAC,CAAC;QACH,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,SAAS,mBAAmB,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAC/E,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC1C,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAC3D,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,SAAS,qBAAqB,CAC5B,GAAY,EACZ,MAA0D,EAC1D,gBAAwB;IAExB,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO;IAC3C,iBAAiB,CACf,GAAG,EACH,MAAM,EACN,QAAQ,gBAAgB,+GAA+G,gBAAgB,+BAA+B,CACvL,CAAC;AACJ,CAAC"}
|
|
@@ -187,8 +187,8 @@ export declare const documentWindowInput: {
|
|
|
187
187
|
* reach it.
|
|
188
188
|
*
|
|
189
189
|
* `CongressDocumentsService` raises each with a matching `data.reason` and
|
|
190
|
-
*
|
|
191
|
-
*
|
|
190
|
+
* the framework fills the `recovery` hint declared here, so the hint lives in
|
|
191
|
+
* exactly one place. Direct-handler tests retain explicit forwards where needed.
|
|
192
192
|
* Resolves cyanheads/congressgov-mcp-server#53.
|
|
193
193
|
*/
|
|
194
194
|
export declare const documentErrorContracts: readonly [{
|
|
@@ -211,14 +211,14 @@ export declare const documentErrorContracts: readonly [{
|
|
|
211
211
|
readonly when: 'www.congress.gov did not return a readable document — a non-2xx status, a network failure, an empty body, or a content type that is not text or XML.';
|
|
212
212
|
readonly recovery: 'Retry after a short delay; if the failure persists, request a different format or read the document at the sourceUrl the text operation returns.';
|
|
213
213
|
}, {
|
|
214
|
-
readonly code: JsonRpcErrorCode.
|
|
214
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
215
215
|
readonly reason: 'document_too_large';
|
|
216
216
|
readonly thrownBy: 'service';
|
|
217
217
|
readonly retryable: false;
|
|
218
218
|
readonly when: 'The document is larger than the byte ceiling this server retrieves, so no character window can be served from it.';
|
|
219
219
|
readonly recovery: 'Read the document at the sourceUrl the text operation returns. A document this size clears the ceiling in every format it publishes, so switching format reaches the same limit.';
|
|
220
220
|
}, {
|
|
221
|
-
readonly code: JsonRpcErrorCode.
|
|
221
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
222
222
|
readonly reason: 'offset_past_end';
|
|
223
223
|
readonly thrownBy: 'service';
|
|
224
224
|
readonly retryable: false;
|
|
@@ -227,7 +227,7 @@ export declare const documentErrorContracts: readonly [{
|
|
|
227
227
|
}];
|
|
228
228
|
/**
|
|
229
229
|
* Shared `errors[]` contract for every Congress.gov API tool. Every tool except
|
|
230
|
-
* the mirror-backed `congressgov_search_bills` reaches the same `CongressApiService` fetch path, so they surface the same
|
|
230
|
+
* the mirror-backed `congressgov_search_bills` reaches the same `CongressApiService` fetch path, so they surface the same five
|
|
231
231
|
* upstream failure modes. The service raises each with a matching `data.reason`
|
|
232
232
|
* and `data.recovery.hint` (see `classifyUpstreamError`), making the failures
|
|
233
233
|
* machine-readable; declaring them here advertises the contract in `tools/list`.
|
|
@@ -245,8 +245,8 @@ export declare const congressErrorContracts: readonly [{
|
|
|
245
245
|
readonly reason: 'rate_limited';
|
|
246
246
|
readonly thrownBy: 'service';
|
|
247
247
|
readonly retryable: true;
|
|
248
|
-
readonly when: '
|
|
249
|
-
readonly recovery: '
|
|
248
|
+
readonly when: 'A process-local attempt budget or the shared upstream credential/IP quota was reached; upstream hourly limits vary and DEMO_KEY also has a daily quota.';
|
|
249
|
+
readonly recovery: 'Follow Retry-After when supplied; otherwise wait and reduce request frequency. This process cannot account for other clients sharing the key or demo IP.';
|
|
250
250
|
}, {
|
|
251
251
|
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
252
252
|
readonly reason: 'invalid_request';
|
|
@@ -261,6 +261,21 @@ export declare const congressErrorContracts: readonly [{
|
|
|
261
261
|
readonly retryable: true;
|
|
262
262
|
readonly when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).';
|
|
263
263
|
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
264
|
+
}, {
|
|
265
|
+
readonly code: JsonRpcErrorCode.Timeout;
|
|
266
|
+
readonly reason: 'upstream_timeout';
|
|
267
|
+
readonly thrownBy: 'service';
|
|
268
|
+
readonly retryable: true;
|
|
269
|
+
readonly when: 'The Congress.gov request deadline expired or the upstream returned an HTTP timeout response.';
|
|
270
|
+
readonly recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.';
|
|
271
|
+
}];
|
|
272
|
+
/** Domain refusal when a list operation would discard an entity identifier. */
|
|
273
|
+
export declare const identityErrorContracts: readonly [{
|
|
274
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
275
|
+
readonly reason: 'incompatible_identity';
|
|
276
|
+
readonly retryable: false;
|
|
277
|
+
readonly when: 'A list operation carries an entity identifier that only a detail operation uses.';
|
|
278
|
+
readonly recovery: 'Remove the named identity field to browse, or select the compatible operation named in the error and supply its required identifiers.';
|
|
264
279
|
}];
|
|
265
280
|
export {};
|
|
266
281
|
//# 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,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAEL,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AAyCvC,QAAA,MAAM,iBAAiB;aACrB,MAAM;aACN,OAAO;CACC,CAAC;AAEX,8DAA8D;AAC9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AEtG,yGAAyG;;;qBAInG,cAAc;uBACZ,SAAS;;mBAEb,yJAAyJ;uBAE7J,0JAA0J;;;qBAIpJ,iBAAiB;uBACf,SAAS;;mBAEb,8GAA8G;uBAElH,8HAA8H;;;qBAIxH,gBAAgB;uBACd,SAAS;;mBAEb,4EAA4E;uBAEhF,0GAA0G;;;qBAIpG,kBAAkB;uBAChB,SAAS;;mBAEb,8FAA8F;uBAElG,0GAA0G;EAEnE,CAAC;AAE9C,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB;;qBAGvB,uBAAuB;;mBAEzB,kFAAkF;uBAEtF,uIAAuI;EAEhG,CAAC"}
|
|
@@ -329,8 +329,8 @@ export const documentWindowInput = {
|
|
|
329
329
|
* reach it.
|
|
330
330
|
*
|
|
331
331
|
* `CongressDocumentsService` raises each with a matching `data.reason` and
|
|
332
|
-
*
|
|
333
|
-
*
|
|
332
|
+
* the framework fills the `recovery` hint declared here, so the hint lives in
|
|
333
|
+
* exactly one place. Direct-handler tests retain explicit forwards where needed.
|
|
334
334
|
* Resolves cyanheads/congressgov-mcp-server#53.
|
|
335
335
|
*/
|
|
336
336
|
export const documentErrorContracts = [
|
|
@@ -357,7 +357,7 @@ export const documentErrorContracts = [
|
|
|
357
357
|
recovery: 'Retry after a short delay; if the failure persists, request a different format or read the document at the sourceUrl the text operation returns.',
|
|
358
358
|
},
|
|
359
359
|
{
|
|
360
|
-
code: JsonRpcErrorCode.
|
|
360
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
361
361
|
reason: 'document_too_large',
|
|
362
362
|
thrownBy: 'service',
|
|
363
363
|
retryable: false,
|
|
@@ -365,7 +365,7 @@ export const documentErrorContracts = [
|
|
|
365
365
|
recovery: 'Read the document at the sourceUrl the text operation returns. A document this size clears the ceiling in every format it publishes, so switching format reaches the same limit.',
|
|
366
366
|
},
|
|
367
367
|
{
|
|
368
|
-
code: JsonRpcErrorCode.
|
|
368
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
369
369
|
reason: 'offset_past_end',
|
|
370
370
|
thrownBy: 'service',
|
|
371
371
|
retryable: false,
|
|
@@ -375,7 +375,7 @@ export const documentErrorContracts = [
|
|
|
375
375
|
];
|
|
376
376
|
/**
|
|
377
377
|
* Shared `errors[]` contract for every Congress.gov API tool. Every tool except
|
|
378
|
-
* the mirror-backed `congressgov_search_bills` reaches the same `CongressApiService` fetch path, so they surface the same
|
|
378
|
+
* the mirror-backed `congressgov_search_bills` reaches the same `CongressApiService` fetch path, so they surface the same five
|
|
379
379
|
* upstream failure modes. The service raises each with a matching `data.reason`
|
|
380
380
|
* and `data.recovery.hint` (see `classifyUpstreamError`), making the failures
|
|
381
381
|
* machine-readable; declaring them here advertises the contract in `tools/list`.
|
|
@@ -395,8 +395,8 @@ export const congressErrorContracts = [
|
|
|
395
395
|
reason: 'rate_limited',
|
|
396
396
|
thrownBy: 'service',
|
|
397
397
|
retryable: true,
|
|
398
|
-
when: '
|
|
399
|
-
recovery: '
|
|
398
|
+
when: 'A process-local attempt budget or the shared upstream credential/IP quota was reached; upstream hourly limits vary and DEMO_KEY also has a daily quota.',
|
|
399
|
+
recovery: 'Follow Retry-After when supplied; otherwise wait and reduce request frequency. This process cannot account for other clients sharing the key or demo IP.',
|
|
400
400
|
},
|
|
401
401
|
{
|
|
402
402
|
code: JsonRpcErrorCode.InvalidParams,
|
|
@@ -414,5 +414,23 @@ export const congressErrorContracts = [
|
|
|
414
414
|
when: 'Congress.gov returned an unexpected error (5xx or another non-2xx status).',
|
|
415
415
|
recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.',
|
|
416
416
|
},
|
|
417
|
+
{
|
|
418
|
+
code: JsonRpcErrorCode.Timeout,
|
|
419
|
+
reason: 'upstream_timeout',
|
|
420
|
+
thrownBy: 'service',
|
|
421
|
+
retryable: true,
|
|
422
|
+
when: 'The Congress.gov request deadline expired or the upstream returned an HTTP timeout response.',
|
|
423
|
+
recovery: 'Retry after a short delay; if the failure persists the Congress.gov service may be temporarily degraded.',
|
|
424
|
+
},
|
|
425
|
+
];
|
|
426
|
+
/** Domain refusal when a list operation would discard an entity identifier. */
|
|
427
|
+
export const identityErrorContracts = [
|
|
428
|
+
{
|
|
429
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
430
|
+
reason: 'incompatible_identity',
|
|
431
|
+
retryable: false,
|
|
432
|
+
when: 'A list operation carries an entity identifier that only a detail operation uses.',
|
|
433
|
+
recovery: 'Remove the named identity field to browse, or select the compatible operation named in the error and supply its required identifiers.',
|
|
434
|
+
},
|
|
417
435
|
];
|
|
418
436
|
//# sourceMappingURL=tool-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-helpers.js","sourceRoot":"","sources":["../../../src/mcp-server/tools/tool-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAEL,gBAAgB,EAChB,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAErF;;;;;GAKG;AACH,MAAM,eAAe,GAAG,CAAC;KACtB,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IACtF,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,GAAG,EAAE;SACL,WAAW,EAAE;SACb,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CAAC,yEAAyE,CAAC;CACvF,CAAC;KACD,QAAQ,CAAC,mDAAmD,CAAC,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,CAAC;KACf,KAAK,CACJ,CAAC;KACE,MAAM,CAAC,EAAE,CAAC;KACV,WAAW,EAAE;KACb,QAAQ,CAAC,6EAA6E,CAAC,CAC3F;KACA,QAAQ,CAAC,oEA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