@cyanheads/federal-regulations-mcp-server 0.2.4 → 0.3.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.
Files changed (71) hide show
  1. package/AGENTS.md +21 -14
  2. package/CLAUDE.md +21 -14
  3. package/README.md +100 -131
  4. package/changelog/0.2.x/0.2.5.md +23 -0
  5. package/changelog/0.3.x/0.3.0.md +27 -0
  6. package/changelog/template.md +9 -26
  7. package/dist/index.d.ts +2 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +56 -3
  10. package/dist/index.js.map +1 -1
  11. package/dist/mcp-server/resources/definitions/cfr-section.resource.d.ts +1 -0
  12. package/dist/mcp-server/resources/definitions/cfr-section.resource.d.ts.map +1 -1
  13. package/dist/mcp-server/resources/definitions/cfr-section.resource.js +1 -0
  14. package/dist/mcp-server/resources/definitions/cfr-section.resource.js.map +1 -1
  15. package/dist/mcp-server/resources/definitions/document.resource.js +1 -1
  16. package/dist/mcp-server/resources/definitions/document.resource.js.map +1 -1
  17. package/dist/mcp-server/resources/definitions/index.d.ts +1 -0
  18. package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -1
  19. package/dist/mcp-server/tools/definitions/browse-cfr.tool.d.ts +3 -0
  20. package/dist/mcp-server/tools/definitions/browse-cfr.tool.d.ts.map +1 -1
  21. package/dist/mcp-server/tools/definitions/browse-cfr.tool.js +3 -0
  22. package/dist/mcp-server/tools/definitions/browse-cfr.tool.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/date-input.d.ts +14 -0
  24. package/dist/mcp-server/tools/definitions/date-input.d.ts.map +1 -0
  25. package/dist/mcp-server/tools/definitions/date-input.js +27 -0
  26. package/dist/mcp-server/tools/definitions/date-input.js.map +1 -0
  27. package/dist/mcp-server/tools/definitions/find-comments.tool.d.ts +2 -0
  28. package/dist/mcp-server/tools/definitions/find-comments.tool.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/find-comments.tool.js +2 -0
  30. package/dist/mcp-server/tools/definitions/find-comments.tool.js.map +1 -1
  31. package/dist/mcp-server/tools/definitions/format-utils.d.ts +20 -1
  32. package/dist/mcp-server/tools/definitions/format-utils.d.ts.map +1 -1
  33. package/dist/mcp-server/tools/definitions/format-utils.js +22 -2
  34. package/dist/mcp-server/tools/definitions/format-utils.js.map +1 -1
  35. package/dist/mcp-server/tools/definitions/get-cfr-section.tool.d.ts +1 -0
  36. package/dist/mcp-server/tools/definitions/get-cfr-section.tool.d.ts.map +1 -1
  37. package/dist/mcp-server/tools/definitions/get-cfr-section.tool.js +1 -0
  38. package/dist/mcp-server/tools/definitions/get-cfr-section.tool.js.map +1 -1
  39. package/dist/mcp-server/tools/definitions/get-docket.tool.d.ts +3 -0
  40. package/dist/mcp-server/tools/definitions/get-docket.tool.d.ts.map +1 -1
  41. package/dist/mcp-server/tools/definitions/get-docket.tool.js +3 -0
  42. package/dist/mcp-server/tools/definitions/get-docket.tool.js.map +1 -1
  43. package/dist/mcp-server/tools/definitions/get-document.tool.d.ts +23 -4
  44. package/dist/mcp-server/tools/definitions/get-document.tool.d.ts.map +1 -1
  45. package/dist/mcp-server/tools/definitions/get-document.tool.js +88 -11
  46. package/dist/mcp-server/tools/definitions/get-document.tool.js.map +1 -1
  47. package/dist/mcp-server/tools/definitions/index.d.ts +142 -83
  48. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  49. package/dist/mcp-server/tools/definitions/list-open-comments.tool.d.ts +26 -6
  50. package/dist/mcp-server/tools/definitions/list-open-comments.tool.d.ts.map +1 -1
  51. package/dist/mcp-server/tools/definitions/list-open-comments.tool.js +107 -56
  52. package/dist/mcp-server/tools/definitions/list-open-comments.tool.js.map +1 -1
  53. package/dist/mcp-server/tools/definitions/search-rules.tool.d.ts +18 -3
  54. package/dist/mcp-server/tools/definitions/search-rules.tool.d.ts.map +1 -1
  55. package/dist/mcp-server/tools/definitions/search-rules.tool.js +38 -26
  56. package/dist/mcp-server/tools/definitions/search-rules.tool.js.map +1 -1
  57. package/dist/services/ecfr/ecfr-service.js +2 -2
  58. package/dist/services/ecfr-mirror/ecfr-mirror.d.ts +10 -6
  59. package/dist/services/ecfr-mirror/ecfr-mirror.d.ts.map +1 -1
  60. package/dist/services/ecfr-mirror/ecfr-mirror.js +17 -12
  61. package/dist/services/ecfr-mirror/ecfr-mirror.js.map +1 -1
  62. package/dist/services/federal-register/federal-register-service.d.ts +16 -6
  63. package/dist/services/federal-register/federal-register-service.d.ts.map +1 -1
  64. package/dist/services/federal-register/federal-register-service.js +233 -35
  65. package/dist/services/federal-register/federal-register-service.js.map +1 -1
  66. package/dist/services/federal-register/types.d.ts +38 -8
  67. package/dist/services/federal-register/types.d.ts.map +1 -1
  68. package/dist/services/regulations-gov/regulations-gov-service.js +2 -2
  69. package/dist/services/upstream-failure.d.ts +1 -1
  70. package/package.json +19 -9
  71. package/server.json +3 -3
@@ -3,60 +3,61 @@
3
3
  * @module mcp-server/tools/definitions/index
4
4
  */
5
5
  export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
6
- docket_id: import("zod").ZodString;
7
- document_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
8
- Notice: "Notice";
9
- Other: "Other";
10
- "Proposed Rule": "Proposed Rule";
11
- Rule: "Rule";
12
- "Supporting & Related Material": "Supporting & Related Material";
13
- }>>>;
14
- per_page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
15
- page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
6
+ document_number: import("zod").ZodString;
7
+ include_full_text: import("zod").ZodOptional<import("zod").ZodBoolean>;
8
+ offset: import("zod").ZodOptional<import("zod").ZodNumber>;
9
+ max_chars: import("zod").ZodOptional<import("zod").ZodNumber>;
16
10
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
17
- docketId: import("zod").ZodString;
11
+ documentNumber: import("zod").ZodString;
18
12
  title: import("zod").ZodString;
19
- docketType: import("zod").ZodNullable<import("zod").ZodString>;
20
- agencyId: import("zod").ZodNullable<import("zod").ZodString>;
21
- rin: import("zod").ZodNullable<import("zod").ZodString>;
13
+ type: import("zod").ZodString;
22
14
  abstract: import("zod").ZodNullable<import("zod").ZodString>;
23
- modifyDate: import("zod").ZodNullable<import("zod").ZodString>;
24
- objectId: import("zod").ZodNullable<import("zod").ZodString>;
25
- documentCount: import("zod").ZodNumber;
26
- documents: import("zod").ZodArray<import("zod").ZodObject<{
27
- documentId: import("zod").ZodString;
28
- objectId: import("zod").ZodString;
15
+ action: import("zod").ZodNullable<import("zod").ZodString>;
16
+ dates: import("zod").ZodNullable<import("zod").ZodString>;
17
+ publicationDate: import("zod").ZodString;
18
+ effectiveOn: import("zod").ZodNullable<import("zod").ZodString>;
19
+ commentsCloseOn: import("zod").ZodNullable<import("zod").ZodString>;
20
+ agencies: import("zod").ZodArray<import("zod").ZodObject<{
21
+ name: import("zod").ZodString;
22
+ slug: import("zod").ZodNullable<import("zod").ZodString>;
23
+ }, import("zod/v4/core").$strip>>;
24
+ regulationIdNumbers: import("zod").ZodArray<import("zod").ZodString>;
25
+ cfrReferences: import("zod").ZodArray<import("zod").ZodObject<{
26
+ title: import("zod").ZodNumber;
27
+ part: import("zod").ZodString;
28
+ }, import("zod/v4/core").$strip>>;
29
+ docketId: import("zod").ZodNullable<import("zod").ZodString>;
30
+ regulationsGovDocumentId: import("zod").ZodNullable<import("zod").ZodString>;
31
+ commentCount: import("zod").ZodNullable<import("zod").ZodNumber>;
32
+ supportingDocuments: import("zod").ZodArray<import("zod").ZodObject<{
29
33
  title: import("zod").ZodString;
30
- documentType: import("zod").ZodString;
31
- postedDate: import("zod").ZodString;
32
- frDocNum: import("zod").ZodNullable<import("zod").ZodString>;
33
- commentEndDate: import("zod").ZodNullable<import("zod").ZodString>;
34
- withdrawn: import("zod").ZodBoolean;
34
+ documentId: import("zod").ZodString;
35
35
  }, import("zod/v4/core").$strip>>;
36
+ bodyHtmlUrl: import("zod").ZodString;
37
+ rawTextUrl: import("zod").ZodString;
38
+ htmlUrl: import("zod").ZodString;
39
+ fullText: import("zod").ZodOptional<import("zod").ZodString>;
40
+ fullTextOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
41
+ fullTextLength: import("zod").ZodOptional<import("zod").ZodNumber>;
42
+ fullTextNextOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
36
43
  }, import("zod/v4/core").$strip>, readonly [{
37
- readonly reason: "auth_required";
38
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Unauthorized;
39
- readonly when: "REGULATIONS_GOV_API_KEY is not configured, or Regulations.gov rejected the key that is.";
40
- readonly recovery: "Set the REGULATIONS_GOV_API_KEY env var to a working key (free at https://api.data.gov/signup/). The Federal Register and eCFR tools work without it.";
44
+ readonly reason: "full_text_disabled";
45
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
46
+ readonly when: "offset or max_chars was passed together with include_full_text: false.";
47
+ readonly recovery: "Drop include_full_text: false to read the body window, or drop offset and max_chars to skip the body.";
41
48
  }, {
42
49
  readonly reason: "not_found";
43
50
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
44
- readonly when: "No docket exists with that ID.";
45
- readonly recovery: "Verify the docket ID from a Federal Register document's docketId; format is like \"EPA-HQ-OAR-2025-0194\".";
46
- }, {
47
- readonly reason: "rate_limited";
48
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.RateLimited;
49
- readonly when: "Regulations.gov returned 429 (1,000 requests/hour per key).";
50
- readonly retryable: true;
51
- readonly recovery: "Wait and retry — the per-key hourly limit was hit.";
51
+ readonly when: "No Federal Register document exists with that number.";
52
+ readonly recovery: "Verify the number via regulations_search_rules; FR numbers look like \"2025-14555\".";
53
+ readonly thrownBy: "service";
52
54
  }, {
53
55
  readonly reason: "upstream_unavailable";
54
56
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
55
- readonly when: "Regulations.gov returned a 5xx, timed out, or could not be reached at all.";
56
- readonly recovery: "Retry after a brief wait.";
57
+ readonly when: "Federal Register returned a 5xx, timed out, served an HTML error page, or failed to serve the body URL it published (include_full_text only).";
58
+ readonly recovery: "Retry after a brief wait; the Federal Register API may be momentarily down.";
59
+ readonly thrownBy: "service";
57
60
  }], {
58
- readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
59
- readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
60
61
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
61
62
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
62
63
  query: import("zod").ZodOptional<import("zod").ZodString>;
@@ -69,6 +70,11 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
69
70
  agencies: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
70
71
  published_after: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
71
72
  published_before: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
73
+ order: import("zod").ZodOptional<import("zod").ZodEnum<{
74
+ newest: "newest";
75
+ oldest: "oldest";
76
+ relevance: "relevance";
77
+ }>>;
72
78
  per_page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
73
79
  page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
74
80
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
@@ -78,7 +84,10 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
78
84
  type: import("zod").ZodString;
79
85
  abstract: import("zod").ZodNullable<import("zod").ZodString>;
80
86
  publicationDate: import("zod").ZodString;
81
- agencies: import("zod").ZodArray<import("zod").ZodString>;
87
+ agencies: import("zod").ZodArray<import("zod").ZodObject<{
88
+ name: import("zod").ZodString;
89
+ slug: import("zod").ZodNullable<import("zod").ZodString>;
90
+ }, import("zod/v4/core").$strip>>;
82
91
  docketIds: import("zod").ZodArray<import("zod").ZodString>;
83
92
  regulationIdNumbers: import("zod").ZodArray<import("zod").ZodString>;
84
93
  cfrReferences: import("zod").ZodArray<import("zod").ZodObject<{
@@ -94,52 +103,19 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
94
103
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
95
104
  readonly when: "Federal Register returned a 5xx, timed out, or served an HTML error page.";
96
105
  readonly recovery: "Retry after a brief wait; the Federal Register API may be momentarily down.";
106
+ }, {
107
+ readonly reason: "invalid_filter";
108
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
109
+ readonly when: "The Federal Register rejected a filter value — most often an agency name or acronym passed where a slug belongs.";
110
+ readonly recovery: "Correct the parameter the message names: agencies takes Federal Register slugs in lowercase kebab-case (e.g. \"environmental-protection-agency\"; read one off agencies[].slug in a result), and dates must be real YYYY-MM-DD days.";
111
+ readonly severity: "notice";
112
+ readonly thrownBy: "service";
97
113
  }], {
98
114
  readonly totalCount: import("zod").ZodNumber;
99
115
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
100
116
  readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
101
117
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
102
118
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
103
- document_number: import("zod").ZodString;
104
- include_full_text: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
105
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
106
- documentNumber: import("zod").ZodString;
107
- title: import("zod").ZodString;
108
- type: import("zod").ZodString;
109
- abstract: import("zod").ZodNullable<import("zod").ZodString>;
110
- action: import("zod").ZodNullable<import("zod").ZodString>;
111
- dates: import("zod").ZodNullable<import("zod").ZodString>;
112
- publicationDate: import("zod").ZodString;
113
- effectiveOn: import("zod").ZodNullable<import("zod").ZodString>;
114
- commentsCloseOn: import("zod").ZodNullable<import("zod").ZodString>;
115
- agencies: import("zod").ZodArray<import("zod").ZodString>;
116
- regulationIdNumbers: import("zod").ZodArray<import("zod").ZodString>;
117
- cfrReferences: import("zod").ZodArray<import("zod").ZodObject<{
118
- title: import("zod").ZodNumber;
119
- part: import("zod").ZodString;
120
- }, import("zod/v4/core").$strip>>;
121
- docketId: import("zod").ZodNullable<import("zod").ZodString>;
122
- regulationsGovDocumentId: import("zod").ZodNullable<import("zod").ZodString>;
123
- commentCount: import("zod").ZodNullable<import("zod").ZodNumber>;
124
- supportingDocuments: import("zod").ZodArray<import("zod").ZodObject<{
125
- title: import("zod").ZodString;
126
- documentId: import("zod").ZodString;
127
- }, import("zod/v4/core").$strip>>;
128
- bodyHtmlUrl: import("zod").ZodString;
129
- rawTextUrl: import("zod").ZodString;
130
- htmlUrl: import("zod").ZodString;
131
- fullText: import("zod").ZodOptional<import("zod").ZodString>;
132
- }, import("zod/v4/core").$strip>, readonly [{
133
- readonly reason: "not_found";
134
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
135
- readonly when: "No Federal Register document exists with that number.";
136
- readonly recovery: "Verify the number via regulations_search_rules; FR numbers look like \"2025-14555\".";
137
- }, {
138
- readonly reason: "upstream_unavailable";
139
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
140
- readonly when: "Federal Register returned a 5xx, timed out, served an HTML error page, or failed to serve the body URL it published (include_full_text only).";
141
- readonly recovery: "Retry after a brief wait; the Federal Register API may be momentarily down.";
142
- }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
143
119
  mode: import("zod").ZodEnum<{
144
120
  search: "search";
145
121
  structure: "structure";
@@ -189,6 +165,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
189
165
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
190
166
  readonly when: "Structure mode where eCFR publishes no tree for the title at that date (a reserved title, or a date outside its coverage), or where the part is absent from the tree it does publish.";
191
167
  readonly recovery: "Omit part to list the whole title, or omit both to list every title; a reserved title and a date before ~2017 publish no tree at all.";
168
+ readonly thrownBy: "service";
192
169
  }, {
193
170
  readonly reason: "title_required_for_part";
194
171
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
@@ -199,11 +176,13 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
199
176
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
200
177
  readonly when: "Search mode with a date outside eCFR's indexed window (before 2017-01-03, or past its current index date).";
201
178
  readonly recovery: "Pick a date inside the window the error names, or omit date to search the current text.";
179
+ readonly thrownBy: "service";
202
180
  }, {
203
181
  readonly reason: "upstream_unavailable";
204
182
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
205
183
  readonly when: "eCFR returned a 5xx, timed out, or served an HTML error page (live path).";
206
184
  readonly recovery: "Retry after a brief wait; the eCFR API may be momentarily down.";
185
+ readonly thrownBy: "service";
207
186
  }], {
208
187
  readonly totalCount: import("zod").ZodOptional<import("zod").ZodNumber>;
209
188
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
@@ -263,7 +242,67 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
263
242
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
264
243
  readonly when: "eCFR returned a 5xx, timed out, or served an HTML error page (live path).";
265
244
  readonly recovery: "Retry after a brief wait; the eCFR API may be momentarily unavailable.";
245
+ readonly thrownBy: "service";
266
246
  }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
247
+ docket_id: import("zod").ZodString;
248
+ document_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
249
+ Notice: "Notice";
250
+ Other: "Other";
251
+ "Proposed Rule": "Proposed Rule";
252
+ Rule: "Rule";
253
+ "Supporting & Related Material": "Supporting & Related Material";
254
+ }>>>;
255
+ per_page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
256
+ page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
257
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
258
+ docketId: import("zod").ZodString;
259
+ title: import("zod").ZodString;
260
+ docketType: import("zod").ZodNullable<import("zod").ZodString>;
261
+ agencyId: import("zod").ZodNullable<import("zod").ZodString>;
262
+ rin: import("zod").ZodNullable<import("zod").ZodString>;
263
+ abstract: import("zod").ZodNullable<import("zod").ZodString>;
264
+ modifyDate: import("zod").ZodNullable<import("zod").ZodString>;
265
+ objectId: import("zod").ZodNullable<import("zod").ZodString>;
266
+ documentCount: import("zod").ZodNumber;
267
+ documents: import("zod").ZodArray<import("zod").ZodObject<{
268
+ documentId: import("zod").ZodString;
269
+ objectId: import("zod").ZodString;
270
+ title: import("zod").ZodString;
271
+ documentType: import("zod").ZodString;
272
+ postedDate: import("zod").ZodString;
273
+ frDocNum: import("zod").ZodNullable<import("zod").ZodString>;
274
+ commentEndDate: import("zod").ZodNullable<import("zod").ZodString>;
275
+ withdrawn: import("zod").ZodBoolean;
276
+ }, import("zod/v4/core").$strip>>;
277
+ }, import("zod/v4/core").$strip>, readonly [{
278
+ readonly reason: "auth_required";
279
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Unauthorized;
280
+ readonly when: "REGULATIONS_GOV_API_KEY is not configured, or Regulations.gov rejected the key that is.";
281
+ readonly recovery: "Set the REGULATIONS_GOV_API_KEY env var to a working key (free at https://api.data.gov/signup/). The Federal Register and eCFR tools work without it.";
282
+ }, {
283
+ readonly reason: "not_found";
284
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
285
+ readonly when: "No docket exists with that ID.";
286
+ readonly recovery: "Verify the docket ID from a Federal Register document's docketId; format is like \"EPA-HQ-OAR-2025-0194\".";
287
+ readonly thrownBy: "service";
288
+ }, {
289
+ readonly reason: "rate_limited";
290
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.RateLimited;
291
+ readonly when: "Regulations.gov returned 429 (1,000 requests/hour per key).";
292
+ readonly retryable: true;
293
+ readonly recovery: "Wait and retry — the per-key hourly limit was hit.";
294
+ readonly thrownBy: "service";
295
+ }, {
296
+ readonly reason: "upstream_unavailable";
297
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
298
+ readonly when: "Regulations.gov returned a 5xx, timed out, or could not be reached at all.";
299
+ readonly recovery: "Retry after a brief wait.";
300
+ readonly thrownBy: "service";
301
+ }], {
302
+ readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
303
+ readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
304
+ readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
305
+ }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
267
306
  docket_id: import("zod").ZodOptional<import("zod").ZodString>;
268
307
  document_object_id: import("zod").ZodOptional<import("zod").ZodString>;
269
308
  fr_document_number: import("zod").ZodOptional<import("zod").ZodString>;
@@ -331,11 +370,13 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
331
370
  readonly when: "Regulations.gov returned 429.";
332
371
  readonly retryable: true;
333
372
  readonly recovery: "Wait and retry — the per-key hourly limit (1,000/hr) was hit.";
373
+ readonly thrownBy: "service";
334
374
  }, {
335
375
  readonly reason: "upstream_unavailable";
336
376
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
337
377
  readonly when: "Regulations.gov returned a 5xx, timed out, or could not be reached at all.";
338
378
  readonly recovery: "Retry after a brief wait.";
379
+ readonly thrownBy: "service";
339
380
  }], {
340
381
  readonly totalCount: import("zod").ZodOptional<import("zod").ZodNumber>;
341
382
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
@@ -343,6 +384,11 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
343
384
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
344
385
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
345
386
  query: import("zod").ZodOptional<import("zod").ZodString>;
387
+ type: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
388
+ NOTICE: "NOTICE";
389
+ PRORULE: "PRORULE";
390
+ RULE: "RULE";
391
+ }>>>;
346
392
  agencies: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
347
393
  closing_before: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"">, import("zod").ZodString]>>;
348
394
  per_page: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -354,7 +400,10 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
354
400
  documentNumber: import("zod").ZodString;
355
401
  title: import("zod").ZodString;
356
402
  type: import("zod").ZodString;
357
- agencies: import("zod").ZodArray<import("zod").ZodString>;
403
+ agencies: import("zod").ZodArray<import("zod").ZodObject<{
404
+ name: import("zod").ZodString;
405
+ slug: import("zod").ZodNullable<import("zod").ZodString>;
406
+ }, import("zod/v4/core").$strip>>;
358
407
  publicationDate: import("zod").ZodString;
359
408
  commentsCloseOn: import("zod").ZodString;
360
409
  daysRemaining: import("zod").ZodNumber;
@@ -366,10 +415,20 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
366
415
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
367
416
  readonly when: "Federal Register returned a 5xx, timed out, or served an HTML error page.";
368
417
  readonly recovery: "Retry after a brief wait; the Federal Register API may be momentarily down.";
418
+ }, {
419
+ readonly reason: "invalid_filter";
420
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
421
+ readonly when: "The Federal Register rejected a filter value — most often an agency name or acronym passed where a slug belongs.";
422
+ readonly recovery: "Correct the parameter the message names: agencies takes Federal Register slugs in lowercase kebab-case (e.g. \"environmental-protection-agency\"; read one off agencies[].slug in a result), and closing_before must be a real YYYY-MM-DD day.";
423
+ readonly severity: "notice";
424
+ readonly thrownBy: "service";
369
425
  }], {
370
426
  readonly totalCount: import("zod").ZodNumber;
427
+ readonly totalPages: import("zod").ZodNumber;
428
+ readonly nextPage: import("zod").ZodOptional<import("zod").ZodNumber>;
371
429
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
372
430
  readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
431
+ readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
373
432
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
374
433
  }>)[];
375
434
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAQ9B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAQ9B,CAAC"}
@@ -1,15 +1,22 @@
1
1
  /**
2
- * @fileoverview regulations_list_open_comments — rules currently open for public
3
- * comment, filterable by agency and topic. "What can I still weigh in on?" Runs on
4
- * the Federal Register's open-comment window (keyless); the comment count is read
5
- * from each FR document's own embedded Regulations.gov info when a key is present.
6
- * Degrades gracefully — fully functional without the key.
2
+ * @fileoverview regulations_list_open_comments — documents currently open for
3
+ * public comment (proposed rules and comment-requesting final rules by default,
4
+ * notices on request), filterable by agency and topic. "What can I still weigh in
5
+ * on?" Runs on the Federal Register's open-comment window (keyless), fetched
6
+ * whole, sorted by closing date, and paged locally; the comment count is read
7
+ * from each FR document's own embedded Regulations.gov info when a key is
8
+ * present. Degrades gracefully — fully functional without the key.
7
9
  * @module mcp-server/tools/definitions/list-open-comments.tool
8
10
  */
9
11
  import { z } from '@cyanheads/mcp-ts-core';
10
12
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
11
13
  export declare const listOpenCommentsTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
12
14
  query: z.ZodOptional<z.ZodString>;
15
+ type: z.ZodOptional<z.ZodArray<z.ZodEnum<{
16
+ NOTICE: "NOTICE";
17
+ PRORULE: "PRORULE";
18
+ RULE: "RULE";
19
+ }>>>;
13
20
  agencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
21
  closing_before: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
15
22
  per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -21,7 +28,10 @@ export declare const listOpenCommentsTool: import("@cyanheads/mcp-ts-core").Tool
21
28
  documentNumber: z.ZodString;
22
29
  title: z.ZodString;
23
30
  type: z.ZodString;
24
- agencies: z.ZodArray<z.ZodString>;
31
+ agencies: z.ZodArray<z.ZodObject<{
32
+ name: z.ZodString;
33
+ slug: z.ZodNullable<z.ZodString>;
34
+ }, z.core.$strip>>;
25
35
  publicationDate: z.ZodString;
26
36
  commentsCloseOn: z.ZodString;
27
37
  daysRemaining: z.ZodNumber;
@@ -33,10 +43,20 @@ export declare const listOpenCommentsTool: import("@cyanheads/mcp-ts-core").Tool
33
43
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
34
44
  readonly when: "Federal Register returned a 5xx, timed out, or served an HTML error page.";
35
45
  readonly recovery: "Retry after a brief wait; the Federal Register API may be momentarily down.";
46
+ }, {
47
+ readonly reason: "invalid_filter";
48
+ readonly code: JsonRpcErrorCode.ValidationError;
49
+ readonly when: "The Federal Register rejected a filter value — most often an agency name or acronym passed where a slug belongs.";
50
+ readonly recovery: "Correct the parameter the message names: agencies takes Federal Register slugs in lowercase kebab-case (e.g. \"environmental-protection-agency\"; read one off agencies[].slug in a result), and closing_before must be a real YYYY-MM-DD day.";
51
+ readonly severity: "notice";
52
+ readonly thrownBy: "service";
36
53
  }], {
37
54
  readonly totalCount: z.ZodNumber;
55
+ readonly totalPages: z.ZodNumber;
56
+ readonly nextPage: z.ZodOptional<z.ZodNumber>;
38
57
  readonly truncated: z.ZodOptional<z.ZodBoolean>;
39
58
  readonly shown: z.ZodOptional<z.ZodNumber>;
59
+ readonly cap: z.ZodOptional<z.ZodNumber>;
40
60
  readonly notice: z.ZodOptional<z.ZodString>;
41
61
  }>;
42
62
  //# sourceMappingURL=list-open-comments.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-open-comments.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-open-comments.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAgBjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsL/B,CAAC"}
1
+ {"version":3,"file":"list-open-comments.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/list-open-comments.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAsBjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+O/B,CAAC"}