@cyanheads/federal-regulations-mcp-server 0.6.0 → 0.6.1

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 (90) hide show
  1. package/AGENTS.md +4 -2
  2. package/CLAUDE.md +4 -2
  3. package/README.md +27 -20
  4. package/changelog/0.6.x/0.6.1.md +29 -0
  5. package/dist/config/server-config.d.ts +3 -1
  6. package/dist/config/server-config.d.ts.map +1 -1
  7. package/dist/config/server-config.js +7 -1
  8. package/dist/config/server-config.js.map +1 -1
  9. package/dist/index.js +1 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/mcp-server/resources/definitions/cfr-section.resource.d.ts.map +1 -1
  12. package/dist/mcp-server/resources/definitions/cfr-section.resource.js +6 -4
  13. package/dist/mcp-server/resources/definitions/cfr-section.resource.js.map +1 -1
  14. package/dist/mcp-server/resources/definitions/document.resource.js +1 -1
  15. package/dist/mcp-server/resources/definitions/document.resource.js.map +1 -1
  16. package/dist/mcp-server/tools/definitions/browse-cfr.tool.d.ts +41 -8
  17. package/dist/mcp-server/tools/definitions/browse-cfr.tool.d.ts.map +1 -1
  18. package/dist/mcp-server/tools/definitions/browse-cfr.tool.js +189 -40
  19. package/dist/mcp-server/tools/definitions/browse-cfr.tool.js.map +1 -1
  20. package/dist/mcp-server/tools/definitions/find-comments.tool.d.ts +6 -3
  21. package/dist/mcp-server/tools/definitions/find-comments.tool.d.ts.map +1 -1
  22. package/dist/mcp-server/tools/definitions/find-comments.tool.js +64 -39
  23. package/dist/mcp-server/tools/definitions/find-comments.tool.js.map +1 -1
  24. package/dist/mcp-server/tools/definitions/format-utils.d.ts +17 -0
  25. package/dist/mcp-server/tools/definitions/format-utils.d.ts.map +1 -1
  26. package/dist/mcp-server/tools/definitions/format-utils.js +36 -1
  27. package/dist/mcp-server/tools/definitions/format-utils.js.map +1 -1
  28. package/dist/mcp-server/tools/definitions/get-cfr-section.tool.d.ts +1 -1
  29. package/dist/mcp-server/tools/definitions/get-cfr-section.tool.d.ts.map +1 -1
  30. package/dist/mcp-server/tools/definitions/get-cfr-section.tool.js +19 -15
  31. package/dist/mcp-server/tools/definitions/get-cfr-section.tool.js.map +1 -1
  32. package/dist/mcp-server/tools/definitions/get-docket.tool.d.ts +67 -16
  33. package/dist/mcp-server/tools/definitions/get-docket.tool.d.ts.map +1 -1
  34. package/dist/mcp-server/tools/definitions/get-docket.tool.js +224 -56
  35. package/dist/mcp-server/tools/definitions/get-docket.tool.js.map +1 -1
  36. package/dist/mcp-server/tools/definitions/get-document.tool.d.ts +11 -1
  37. package/dist/mcp-server/tools/definitions/get-document.tool.d.ts.map +1 -1
  38. package/dist/mcp-server/tools/definitions/get-document.tool.js +20 -13
  39. package/dist/mcp-server/tools/definitions/get-document.tool.js.map +1 -1
  40. package/dist/mcp-server/tools/definitions/index.d.ts +334 -217
  41. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  42. package/dist/mcp-server/tools/definitions/list-open-comments.tool.d.ts +1 -1
  43. package/dist/mcp-server/tools/definitions/list-open-comments.tool.d.ts.map +1 -1
  44. package/dist/mcp-server/tools/definitions/list-open-comments.tool.js +12 -14
  45. package/dist/mcp-server/tools/definitions/list-open-comments.tool.js.map +1 -1
  46. package/dist/mcp-server/tools/definitions/presidential-schema.d.ts +17 -0
  47. package/dist/mcp-server/tools/definitions/presidential-schema.d.ts.map +1 -0
  48. package/dist/mcp-server/tools/definitions/presidential-schema.js +31 -0
  49. package/dist/mcp-server/tools/definitions/presidential-schema.js.map +1 -0
  50. package/dist/mcp-server/tools/definitions/search-rules.tool.d.ts +35 -3
  51. package/dist/mcp-server/tools/definitions/search-rules.tool.d.ts.map +1 -1
  52. package/dist/mcp-server/tools/definitions/search-rules.tool.js +144 -28
  53. package/dist/mcp-server/tools/definitions/search-rules.tool.js.map +1 -1
  54. package/dist/mcp-server/tools/definitions/size-limit.d.ts +50 -0
  55. package/dist/mcp-server/tools/definitions/size-limit.d.ts.map +1 -0
  56. package/dist/mcp-server/tools/definitions/size-limit.js +93 -0
  57. package/dist/mcp-server/tools/definitions/size-limit.js.map +1 -0
  58. package/dist/services/ecfr/ecfr-service.d.ts +50 -6
  59. package/dist/services/ecfr/ecfr-service.d.ts.map +1 -1
  60. package/dist/services/ecfr/ecfr-service.js +128 -12
  61. package/dist/services/ecfr/ecfr-service.js.map +1 -1
  62. package/dist/services/ecfr/read-section.d.ts +12 -3
  63. package/dist/services/ecfr/read-section.d.ts.map +1 -1
  64. package/dist/services/ecfr/read-section.js +12 -5
  65. package/dist/services/ecfr/read-section.js.map +1 -1
  66. package/dist/services/ecfr/types.d.ts +68 -0
  67. package/dist/services/ecfr/types.d.ts.map +1 -1
  68. package/dist/services/federal-register/federal-register-service.d.ts +2 -1
  69. package/dist/services/federal-register/federal-register-service.d.ts.map +1 -1
  70. package/dist/services/federal-register/federal-register-service.js +82 -12
  71. package/dist/services/federal-register/federal-register-service.js.map +1 -1
  72. package/dist/services/federal-register/types.d.ts +52 -2
  73. package/dist/services/federal-register/types.d.ts.map +1 -1
  74. package/dist/services/federal-register/types.js +10 -1
  75. package/dist/services/federal-register/types.js.map +1 -1
  76. package/dist/services/regulations-gov/regulations-gov-service.d.ts +21 -2
  77. package/dist/services/regulations-gov/regulations-gov-service.d.ts.map +1 -1
  78. package/dist/services/regulations-gov/regulations-gov-service.js +86 -13
  79. package/dist/services/regulations-gov/regulations-gov-service.js.map +1 -1
  80. package/dist/services/regulations-gov/types.d.ts +58 -15
  81. package/dist/services/regulations-gov/types.d.ts.map +1 -1
  82. package/dist/services/request-budget.d.ts +2 -2
  83. package/dist/services/request-budget.js +2 -2
  84. package/dist/services/upstream-failure.d.ts +5 -0
  85. package/dist/services/upstream-failure.d.ts.map +1 -1
  86. package/dist/services/upstream-failure.js +1 -0
  87. package/dist/services/upstream-failure.js.map +1 -1
  88. package/package.json +2 -2
  89. package/server.json +17 -3
  90. package/skills/federal-regulations-guide/SKILL.md +11 -5
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** federal-regulations-mcp-server
4
- **Version:** 0.6.0
4
+ **Version:** 0.6.1
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `0.13.18`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
@@ -237,7 +237,9 @@ src/
237
237
  regulations-gov/ # Regulations.gov v4 client (X-Api-Key) — dockets, comments
238
238
  mcp-server/
239
239
  tools/definitions/ # 7 regulations_* tools (search-rules, get-document, browse-cfr,
240
- # get-cfr-section, get-docket, find-comments, list-open-comments)
240
+ # get-cfr-section, get-docket, find-comments, list-open-comments);
241
+ # size-limit.ts is the shared per_page / max_chars field, clamp, and notice;
242
+ # presidential-schema.ts the presidential output object shared by search-rules and get-document
241
243
  resources/definitions/ # 2 resources (document, cfr-section)
242
244
  scripts/
243
245
  ecfr-mirror-init.ts # out-of-band mirror lifecycle (init / refresh / verify)
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** federal-regulations-mcp-server
4
- **Version:** 0.6.0
4
+ **Version:** 0.6.1
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `0.13.18`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
@@ -237,7 +237,9 @@ src/
237
237
  regulations-gov/ # Regulations.gov v4 client (X-Api-Key) — dockets, comments
238
238
  mcp-server/
239
239
  tools/definitions/ # 7 regulations_* tools (search-rules, get-document, browse-cfr,
240
- # get-cfr-section, get-docket, find-comments, list-open-comments)
240
+ # get-cfr-section, get-docket, find-comments, list-open-comments);
241
+ # size-limit.ts is the shared per_page / max_chars field, clamp, and notice;
242
+ # presidential-schema.ts the presidential output object shared by search-rules and get-document
241
243
  resources/definitions/ # 2 resources (document, cfr-section)
242
244
  scripts/
243
245
  ecfr-mirror-init.ts # out-of-band mirror lifecycle (init / refresh / verify)
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  <div align="center">
2
2
  <h1>@cyanheads/federal-regulations-mcp-server</h1>
3
- <p><b>Search and trace US federal rules across the Federal Register (proposed/final rules and notices), the eCFR (codified, point-in-time CFR full text, locally mirrored), and Regulations.gov (rulemaking dockets and public comments) via MCP. STDIO or Streamable HTTP.</b>
3
+ <p><b>Search and trace US federal rules across the Federal Register (proposed/final rules, notices, and presidential documents), the eCFR (codified, point-in-time CFR full text and amendment history, locally mirrored), and Regulations.gov (rulemaking dockets, document files, and public comments) via MCP. STDIO or Streamable HTTP.</b>
4
4
  <div>7 Tools • 3 Resources</div>
5
5
  </p>
6
6
  </div>
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.6.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/federal-regulations-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.4.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/federal-regulations-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/federal-regulations-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.4-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.6.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/federal-regulations-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.4.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/federal-regulations-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/federal-regulations-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.4-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -35,11 +35,11 @@ US federal regulations from the Federal Register, the eCFR, and Regulations.gov.
35
35
 
36
36
  | Tool | Description |
37
37
  |:---|:---|
38
- | `regulations_search_rules` | Search Federal Register proposed rules, final rules, notices, and presidential documents by query, type, agency, date range, CFR part, docket number, and RIN, or resolve a page cite to its document |
39
- | `regulations_get_document` | Fetch one Federal Register document by number, with the docket IDs, CFR parts, citation, comment count, and comment URL that chain into other tools |
40
- | `regulations_browse_cfr` | List CFR titles, a title's chapters, or every section and appendix in a part, or full-text-search the codified CFR |
38
+ | `regulations_search_rules` | Search Federal Register proposed rules, final rules, notices, and presidential documents by query, type, agency, date range, CFR part, docket number, RIN, significance, effective date, and executive order number, president, or signing date, or resolve a page cite to its document |
39
+ | `regulations_get_document` | Fetch one Federal Register document by number, with the docket IDs, CFR parts, citation, significance, comment count, and comment URL that chain into other tools |
40
+ | `regulations_browse_cfr` | List CFR titles, a title's chapters, or every section and appendix in a part, full-text-search the codified CFR, or list when a part's or section's text changed |
41
41
  | `regulations_get_cfr_section` | Read codified CFR text for a section, whole part, or appendix, current or as of a past date |
42
- | `regulations_get_docket` | Pull a rulemaking docket and its filed documents from Regulations.gov (key required) |
42
+ | `regulations_get_docket` | Pull a rulemaking docket and its filed documents from Regulations.gov, or read one document's files and attachments (key required) |
43
43
  | `regulations_find_comments` | Fetch public comments on a document or docket, or one comment's full body and attachments (key required) |
44
44
  | `regulations_list_open_comments` | List documents currently open for public comment, soonest closing first |
45
45
 
@@ -57,22 +57,24 @@ The two data resources mirror `regulations_get_document` and `regulations_get_cf
57
57
 
58
58
  ### `regulations_search_rules` <sub>tool</sub>
59
59
 
60
- - Optional full-text `query`, filtered by `type` (`PRORULE` / `RULE` / `NOTICE` / `PRESDOCU`), `agencies` (Federal Register slugs such as `environmental-protection-agency`, not names or acronyms), `published_after` / `published_before`, `cfr_title` + `cfr_part` (a part number or range such as `140-143`; `cfr_part` needs `cfr_title`, else `title_required_for_part`), `docket_id` (a docket number as the Federal Register prints it), and `rin`, all combined; `per_page` 2–100 (default 20), `page` 1–50
61
- - `citation` (`"89 FR 49102"`) with `citation_date` (the date its source note prints beside it) returns the documents printed on that page, in page order, volume 59 (1994) onward. A cite missing its date, or combined with the date window, fails with `citation_incomplete`; a volume before 59 or a date from another year fails with `citation_out_of_range`. When no document spans the page, the notice gives that day's page range
62
- - Each result carries `documentNumber`, `citation` / `startPage` / `endPage`, `agencies[].slug`, the printed `docketIds`, `regulationsGovDocketId` and `regulationsGovDocumentId`, `commentCount`, `commentUrl`, `commentsCloseOn` with `commentPeriodOpen` (open through 11:59 PM Eastern on the close date), `regulationIdNumbers`, and `cfrReferences` for the follow-up tools. `totalPages` and `nextPage` page the results. The Federal Register serves 50 pages, so `truncated` marks a set larger than 50 × `per_page` (1,000 at the default, 5,000 at 100); narrow the date window rather than paging deeper. `totalCount` stops at 10,000, which means at least that many. A window whose start falls after its end fails with `date_range_inverted`, and `invalid_filter` names a rejected parameter
60
+ - Optional full-text `query`, filtered by `type` (`PRORULE` / `RULE` / `NOTICE` / `PRESDOCU`), `agencies` (Federal Register slugs such as `environmental-protection-agency`, not names or acronyms), `published_after` / `published_before`, `cfr_title` + `cfr_part` (a part number or range such as `140-143`; `cfr_part` needs `cfr_title`, else `title_required_for_part`), `docket_id` (a docket number as the Federal Register prints it), `rin`, `significant` (the Federal Register's EO 12866 flag: `true` and `false` each match only documents with a determination), and `effective_after` / `effective_before`, all combined; `per_page` from 2 (default 20; above 100 serves 100 with a notice), `page` 1–50
61
+ - Presidential documents narrow by `executive_order_number` (bare digits, `14192`), `presidential_document_type` (`executive_order`, `proclamation`, `memorandum`, `determination`, `notice`, `presidential_order`, `other`), `president` (a slug such as `donald-trump`), and a `signed_after` / `signed_before` window, which differs from the publication window because signing precedes publication. These filters beside a `type` that leaves out `PRESDOCU`, or `significant` beside them or beside `type` of `PRESDOCU` alone, fail with `type_conflict`
62
+ - `citation` (`"89 FR 49102"`) with `citation_date` (the date its source note prints beside it) returns the documents printed on that page, in page order, volume 59 (1994) onward, narrowed by any other filter. A cite missing its date, or combined with the publication date window, fails with `citation_incomplete`; a volume before 59 or a date from another year fails with `citation_out_of_range`. When no document spans the page, the notice gives that day's page range
63
+ - Each result carries `documentNumber`, `citation` / `startPage` / `endPage`, `agencies[].slug`, the printed `docketIds`, `regulationsGovDocketId` and `regulationsGovDocumentId`, `commentCount`, `commentUrl`, `commentsCloseOn` with `commentPeriodOpen` (open through 11:59 PM Eastern on the close date), `regulationIdNumbers`, `significant` (null when no determination is recorded), `presidential` (`type`, `number`, `signingDate`, and `president`; null unless the document is a presidential document), and `cfrReferences` for the follow-up tools. `totalPages` and `nextPage` page the results. The Federal Register serves 50 pages, so `truncated` marks a set larger than 50 × `per_page` (1,000 at the default, 5,000 at 100); narrow the date window rather than paging deeper. `totalCount` stops at 10,000, which means at least that many. A window whose start falls after its end (publication, signing, or effective) fails with `date_range_inverted`, and `invalid_filter` names a rejected parameter
63
64
 
64
65
  ---
65
66
 
66
67
  ### `regulations_get_document` <sub>tool</sub>
67
68
 
68
- - `document_number` in any form the Federal Register issues: `2024-07773` from 2010 on, and older and correction numbers such as `98-1572`, `E9-25990`, or `C1-2009-30484`; `include_full_text` adds the plain-text body as one window of `max_chars` (default 64,000, max 200,000) starting at `offset`, and passing either of those implies it
69
- - Returns metadata plus the handles other tools take: the Regulations.gov `docketId` and `regulationsGovDocumentId`, the printed `docketIds`, `citation` / `startPage` / `endPage`, `commentCount`, `commentUrl`, `commentPeriodOpen`, and `cfrReferences`. With text, `fullTextLength` and `fullTextNextOffset` (present while text remains) page the body; a major final rule runs past a million characters
69
+ - `document_number` in any form the Federal Register issues: `2024-07773` from 2010 on, and older and correction numbers such as `98-1572`, `E9-25990`, or `C1-2009-30484`; `include_full_text` adds the plain-text body as one window of `max_chars` (default 64,000; above 200,000 serves 200,000 with a notice) starting at `offset`, and passing either of those implies it
70
+ - Returns metadata plus the handles other tools take: the Regulations.gov `docketId` and `regulationsGovDocumentId`, the printed `docketIds`, `citation` / `startPage` / `endPage`, `commentCount`, `commentUrl`, `commentPeriodOpen`, `significant`, `presidential` for a presidential document, and `cfrReferences`. With text, `fullTextLength` and `fullTextNextOffset` (present while text remains) page the body; a major final rule runs past a million characters
70
71
 
71
72
  ---
72
73
 
73
74
  ### `regulations_browse_cfr` <sub>tool</sub>
74
75
 
75
- - `mode: "structure"` lists the 50 titles, a title's top-level divisions, or, with `title` + `part`, every section and appendix in the part with its `subpart` and `subjectGroup`; `mode: "search"` full-text-searches the codified CFR and requires `query`. `title`, `part` (needs `title`), and a point-in-time `date` scope both modes, and `per_page` 1–50 (default 20) pages search results and part listings
76
+ - `mode: "structure"` lists the 50 titles, a title's top-level divisions, or, with `title` + `part`, every section and appendix in the part with its `subpart` and `subjectGroup`; `mode: "search"` full-text-searches the codified CFR and requires `query`; `mode: "versions"` lists the dates a part's or one section's text changed. `title`, `part` (needs `title`), and a point-in-time `date` scope structure and search, and `per_page` from 1 (default 20; above 50 serves 50 with a notice) pages search results, part listings, and versions
77
+ - Versions mode takes `title` with `part` (and optionally `section`, written as `regulations_get_cfr_section` accepts it) or with `changed_since` (`YYYY-MM-DD`: versions published by an eCFR issue on or after it, across the whole title when no `part` is given); any other scope fails with `versions_scope_required`, and a `section` citing another title fails with `conflicting_title`. `versions[]` rows carry `cfrCite`, `heading`, `part`, `subpart`, `date`, `issueDate`, `substantive`, and `removed`, in eCFR's order (by identifier, oldest first within each), and `latestAmendmentDate` covers the whole filtered set. Pass a row's `date` as `date` to `regulations_get_cfr_section` to read that version: a row dated before 2017-01-01 reads at 2017-01-01, and a removed row's date reads nothing
76
78
  - Search rows carry `cfrCite`, `heading`, `hierarchyPath`, and `excerpt`, one per section. `source` (`mirror` / `live`) and `sourceScope` name the corpus that answered and what it covers, and `countBasis` says whether `totalCount` counts `sections` or `section_versions`; live search reaches eCFR's first 10,000 hits only (`page_out_of_window` past them)
77
79
 
78
80
  ---
@@ -80,7 +82,8 @@ The two data resources mirror `regulations_get_document` and `regulations_get_cf
80
82
  ### `regulations_get_cfr_section` <sub>tool</sub>
81
83
 
82
84
  - One section (`title` + `part` + `section`), a whole part (`section` omitted), or one appendix (`appendix`, verbatim as `regulations_browse_cfr` emits it, e.g. `Appendix A-1 to Part 50`). `section` also takes cites as people write them (`"61"`, `"§ 141.61"`, `"141.61(c)"`) and the `cfrCite` the server returns (`"40 CFR 141.61"`, `"14 CFR 241 § 25"`; a cite naming another title fails with `conflicting_title`), `part` takes `"Part 141"`, and `date` reads text from 2017-01-01 through the title's up-to-date date
83
- - Text comes back as one `bodyText` window (`max_chars` default 64,000, max 200,000, from `offset`), paged by `bodyTextLength` and `bodyTextNextOffset`. A whole-part read adds a `sections[]` index with each section's `offset` and names its `appendices` without their text; `source` (`mirror` / `live`) reports provenance
85
+ - Text comes back as one `bodyText` window (`max_chars` default 64,000, above 200,000 serves 200,000 with a notice, from `offset`), paged by `bodyTextLength` and `bodyTextNextOffset`. A whole-part read adds a `sections[]` index with each section's `offset` and names its `appendices` without their text; `source` (`mirror` / `live`) reports provenance
86
+ - `hierarchyPath` runs from the title down to the location read. If eCFR cannot supply it, the read still answers, with only the cited levels (`Title 40 › Part 141 › § 141.61`), and `notice` says so
84
87
  - A whole-part read also returns the part's `heading`, `authority`, `sourceNote`, and `notes`, and each `sections[]` entry carries the Authority or Source its subpart or subject group states for it
85
88
  - Superscripts read `^x` and subscripts `_x` (`3 × 10^−8`, `CO_{2}e`), footnote markers `[n]`, and diacritics and overlines are combining marks (`x̄`)
86
89
 
@@ -88,23 +91,26 @@ The two data resources mirror `regulations_get_document` and `regulations_get_cf
88
91
 
89
92
  ### `regulations_get_docket` <sub>tool</sub> · key required
90
93
 
91
- - `docket_id`, the Regulations.gov docket ID (e.g. `EPA-HQ-OAR-2025-0194`) — `regulationsGovDocketId` on a search or open-comments row, `docketId` from `regulations_get_document`, not a printed `docketIds` entry; `document_types` filters to `Proposed Rule`, `Rule`, `Notice`, `Supporting & Related Material`, or `Other`; `per_page` 5–250 (default 25), `page` 1–40
92
- - Returns the docket's metadata, `documentCount`, and `documents[]`, each with an `objectId` for `regulations_find_comments`, a `frDocNum` back to `regulations_get_document`, and `commentPeriodOpen` as Regulations.gov reports it. `totalPages` and `nextPage` page the documents; Regulations.gov serves 40 pages, so `truncated` marks a docket larger than 40 × `per_page` (10,000 at 250)
94
+ - Exactly one of `docket_id` (list mode) or `document_id` (detail mode): neither fails with `target_required`, both with `multiple_targets`, and `search_term` or `document_types` beside `document_id` with `filter_requires_list_mode`. IDs are case-insensitive
95
+ - List mode takes `docket_id`, the Regulations.gov docket ID (e.g. `EPA-HQ-OAR-2025-0194`) — `regulationsGovDocketId` on a search or open-comments row, `docketId` from `regulations_get_document`, not a printed `docketIds` entry. `search_term` keeps the documents whose text matches, ranked by relevance instead of newest first; `document_types` filters to `Proposed Rule`, `Rule`, `Notice`, `Supporting & Related Material`, or `Other`, and combines with it; `per_page` from 5 (default 25; above 250 serves 250 with a notice), `page` 1–40
96
+ - List mode returns the docket's metadata, `documentCount`, and `documents[]`, each with an `objectId` for `regulations_find_comments`, a `frDocNum` back to `regulations_get_document`, and `commentPeriodOpen` as Regulations.gov reports it. `totalPages` and `nextPage` page the documents; Regulations.gov serves 40 pages, so `truncated` marks a docket larger than 40 × `per_page` (10,000 at 250)
97
+ - Detail mode takes `document_id` (`documentId` from a listing, or `regulationsGovDocumentId` from `regulations_get_document`) and returns one `document` with `fileFormats` (the main file's download URLs), `attachments` in upload order with withheld ones kept, `pageCount`, `abstract`, and `restrictReasonType`. A document whose content is only in attachments, or that has no file at all, gets a notice saying so
93
98
 
94
99
  ---
95
100
 
96
101
  ### `regulations_find_comments` <sub>tool</sub> · key required
97
102
 
98
- - Exactly one of `docket_id`, `document_object_id`, `fr_document_number`, or `comment_id`; list scopes take `per_page` 5–250 (default 25) and `page` 1–40
99
- - `document_object_id` takes an object ID (`0900006485883ec6`) or a document ID (`EPA-HQ-OW-2022-0114-0027`). `fr_document_number` resolves to the Regulations.gov document carrying that exact number and answers `not_found` when none does
103
+ - Exactly one of `docket_id`, `document_object_id`, `fr_document_number`, or `comment_id`; list scopes take `per_page` from 5 (default 25; above 250 serves 250 with a notice) and `page` 1–40
104
+ - `document_object_id` takes an object ID (`0900006485883ec6`) or a document ID (`EPA-HQ-OW-2022-0114-0027`). `fr_document_number` resolves to the Regulations.gov document carrying that exact number and answers `not_found` when none does. Docket, document, and comment IDs are case-insensitive
105
+ - A `docket_id` that lists no comments is looked up: a docket Regulations.gov does not hold (a printed docket number such as `REG-101355-26`) answers `not_found`, and an existing docket answers an empty list with a notice
100
106
  - Lists narrow by comment text with `search_term`, and each hit then carries `highlightedContent`, the matched passages. `posted_after` / `posted_before` set an inclusive posted-date window. A backwards window fails with `date_range_inverted`, and filters passed with `comment_id` fail with `filter_requires_list_mode`
101
- - `mode` is `list` or `detail`. Lists return comment summaries without body text. `comment_id` returns the body, submitter, `receivedDate`, `postmarkDate`, `duplicateComments` (above 1 marks a mass-mail campaign record), and `attachments`, with `attachmentOnly: true` when the substance is in a PDF/DOCX file. Lists carry `totalPages` and `nextPage`; `truncated` marks a set larger than the 40 pages Regulations.gov serves reach (40 × `per_page`, 10,000 at 250), and posted-date windows take it one slice at a time
107
+ - `mode` is `list` or `detail`. Lists return comment summaries without body text. `comment_id` returns the body, submitter, `receivedDate`, `postmarkDate`, `duplicateComments` (above 1 marks a mass-mail campaign record), and `attachments` in upload order, with `attachmentOnly: true` when the substance is in a PDF/DOCX file. An attachment whose file is withheld stays in the list with empty `formats` and its `restrictReasonType` (e.g. `Copyrighted`). Lists carry `totalPages` and `nextPage`; `truncated` marks a set larger than the 40 pages Regulations.gov serves reach (40 × `per_page`, 10,000 at 250), and posted-date windows take it one slice at a time
102
108
 
103
109
  ---
104
110
 
105
111
  ### `regulations_list_open_comments` <sub>tool</sub>
106
112
 
107
- - Optional `query`, `type` (`PRORULE`, `RULE`, `NOTICE`; default `["PRORULE", "RULE"]`), `agencies` (Federal Register slugs), and `closing_before`; `per_page` 1–100 (default 20)
113
+ - Optional `query`, `type` (`PRORULE`, `RULE`, `NOTICE`; default `["PRORULE", "RULE"]`), `agencies` (Federal Register slugs), and `closing_before`; `per_page` from 1 (default 20; above 100 serves 100 with a notice)
108
114
  - Rows sort by closing date, soonest first, and carry `commentsCloseOn`, `daysRemaining`, `documentNumber`, the printed `docketIds`, `regulationsGovDocketId` and `regulationsGovDocumentId`, `commentCount`, and `commentUrl`. `asOf` is today's date in Eastern time, so a document stays listed through its close day. `totalPages` and `nextPage` page the window; `truncated` means the Federal Register's 10,000-document limit was reached
109
115
  - Keyless. `keyed` reports whether `REGULATIONS_GOV_API_KEY` is set, which `regulations_get_docket` and `regulations_find_comments` need to follow up on a row
110
116
 
@@ -120,7 +126,7 @@ The two data resources mirror `regulations_get_document` and `regulations_get_cf
120
126
  ### `regulations://cfr/{title}/{part}/{section}` <sub>resource</sub>
121
127
 
122
128
  - Sections only, at the current date and the tool's default 64,000-character window; the `part` and `section` segments resolve the way the tool resolves them (`"Part 141"`; `"61"`, `"§ 141.61"`, `"40 CFR 141.61"`)
123
- - `source` (`mirror` / `live`) reports provenance. `bodyTextNextOffset` marks a section longer than the window; read the rest through `regulations_get_cfr_section` with `offset`
129
+ - `source` (`mirror` / `live`) reports provenance, and `notice` says how a part or section written another way resolved and when `hierarchyPath` holds only the cited levels. `bodyTextNextOffset` marks a section longer than the window; read the rest through `regulations_get_cfr_section` with `offset`
124
130
 
125
131
  ## Features
126
132
 
@@ -180,6 +186,7 @@ Set optional `REGULATIONS_GOV_API_KEY` to enable docket and comment tools; get a
180
186
  | `ECFR_MIRROR_PATH` | Path to the eCFR SQLite mirror database. | `./data/ecfr-mirror.sqlite` |
181
187
  | `ECFR_MIRROR_REFRESH_CRON` | Cron expression for an in-process mirror refresh (HTTP transport only), e.g. `0 4 * * 0`. Each run re-harvests every configured title in full. | none (no job) |
182
188
  | `ECFR_MIRROR_TITLES` | Comma-separated CFR titles to mirror (e.g. `21,40`). Reads and searches outside the set, and all-titles searches, go to the live eCFR API. | all 50 titles |
189
+ | `REGULATIONS_CLAMP_LIMITS` | Serve a `per_page` or `max_chars` above its ceiling at the ceiling, with a notice. `false` advertises the ceiling as a schema maximum and rejects a larger value instead. | `true` |
183
190
  | `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
184
191
  | `MCP_HTTP_PORT` | HTTP server port. | `3010` |
185
192
  | `MCP_AUTH_MODE` | Authentication: `none`, `jwt`, or `oauth`. | `none` |
@@ -0,0 +1,29 @@
1
+ ---
2
+ summary: "Search executive orders and other presidential documents by number, president, and signing date, list a CFR section's amendment dates, search a docket's documents for file downloads, and clamp oversized page sizes instead of rejecting them."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.6.1 — 2026-10-29
8
+
9
+ ## Added
10
+
11
+ - **`regulations_search_rules` filters** — `executive_order_number`, `presidential_document_type`, `president`, `signed_after`/`signed_before`, `significant`, and `effective_after`/`effective_before`. A combination that cannot match (an executive-order filter with `type: RULE`) answers `type_conflict` before any request (#66).
12
+ - **`significant` and `presidential`** — on `regulations_get_document`, search rows, and the `document` resource: `significant` is a boolean or null; `presidential` carries type, number, signing date, and president, and is null for non-presidential documents (#66).
13
+ - **`regulations_browse_cfr` `mode: "versions"`** — lists the dates a part's or one section's codified text changed (`section`, `changed_since`); each date reads through `regulations_get_cfr_section`'s `date` (#67).
14
+ - **`regulations_get_docket` `search_term`** — relevance-ranked document search within a docket (#68).
15
+ - **`regulations_get_docket` `document_id`** — detail mode returning the document's file download links (format, size, page count) and attachments (#68).
16
+ - **`REGULATIONS_CLAMP_LIMITS`** — `false` restores strict rejection of an over-ceiling `per_page` or `max_chars` (#70).
17
+
18
+ ## Changed
19
+
20
+ - **`per_page` and `max_chars` ceilings** — a value above a tool's ceiling is served at the ceiling with a notice naming the requested and applied values, on all seven tools; it was rejected with a validation error (#70).
21
+ - **`regulations_search_rules` truncation guidance** — names the new filters.
22
+ - **Documentation** — the README, design doc, and published guide skill describe the new surface.
23
+
24
+ ## Fixed
25
+
26
+ - **`regulations_find_comments` unknown docket** — a docket Regulations.gov does not hold answers `not_found`; it returned an empty success (#69).
27
+ - **Lowercase Regulations.gov IDs** — `regulations_get_docket`'s `docket_id` and `regulations_find_comments`' `comment_id` and `document_object_id` (a document ID) resolve a lowercase ID; they answered `not_found` (#69).
28
+ - **`regulations_get_cfr_section` hierarchy failure** — when eCFR's hierarchy lookup fails, the tool and the `cfr-section` resource return the text with a path built from the cited levels (`Title 40 › Part 141 › § 141.61`) and a notice; the path was a bare `Title 40` with no notice. The lookup gets one attempt of at most 8 seconds (#71).
29
+ - **`regulations_find_comments` attachments** — every attachment is listed in upload order (`docOrder`), including ones with no downloadable file (`formats: []` plus `restrictReasonType`, e.g. `Copyrighted`); those were dropped and the rest listed in the order Regulations.gov returned them (#73).
@@ -2,7 +2,8 @@
2
2
  * @fileoverview Server-specific environment configuration for
3
3
  * federal-regulations-mcp-server. Lazy-parsed Zod schema, separate from the
4
4
  * framework's own config. Maps the three data-source base URLs, the optional
5
- * Regulations.gov API key, and the eCFR mirror settings.
5
+ * Regulations.gov API key, the eCFR mirror settings, and whether an over-ceiling
6
+ * page size or text window is clamped or rejected.
6
7
  *
7
8
  * `REGULATIONS_GOV_API_KEY` is optional: the keyless core (Federal Register +
8
9
  * eCFR tools) is a complete deployment without it. The two Regulations.gov tools
@@ -20,6 +21,7 @@ declare const ServerConfigSchema: z.ZodObject<{
20
21
  ecfrMirrorPath: z.ZodDefault<z.ZodString>;
21
22
  ecfrMirrorRefreshCron: z.ZodOptional<z.ZodString>;
22
23
  ecfrMirrorTitles: z.ZodOptional<z.ZodString>;
24
+ clampLimits: z.ZodDefault<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
23
25
  }, z.core.$strip>;
24
26
  export type ServerConfig = z.infer<typeof ServerConfigSchema>;
25
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB;;;;;;;;iBAiCtB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAW9C"}
1
+ {"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB;;;;;;;;;iBAuCtB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAY9C"}
@@ -2,7 +2,8 @@
2
2
  * @fileoverview Server-specific environment configuration for
3
3
  * federal-regulations-mcp-server. Lazy-parsed Zod schema, separate from the
4
4
  * framework's own config. Maps the three data-source base URLs, the optional
5
- * Regulations.gov API key, and the eCFR mirror settings.
5
+ * Regulations.gov API key, the eCFR mirror settings, and whether an over-ceiling
6
+ * page size or text window is clamped or rejected.
6
7
  *
7
8
  * `REGULATIONS_GOV_API_KEY` is optional: the keyless core (Federal Register +
8
9
  * eCFR tools) is a complete deployment without it. The two Regulations.gov tools
@@ -42,6 +43,10 @@ const ServerConfigSchema = z.object({
42
43
  .string()
43
44
  .optional()
44
45
  .describe('Comma-separated CFR title numbers to scope the mirror to (e.g. "21,40"). Omit to mirror all 50 titles. A partial mirror still serves its baked titles from the index; cites outside the set fall through to the live eCFR API.'),
46
+ clampLimits: z
47
+ .stringbool()
48
+ .default(true)
49
+ .describe('Serve a per_page or max_chars above its ceiling at the ceiling, with a notice. false advertises and enforces the ceiling as a schema maximum instead.'),
45
50
  });
46
51
  let _config;
47
52
  /**
@@ -58,6 +63,7 @@ export function getServerConfig() {
58
63
  ecfrMirrorPath: 'ECFR_MIRROR_PATH',
59
64
  ecfrMirrorRefreshCron: 'ECFR_MIRROR_REFRESH_CRON',
60
65
  ecfrMirrorTitles: 'ECFR_MIRROR_TITLES',
66
+ clampLimits: 'REGULATIONS_CLAMP_LIMITS',
61
67
  });
62
68
  return _config;
63
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,sFAAsF;IACtF,oBAAoB,EAAE,CAAC;SACpB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,6EAA6E,CAAC;IAC1F,sBAAsB,EAAE,CAAC;SACtB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,OAAO,CAAC,wCAAwC,CAAC;SACjD,QAAQ,CAAC,mCAAmC,CAAC;IAChD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CAAC"}
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ await createApp({
32
32
  resources: allResourceDefinitions,
33
33
  skills: 'skills',
34
34
  prompts: [],
35
- instructions: "US federal regulatory law over three official sources. The Federal Register (regulations_search_rules, regulations_get_document, regulations_list_open_comments) and eCFR (regulations_browse_cfr, regulations_get_cfr_section) tools are keyless. The Regulations.gov tools (regulations_get_docket, regulations_find_comments) need REGULATIONS_GOV_API_KEY (free at https://api.data.gov/signup/) and return an actionable auth_required error without it; comment counts and Regulations.gov IDs on the Federal Register tools need no key. Trace a rule end to end: search_rules → get_document (yields docket ID + CFR parts) → find_comments → get_cfr_section, and back from a section's source-note cite with search_rules citation + citation_date.",
35
+ instructions: "US federal regulatory law over three official sources. The Federal Register (regulations_search_rules, regulations_get_document, regulations_list_open_comments) and eCFR (regulations_browse_cfr, regulations_get_cfr_section) tools are keyless. The Regulations.gov tools (regulations_get_docket, regulations_find_comments) need REGULATIONS_GOV_API_KEY (free at https://api.data.gov/signup/) and return an actionable auth_required error without it; comment counts and Regulations.gov IDs on the Federal Register tools need no key. Trace a rule end to end: search_rules → get_document (yields docket ID + CFR parts) → find_comments → get_cfr_section, and back from a section's source-note cite with search_rules citation + citation_date; browse_cfr versions mode lists when a section's text changed, and each row's date reads that version through get_cfr_section.",
36
36
  setup(core) {
37
37
  initFederalRegisterService(core.config, core.storage);
38
38
  initEcfrService(core.config, core.storage);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAA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AAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"cfr-section.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/cfr-section.resource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;GA+F7B,CAAC"}
1
+ {"version":3,"file":"cfr-section.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/cfr-section.resource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;GAiG7B,CAAC"}
@@ -22,7 +22,7 @@ import { DEFAULT_WINDOW_CHARS, windowText } from '../../../services/text-window.
22
22
  export const cfrSectionResource = resource('regulations://cfr/{title}/{part}/{section}', {
23
23
  name: 'cfr-section',
24
24
  title: 'CFR section (current)',
25
- description: 'Codified text of a current CFR section by title/part/section (e.g. regulations://cfr/40/50/50.1). Mirrors regulations_get_cfr_section at the current date and its default 64,000-character window — mirror-backed with a live eCFR fallback. The part and section resolve as the tool resolves them ("Part 141"; "61", "§ 141.61", "141.61(c)", "40 CFR 141.61"); `part` and `section` name what was read and `notice` says how. When bodyTextNextOffset is present the section runs past the window — read on through regulations_get_cfr_section with that offset. Sections only; read an appendix through regulations_get_cfr_section with its `appendix` input.',
25
+ description: 'Codified text of a current CFR section by title/part/section (e.g. regulations://cfr/40/50/50.1). Mirrors regulations_get_cfr_section at the current date and its default 64,000-character window — mirror-backed with a live eCFR fallback. The part and section resolve as the tool resolves them ("Part 141"; "61", "§ 141.61", "141.61(c)", "40 CFR 141.61"); `part` and `section` name what was read and `notice` says how, and also when hierarchyPath holds only the cited levels because eCFR could not supply the rest. When bodyTextNextOffset is present the section runs past the window — read on through regulations_get_cfr_section with that offset. Sections only; read an appendix through regulations_get_cfr_section with its `appendix` input.',
26
26
  mimeType: 'application/json',
27
27
  params: z.object({
28
28
  title: z
@@ -68,9 +68,11 @@ export const cfrSectionResource = resource('regulations://cfr/{title}/{part}/{se
68
68
  throw ctx.fail('not_found', `No codified text found for ${sectionCite(titleNum, part, read.section)} as of ${read.date}${tried}.`, { title: titleNum, part, section, date: read.date });
69
69
  }
70
70
  const resolved = read.result.section ?? section;
71
- const hierarchyPath = await getEcfrService().hierarchyPath(titleNum, { part, section: resolved }, read.result.date, ctx);
71
+ const path = await getEcfrService().hierarchyPath(titleNum, { part, section: resolved }, read.result.date, ctx);
72
72
  const cut = windowText(read.result.bodyText, { offset: 0, maxChars: DEFAULT_WINDOW_CHARS });
73
- const notice = [describePartRewrite(written, part), read.rewrite].filter(Boolean).join(' ');
73
+ const notice = [describePartRewrite(written, part), read.rewrite, path.notice]
74
+ .filter(Boolean)
75
+ .join(' ');
74
76
  return {
75
77
  cfrCite: sectionCite(titleNum, part, resolved),
76
78
  title: titleNum,
@@ -78,7 +80,7 @@ export const cfrSectionResource = resource('regulations://cfr/{title}/{part}/{se
78
80
  section: resolved,
79
81
  appendix: null,
80
82
  heading: read.result.heading,
81
- hierarchyPath,
83
+ hierarchyPath: path.path,
82
84
  date: read.result.date,
83
85
  source: read.source,
84
86
  bodyText: cut.text,
@@ -1 +1 @@
1
- {"version":3,"file":"cfr-section.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/cfr-section.resource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EA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AC,CAAC;AAEH;;;;;GAKG;AACH,SAAS,aAAa,CAAC,KAAa;IAClC,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"cfr-section.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/cfr-section.resource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE7E,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,4CAA4C,EAAE;IACvF,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,quBAAquB;IACvuB,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,KAAK,CAAC,WAAW,CAAC;aAClB,QAAQ,CAAC,0BAA0B,CAAC;QACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;QAC/E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;KAClE,CAAC;IACF,MAAM,EAAE;QACN;YACE,MAAM,EAAE,WAAW;YACnB,IAAI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;YACtB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,GAAG,CAAC,IAAI;YAClB,cAAc,EAAE,GAAG,CAAC,MAAM;YAC1B,cAAc,EAAE,GAAG,CAAC,MAAM;YAC1B,GAAG,CAAC,GAAG,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,kBAAkB,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC;YAC3E,GAAG,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC;SAC1B,CAAC;IACJ,CAAC;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,SAAS,EAAE;YACT;gBACE,GAAG,EAAE,8BAA8B;gBACnC,IAAI,EAAE,mCAAmC;gBACzC,QAAQ,EAAE,kBAAkB;aAC7B;SACF;KACF,CAAC;CACH,CAAC,CAAC;AAEH;;;;;GAKG;AACH,SAAS,aAAa,CAAC,KAAa;IAClC,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -12,7 +12,7 @@ import { getFederalRegisterService } from '../../../services/federal-register/fe
12
12
  export const documentResource = resource('regulations://document/{documentNumber}', {
13
13
  name: 'federal-register-document',
14
14
  title: 'Federal Register document',
15
- description: 'A single Federal Register document by FR number: metadata, citation and pages, and the cross-source handles (Regulations.gov docket and document IDs, printed docket numbers, affected CFR parts, comment count and comment URL) that chain into the search, comment, and codified-text tools. Mirrors regulations_get_document (full text omitted).',
15
+ description: 'A single Federal Register document by FR number: metadata, citation and pages, EO 12866 significance, presidential-document identifiers (subtype, number, signing date, president), and the cross-source handles (Regulations.gov docket and document IDs, printed docket numbers, affected CFR parts, comment count and comment URL) that chain into the search, comment, and codified-text tools. Mirrors regulations_get_document (full text omitted).',
16
16
  mimeType: 'application/json',
17
17
  /**
18
18
  * Validated as the template hands it over: the pattern admits only unreserved
@@ -1 +1 @@
1
- {"version":3,"file":"document.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/document.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AAEpG,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,yCAAyC,EAAE;IAClF,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,sVAAsV;IACxV,QAAQ,EAAE,kBAAkB;IAC5B;;;;OAIG;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,cAAc,EAAE,gBAAgB,EAAE,CAAC,QAAQ,CACzC,2IAA2I,CAC5I;KACF,CAAC;IACF,MAAM,EAAE;QACN;YACE,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,uDAAuD;YAC7D,QAAQ,EACN,6HAA6H;SAChI;QACD;YACE,MAAM,EAAE,sBAAsB;YAC9B,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;YACzC,IAAI,EAAE,2EAA2E;YACjF,QAAQ,EAAE,6EAA6E;SACxF;KACF;IAED,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,MAAM,OAAO,GAAG,yBAAyB,EAAE,CAAC;QAC5C,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,WAAW,CACtC,yBAAyB,CAAC,MAAM,CAAC,cAAc,CAAC,EAChD,SAAS,EACT,GAAG,CACJ,CAAC;QACF,6EAA6E;QAC7E,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,SAAS,EAAE;YACT;gBACE,GAAG,EAAE,mCAAmC;gBACxC,IAAI,EAAE,mCAAmC;gBACzC,QAAQ,EAAE,kBAAkB;aAC7B;SACF;KACF,CAAC;CACH,CAAC,CAAC"}
1
+ {"version":3,"file":"document.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/document.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AAEpG,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,yCAAyC,EAAE;IAClF,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,2bAA2b;IAC7b,QAAQ,EAAE,kBAAkB;IAC5B;;;;OAIG;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,cAAc,EAAE,gBAAgB,EAAE,CAAC,QAAQ,CACzC,2IAA2I,CAC5I;KACF,CAAC;IACF,MAAM,EAAE;QACN;YACE,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,uDAAuD;YAC7D,QAAQ,EACN,6HAA6H;SAChI;QACD;YACE,MAAM,EAAE,sBAAsB;YAC9B,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;YACzC,IAAI,EAAE,2EAA2E;YACjF,QAAQ,EAAE,6EAA6E;SACxF;KACF;IAED,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,MAAM,OAAO,GAAG,yBAAyB,EAAE,CAAC;QAC5C,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,WAAW,CACtC,yBAAyB,CAAC,MAAM,CAAC,cAAc,CAAC,EAChD,SAAS,EACT,GAAG,CACJ,CAAC;QACF,6EAA6E;QAC7E,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,SAAS,EAAE;YACT;gBACE,GAAG,EAAE,mCAAmC;gBACxC,IAAI,EAAE,mCAAmC;gBACzC,QAAQ,EAAE,kBAAkB;aAC7B;SACF;KACF,CAAC;CACH,CAAC,CAAC"}
@@ -8,17 +8,23 @@
8
8
  * cold deploy all route to the live eCFR search API. Keyless. Feeds
9
9
  * regulations_get_cfr_section.
10
10
  *
11
- * `title` and `part` scope both modes; a part with no title is refused rather
11
+ * `title` and `part` scope every mode; a part with no title is refused rather
12
12
  * than dropped, since part numbers repeat across titles and eCFR rejects the
13
13
  * filter outright. A live search hit's path names the part it sits in, which a
14
14
  * mirror hit cannot do — the index stores no level names.
15
15
  *
16
- * `page` / `per_page` page two lists: search results, and a part's flattened
17
- * section listing in structure mode. Live search results are one row per
18
- * section — eCFR's index answers one hit per section version, and the service
19
- * collapses the repeats — so `countBasis` says whether `totalCount` counts
20
- * sections or versions. Every notice a response carries is composed into one
21
- * string, since `notice` is last-wins.
16
+ * Versions mode lists the dates a part's or section's text changed, from the
17
+ * versioner's versions endpoint, in eCFR's order (document order, oldest first
18
+ * within each identifier); each row's `date` reads that version through
19
+ * regulations_get_cfr_section. Its `section` resolves through the read path's
20
+ * own candidates, so the cite forms that tool accepts list the same history.
21
+ *
22
+ * `page` / `per_page` page three lists: search results, a part's flattened
23
+ * section listing in structure mode, and versions. Live search results are one
24
+ * row per section — eCFR's index answers one hit per section version, and the
25
+ * service collapses the repeats — so `countBasis` says whether `totalCount`
26
+ * counts sections or versions. Every notice a response carries is composed into
27
+ * one string, since `notice` is last-wins.
22
28
  * @module mcp-server/tools/definitions/browse-cfr.tool
23
29
  */
24
30
  import { z } from '@cyanheads/mcp-ts-core';
@@ -27,17 +33,21 @@ export declare const browseCfrTool: import("@cyanheads/mcp-ts-core").ToolDefinit
27
33
  mode: z.ZodEnum<{
28
34
  search: "search";
29
35
  structure: "structure";
36
+ versions: "versions";
30
37
  }>;
31
38
  title: z.ZodOptional<z.ZodNumber>;
32
39
  part: z.ZodOptional<z.ZodString>;
33
40
  query: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
34
41
  date: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
42
+ section: z.ZodOptional<z.ZodString>;
43
+ changed_since: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
35
44
  page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
36
- per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
45
+ per_page: z.ZodDefault<z.ZodLazy<z.ZodNumber>>;
37
46
  }, z.core.$strip>, z.ZodObject<{
38
47
  mode: z.ZodEnum<{
39
48
  search: "search";
40
49
  structure: "structure";
50
+ versions: "versions";
41
51
  }>;
42
52
  date: z.ZodOptional<z.ZodString>;
43
53
  nodes: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -66,6 +76,19 @@ export declare const browseCfrTool: import("@cyanheads/mcp-ts-core").ToolDefinit
66
76
  excerpt: z.ZodString;
67
77
  cfrCite: z.ZodString;
68
78
  }, z.core.$strip>>>;
79
+ versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
80
+ type: z.ZodString;
81
+ identifier: z.ZodString;
82
+ heading: z.ZodString;
83
+ part: z.ZodString;
84
+ subpart: z.ZodNullable<z.ZodString>;
85
+ cfrCite: z.ZodString;
86
+ date: z.ZodString;
87
+ issueDate: z.ZodString;
88
+ substantive: z.ZodBoolean;
89
+ removed: z.ZodBoolean;
90
+ }, z.core.$strip>>>;
91
+ latestAmendmentDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
92
  }, z.core.$strip>, readonly [{
70
93
  readonly reason: "query_required";
71
94
  readonly code: JsonRpcErrorCode.ValidationError;
@@ -82,6 +105,16 @@ export declare const browseCfrTool: import("@cyanheads/mcp-ts-core").ToolDefinit
82
105
  readonly code: JsonRpcErrorCode.ValidationError;
83
106
  readonly when: "A part was given with no title. Part identifiers repeat across titles, and eCFR rejects a part filter that names no title.";
84
107
  readonly recovery: "Add the title the part belongs to (e.g. title 40 with part 58), or drop part to search or browse the whole title set.";
108
+ }, {
109
+ readonly reason: "versions_scope_required";
110
+ readonly code: JsonRpcErrorCode.ValidationError;
111
+ readonly when: "Versions mode with no title; with a title but neither part nor changed_since; or with a section but no part.";
112
+ readonly recovery: "Pass title with part (and optionally section) for a part's or section's history, or title with changed_since for what changed across the title.";
113
+ }, {
114
+ readonly reason: "conflicting_title";
115
+ readonly code: JsonRpcErrorCode.ValidationError;
116
+ readonly when: "Versions mode with section written as a full cite (\"21 CFR 141.61\") naming a different title than title.";
117
+ readonly recovery: "Set title to the title the cite names, or pass the section without its title prefix (\"141.61\").";
85
118
  }, {
86
119
  readonly reason: "date_out_of_range";
87
120
  readonly code: JsonRpcErrorCode.ValidationError;
@@ -1 +1 @@
1
- {"version":3,"file":"browse-cfr.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browse-cfr.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAsB,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAyJjE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiYxB,CAAC"}
1
+ {"version":3,"file":"browse-cfr.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browse-cfr.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAsB,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAgMjE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0iBxB,CAAC"}