@cyanheads/federal-regulations-mcp-server 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +6 -4
- package/changelog/0.5.x/0.5.2.md +32 -0
- package/dist/mcp-server/resources/definitions/cfr-section.resource.d.ts +8 -2
- package/dist/mcp-server/resources/definitions/cfr-section.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/cfr-section.resource.js +21 -8
- package/dist/mcp-server/resources/definitions/cfr-section.resource.js.map +1 -1
- package/dist/mcp-server/resources/definitions/index.d.ts +5 -0
- package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browse-cfr.tool.d.ts +6 -4
- package/dist/mcp-server/tools/definitions/browse-cfr.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/browse-cfr.tool.js +46 -19
- package/dist/mcp-server/tools/definitions/browse-cfr.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-cfr-section.tool.d.ts +15 -3
- package/dist/mcp-server/tools/definitions/get-cfr-section.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-cfr-section.tool.js +67 -13
- package/dist/mcp-server/tools/definitions/get-cfr-section.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +10 -0
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-rules.tool.js +1 -1
- package/dist/mcp-server/tools/definitions/search-rules.tool.js.map +1 -1
- package/dist/services/ecfr/cite.d.ts +26 -4
- package/dist/services/ecfr/cite.d.ts.map +1 -1
- package/dist/services/ecfr/cite.js +36 -4
- package/dist/services/ecfr/cite.js.map +1 -1
- package/dist/services/ecfr/ecfr-service.d.ts +42 -1
- package/dist/services/ecfr/ecfr-service.d.ts.map +1 -1
- package/dist/services/ecfr/ecfr-service.js +96 -16
- package/dist/services/ecfr/ecfr-service.js.map +1 -1
- package/dist/services/ecfr/read-section.d.ts +25 -10
- package/dist/services/ecfr/read-section.d.ts.map +1 -1
- package/dist/services/ecfr/read-section.js +57 -18
- package/dist/services/ecfr/read-section.js.map +1 -1
- package/dist/services/ecfr/types.d.ts +39 -1
- package/dist/services/ecfr/types.d.ts.map +1 -1
- package/dist/services/ecfr/xml.d.ts +22 -3
- package/dist/services/ecfr/xml.d.ts.map +1 -1
- package/dist/services/ecfr/xml.js +615 -89
- package/dist/services/ecfr/xml.js.map +1 -1
- package/dist/services/ecfr-mirror/ecfr-mirror.d.ts +16 -5
- package/dist/services/ecfr-mirror/ecfr-mirror.d.ts.map +1 -1
- package/dist/services/ecfr-mirror/ecfr-mirror.js +33 -17
- package/dist/services/ecfr-mirror/ecfr-mirror.js.map +1 -1
- package/package.json +2 -2
- package/server.json +3 -3
- package/dist/mcp-server/tools/definitions/cfr-part.d.ts +0 -22
- package/dist/mcp-server/tools/definitions/cfr-part.d.ts.map +0 -1
- package/dist/mcp-server/tools/definitions/cfr-part.js +0 -27
- package/dist/mcp-server/tools/definitions/cfr-part.js.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** federal-regulations-mcp-server
|
|
4
|
-
**Version:** 0.5.
|
|
4
|
+
**Version:** 0.5.2
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `0.13.6`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
|
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** federal-regulations-mcp-server
|
|
4
|
-
**Version:** 0.5.
|
|
4
|
+
**Version:** 0.5.2
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `0.13.6`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/federal-regulations-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/federal-regulations-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -78,8 +78,10 @@ Both resources mirror a tool (`regulations_get_document`, `regulations_get_cfr_s
|
|
|
78
78
|
|
|
79
79
|
### `regulations_get_cfr_section` <sub>tool</sub>
|
|
80
80
|
|
|
81
|
-
- 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 `date` reads text from 2017-01-01 through the title's up-to-date date
|
|
81
|
+
- 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
|
|
82
82
|
- 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
|
|
83
|
+
- 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
|
|
84
|
+
- Superscripts read `^x` and subscripts `_x` (`3 × 10^−8`, `CO_{2}e`), footnote markers `[n]`, and diacritics and overlines are combining marks (`x̄`)
|
|
83
85
|
|
|
84
86
|
---
|
|
85
87
|
|
|
@@ -116,7 +118,7 @@ Both resources mirror a tool (`regulations_get_document`, `regulations_get_cfr_s
|
|
|
116
118
|
|
|
117
119
|
### `regulations://cfr/{title}/{part}/{section}` <sub>resource</sub>
|
|
118
120
|
|
|
119
|
-
- Sections only, at the current date and the tool's default 64,000-character window; the `section`
|
|
121
|
+
- 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"`)
|
|
120
122
|
- `source` (`mirror` / `live`) reports provenance. `bodyTextNextOffset` marks a section longer than the window; read the rest through `regulations_get_cfr_section` with `offset`
|
|
121
123
|
|
|
122
124
|
## Features
|
|
@@ -128,7 +130,7 @@ Federal Register / eCFR / Regulations.gov-specific:
|
|
|
128
130
|
- One workflow over three official sources: the agent calls regulatory verbs (`search_rules`, `get_cfr_section`, `find_comments`) rather than three API clients
|
|
129
131
|
- Cross-source stitching: every Federal Register document surfaces its docket ID and CFR-part handles, which feed the proposal → comments → final rule → codified text trace
|
|
130
132
|
- Keyless core: the five Federal Register and eCFR tools need no key. `regulations_get_docket` and `regulations_find_comments` need `REGULATIONS_GOV_API_KEY` (free at [api.data.gov/signup](https://api.data.gov/signup/), 1,000 requests/hour) and fail with `auth_required`, naming the variable and signup URL, when it is missing or rejected
|
|
131
|
-
- Locally mirrored codified CFR: the eCFR syncs into embedded SQLite + FTS5 for exact-cite reads and full-text search, and falls back to the live API for historical dates, whole parts, appendices, and titles
|
|
133
|
+
- Locally mirrored codified CFR: the eCFR syncs into embedded SQLite + FTS5 for exact-cite reads and full-text search, and falls back to the live API for historical dates, whole parts, appendices, titles outside the mirror, and titles eCFR has re-issued since the mirror last synced them
|
|
132
134
|
- A 45-second budget per request, shared by every upstream call, retry, and backoff, so a stalled source answers with `upstream_unavailable` inside a client's timeout
|
|
133
135
|
|
|
134
136
|
Agent-friendly output:
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "eCFR text renders superscripts, subscripts, footnote markers, and diacritics; whole-part reads return the part's heading, Authority, Source, and notes; the cfrCite the server returns reads back as section input; and a mirrored title behind eCFR's latest issue is read live. Existing mirrors need a mirror:refresh."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.5.2 — 2026-09-25
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`authority`, `sourceNote`, and `notes`** on whole-part `regulations_get_cfr_section` reads, and `authority` / `sourceNote` on each `sections[]` entry whose subpart or subject group states its own. Single-section and appendix reads carry none [#52](https://github.com/cyanheads/federal-regulations-mcp-server/issues/52).
|
|
12
|
+
- **Cite-form `section` and `part` inputs** on `regulations_get_cfr_section` and the `regulations://cfr/{title}/{part}/{section}` resource: `section` takes the `cfrCite` the server returns (`"40 CFR 141.61"`, `"40 C.F.R. 141.61"`, `"14 CFR 241 § 25"`) and `part` takes `"Part 141"`; `notice` names each rewrite [#53](https://github.com/cyanheads/federal-regulations-mcp-server/issues/53).
|
|
13
|
+
- **`conflicting_title`** (`ValidationError`) when a `section` cite names another title (`"21 CFR 141.61"` with `title: 40`), which answered `not_found` before.
|
|
14
|
+
|
|
15
|
+
## Changed
|
|
16
|
+
|
|
17
|
+
- **`bodyText` renders inline markup**: superscripts `^x` and subscripts `_x` (`3 × 10^−8`, `CO_{2}e`), footnote markers `[n]`, `<AC>` diacritics and `<E T="7503">` overlines as combining marks (`x̄`, `R̅M̅`), no stray space after an inline element, and a section's own `<SECAUTH>` / `<APPRO>` kept [#51](https://github.com/cyanheads/federal-regulations-mcp-server/issues/51), [#60](https://github.com/cyanheads/federal-regulations-mcp-server/issues/60). `bodyTextLength`, `bodyTextNextOffset`, and `sections[].offset` values saved from 0.5.1 no longer line up.
|
|
18
|
+
- **Whole-part `heading`** is the part's own (`PART 141—NATIONAL PRIMARY DRINKING WATER REGULATIONS`), not `Part 141`.
|
|
19
|
+
- **Mirror `INGEST_VERSION` 3 → 4**: an existing mirror reads as stale and every read goes live until `bun run mirror:refresh` re-derives each held title.
|
|
20
|
+
- **Mirror freshness is per title**: current section reads and mirror searches use a title only while its `cfr_part_index.issue_date` is at eCFR's latest issue, and read it live otherwise. On a ready mirror these reads now need eCFR's titles document and fail `upstream_unavailable` when it can't be read [#55](https://github.com/cyanheads/federal-regulations-mcp-server/issues/55).
|
|
21
|
+
- **`regulations_browse_cfr` search** reports `date` on mirror results too: the titles document's index date.
|
|
22
|
+
- **`regulations_browse_cfr` structure mode** holds each title's parsed structure document by title and date (4 entries, 15 minutes), so paging a part costs one upstream read [#44](https://github.com/cyanheads/federal-regulations-mcp-server/issues/44).
|
|
23
|
+
|
|
24
|
+
## Fixed
|
|
25
|
+
|
|
26
|
+
- **XML tag stripping, block extraction, and `isCompleteXmlDocument`** run in linear time on unclosed openers [#57](https://github.com/cyanheads/federal-regulations-mcp-server/issues/57), [#62](https://github.com/cyanheads/federal-regulations-mcp-server/issues/62). A literal `<` in a search excerpt now survives (`systems <500 service connections`).
|
|
27
|
+
- **Structure-mode `cfrCite` for dotless sections** names the part (`14 CFR 241 § 01`, not `14 CFR 01`) [#59](https://github.com/cyanheads/federal-regulations-mcp-server/issues/59).
|
|
28
|
+
- **Mirror ingest** writes a title's part index only after its section rows commit, so an aborted run never dates older rows as current.
|
|
29
|
+
|
|
30
|
+
## Dependencies
|
|
31
|
+
|
|
32
|
+
- `@types/node` `26.6.1 → 26.6.2` (dev).
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* @fileoverview regulations://cfr/{title}/{part}/{section} — codified text of a
|
|
3
3
|
* current CFR section, the same payload as regulations_get_cfr_section at the
|
|
4
4
|
* current date and its default window, for clients that support injectable
|
|
5
|
-
* context. Mirror-backed with a live eCFR fallback, and the
|
|
6
|
-
* way the tool resolves
|
|
5
|
+
* context. Mirror-backed with a live eCFR fallback, and the part and section
|
|
6
|
+
* resolve the way the tool resolves them ("Part 141"; "61", "§ 141.61",
|
|
7
|
+
* "141.61(c)", "40 CFR 141.61"). Every datum is also
|
|
7
8
|
* reachable through the tool surface, which is where a section longer than one
|
|
8
9
|
* window is paged: a resource read takes no offset.
|
|
9
10
|
*
|
|
@@ -23,6 +24,11 @@ export declare const cfrSectionResource: import("@cyanheads/mcp-ts-core").Resour
|
|
|
23
24
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
24
25
|
readonly when: "No such title/part/section in the current CFR, under the section as given or any form it resolves to.";
|
|
25
26
|
readonly recovery: "Verify the cite with regulations_browse_cfr (structure mode) and pass the identifier it lists — a section is normally part.section (\"141.61\"). The part or section may not exist or may be reserved.";
|
|
27
|
+
}, {
|
|
28
|
+
readonly reason: "conflicting_title";
|
|
29
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
30
|
+
readonly when: "The section is written as a full cite (\"21 CFR 141.61\") naming a different title than the URI.";
|
|
31
|
+
readonly recovery: "Put the title the cite names in the URI, or pass the section without its title prefix (\"141.61\").";
|
|
26
32
|
}, {
|
|
27
33
|
readonly reason: "upstream_unavailable";
|
|
28
34
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;GAsG7B,CAAC"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* @fileoverview regulations://cfr/{title}/{part}/{section} — codified text of a
|
|
3
3
|
* current CFR section, the same payload as regulations_get_cfr_section at the
|
|
4
4
|
* current date and its default window, for clients that support injectable
|
|
5
|
-
* context. Mirror-backed with a live eCFR fallback, and the
|
|
6
|
-
* way the tool resolves
|
|
5
|
+
* context. Mirror-backed with a live eCFR fallback, and the part and section
|
|
6
|
+
* resolve the way the tool resolves them ("Part 141"; "61", "§ 141.61",
|
|
7
|
+
* "141.61(c)", "40 CFR 141.61"). Every datum is also
|
|
7
8
|
* reachable through the tool surface, which is where a section longer than one
|
|
8
9
|
* window is paged: a resource read takes no offset.
|
|
9
10
|
*
|
|
@@ -14,21 +15,21 @@
|
|
|
14
15
|
*/
|
|
15
16
|
import { resource, z } from '@cyanheads/mcp-ts-core';
|
|
16
17
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
17
|
-
import { sectionCite } from '../../../services/ecfr/cite.js';
|
|
18
|
+
import { describePartRewrite, normalizePart, sectionCite } from '../../../services/ecfr/cite.js';
|
|
18
19
|
import { getEcfrService } from '../../../services/ecfr/ecfr-service.js';
|
|
19
|
-
import { readSection } from '../../../services/ecfr/read-section.js';
|
|
20
|
+
import { citedTitle, readSection } from '../../../services/ecfr/read-section.js';
|
|
20
21
|
import { DEFAULT_WINDOW_CHARS, windowText } from '../../../services/text-window.js';
|
|
21
22
|
export const cfrSectionResource = resource('regulations://cfr/{title}/{part}/{section}', {
|
|
22
23
|
name: 'cfr-section',
|
|
23
24
|
title: 'CFR section (current)',
|
|
24
|
-
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 section
|
|
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
26
|
mimeType: 'application/json',
|
|
26
27
|
params: z.object({
|
|
27
28
|
title: z
|
|
28
29
|
.string()
|
|
29
30
|
.regex(/^\d{1,2}$/)
|
|
30
31
|
.describe('CFR title number (1–50).'),
|
|
31
|
-
part: z.string().describe('CFR part (e.g. "50").'),
|
|
32
|
+
part: z.string().describe('CFR part (e.g. "50"); a leading "Part" is dropped.'),
|
|
32
33
|
section: z.string().describe('Section identifier (e.g. "50.1").'),
|
|
33
34
|
}),
|
|
34
35
|
errors: [
|
|
@@ -38,6 +39,12 @@ export const cfrSectionResource = resource('regulations://cfr/{title}/{part}/{se
|
|
|
38
39
|
when: 'No such title/part/section in the current CFR, under the section as given or any form it resolves to.',
|
|
39
40
|
recovery: 'Verify the cite with regulations_browse_cfr (structure mode) and pass the identifier it lists — a section is normally part.section ("141.61"). The part or section may not exist or may be reserved.',
|
|
40
41
|
},
|
|
42
|
+
{
|
|
43
|
+
reason: 'conflicting_title',
|
|
44
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
45
|
+
when: 'The section is written as a full cite ("21 CFR 141.61") naming a different title than the URI.',
|
|
46
|
+
recovery: 'Put the title the cite names in the URI, or pass the section without its title prefix ("141.61").',
|
|
47
|
+
},
|
|
41
48
|
{
|
|
42
49
|
reason: 'upstream_unavailable',
|
|
43
50
|
code: JsonRpcErrorCode.ServiceUnavailable,
|
|
@@ -48,8 +55,13 @@ export const cfrSectionResource = resource('regulations://cfr/{title}/{part}/{se
|
|
|
48
55
|
],
|
|
49
56
|
async handler(params, ctx) {
|
|
50
57
|
const titleNum = Number.parseInt(params.title, 10);
|
|
51
|
-
const
|
|
58
|
+
const written = decodeSegment(params.part);
|
|
59
|
+
const part = normalizePart(written) ?? written;
|
|
52
60
|
const section = decodeSegment(params.section);
|
|
61
|
+
const cited = citedTitle(section);
|
|
62
|
+
if (cited !== undefined && cited !== titleNum) {
|
|
63
|
+
throw ctx.fail('conflicting_title', `Section "${section}" cites title ${cited}, but title is ${titleNum}.`, { ...ctx.recoveryFor('conflicting_title') });
|
|
64
|
+
}
|
|
53
65
|
const read = await readSection(titleNum, part, section, undefined, ctx);
|
|
54
66
|
if (!read.found) {
|
|
55
67
|
const tried = read.alsoTried.length > 0 ? ` (also tried ${read.alsoTried.join(', ')})` : '';
|
|
@@ -64,6 +76,7 @@ export const cfrSectionResource = resource('regulations://cfr/{title}/{part}/{se
|
|
|
64
76
|
const resolved = read.result.section ?? section;
|
|
65
77
|
const hierarchyPath = await getEcfrService().hierarchyPath(titleNum, { part, section: resolved }, read.result.date, ctx);
|
|
66
78
|
const cut = windowText(read.result.bodyText, { offset: 0, maxChars: DEFAULT_WINDOW_CHARS });
|
|
79
|
+
const notice = [describePartRewrite(written, part), read.rewrite].filter(Boolean).join(' ');
|
|
67
80
|
return {
|
|
68
81
|
cfrCite: sectionCite(titleNum, part, resolved),
|
|
69
82
|
title: titleNum,
|
|
@@ -78,7 +91,7 @@ export const cfrSectionResource = resource('regulations://cfr/{title}/{part}/{se
|
|
|
78
91
|
bodyTextOffset: cut.offset,
|
|
79
92
|
bodyTextLength: cut.length,
|
|
80
93
|
...(cut.nextOffset !== undefined && { bodyTextNextOffset: cut.nextOffset }),
|
|
81
|
-
...(
|
|
94
|
+
...(notice && { notice }),
|
|
82
95
|
};
|
|
83
96
|
},
|
|
84
97
|
list: () => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cfr-section.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/cfr-section.resource.ts"],"names":[],"mappings":"AAAA
|
|
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,qoBAAqoB;IACvoB,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,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,uGAAuG;YAC7G,QAAQ,EACN,sMAAsM;SACzM;QACD;YACE,MAAM,E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B,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"}
|
|
@@ -23,6 +23,11 @@ export declare const allResourceDefinitions: (import("@cyanheads/mcp-ts-core").R
|
|
|
23
23
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
24
24
|
readonly when: "No such title/part/section in the current CFR, under the section as given or any form it resolves to.";
|
|
25
25
|
readonly recovery: "Verify the cite with regulations_browse_cfr (structure mode) and pass the identifier it lists — a section is normally part.section (\"141.61\"). The part or section may not exist or may be reserved.";
|
|
26
|
+
}, {
|
|
27
|
+
readonly reason: "conflicting_title";
|
|
28
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
29
|
+
readonly when: "The section is written as a full cite (\"21 CFR 141.61\") naming a different title than the URI.";
|
|
30
|
+
readonly recovery: "Put the title the cite names in the URI, or pass the section without its title prefix (\"141.61\").";
|
|
26
31
|
}, {
|
|
27
32
|
readonly reason: "upstream_unavailable";
|
|
28
33
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAyC,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview regulations_browse_cfr — navigate the CFR hierarchy (structure
|
|
3
3
|
* mode) or full-text-search the codified CFR (search mode) via eCFR. Search runs
|
|
4
|
-
* against the local mirror's FTS5 index only when the mirror
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* against the local mirror's FTS5 index only when the mirror holds every title
|
|
5
|
+
* the request covers at that title's latest eCFR issue; a title it does not
|
|
6
|
+
* hold, a title eCFR has re-issued since the mirror took it, an all-titles query
|
|
7
|
+
* against a partial mirror or one with any title behind, a historical date, or a
|
|
8
|
+
* cold deploy all route to the live eCFR search API. Keyless. Feeds
|
|
9
|
+
* regulations_get_cfr_section.
|
|
8
10
|
*
|
|
9
11
|
* `title` and `part` scope both modes; a part with no title is refused rather
|
|
10
12
|
* than dropped, since part numbers repeat across titles and eCFR rejects the
|
|
@@ -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
|
|
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;AAwJjE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuXxB,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview regulations_browse_cfr — navigate the CFR hierarchy (structure
|
|
3
3
|
* mode) or full-text-search the codified CFR (search mode) via eCFR. Search runs
|
|
4
|
-
* against the local mirror's FTS5 index only when the mirror
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* against the local mirror's FTS5 index only when the mirror holds every title
|
|
5
|
+
* the request covers at that title's latest eCFR issue; a title it does not
|
|
6
|
+
* hold, a title eCFR has re-issued since the mirror took it, an all-titles query
|
|
7
|
+
* against a partial mirror or one with any title behind, a historical date, or a
|
|
8
|
+
* cold deploy all route to the live eCFR search API. Keyless. Feeds
|
|
9
|
+
* regulations_get_cfr_section.
|
|
8
10
|
*
|
|
9
11
|
* `title` and `part` scope both modes; a part with no title is refused rather
|
|
10
12
|
* than dropped, since part numbers repeat across titles and eCFR rejects the
|
|
@@ -21,9 +23,9 @@
|
|
|
21
23
|
*/
|
|
22
24
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
23
25
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
26
|
+
import { normalizePart } from '../../../services/ecfr/cite.js';
|
|
24
27
|
import { ECFR_SEARCH_WINDOW, getEcfrService, outsideCoverageMessage, today, } from '../../../services/ecfr/ecfr-service.js';
|
|
25
28
|
import { mirrorReady, mirrorScope, mirrorSearch, } from '../../../services/ecfr-mirror/ecfr-mirror.js';
|
|
26
|
-
import { normalizePart } from './cfr-part.js';
|
|
27
29
|
import { isoDate } from './date-input.js';
|
|
28
30
|
/** Restriction clause naming the caller's own title (and part) filter, if any. */
|
|
29
31
|
function filterClause(title, part) {
|
|
@@ -33,12 +35,36 @@ function filterClause(title, part) {
|
|
|
33
35
|
? `, filtered to title ${title}`
|
|
34
36
|
: `, filtered to title ${title} part ${part}`;
|
|
35
37
|
}
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Human-readable coverage of the mirror index, for the `sourceScope` field. The
|
|
40
|
+
* mirror answers only for titles at their latest issue, so its text is the text
|
|
41
|
+
* in effect on the day the live index serves as current — the same `date` a
|
|
42
|
+
* live search reports.
|
|
43
|
+
*/
|
|
44
|
+
function describeMirrorScope(scope, date, title, part) {
|
|
38
45
|
const held = scope.complete ? 'all CFR titles' : `CFR titles ${scope.titles.join(', ')}`;
|
|
39
46
|
// The index holds section text alone, so an appendix match cannot come back
|
|
40
47
|
// from it — which is indistinguishable from no such appendix unless said.
|
|
41
|
-
return `Local mirror index — ${held}${filterClause(title, part)},
|
|
48
|
+
return `Local mirror index — ${held}${filterClause(title, part)}, section text in effect on ${date}; appendices are not indexed, so no result here is evidence about them.`;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Whether the mirror can answer a current search: it holds the title asked for
|
|
52
|
+
* at that title's latest eCFR issue, or, for an all-titles query, it holds every
|
|
53
|
+
* title and each of them is at its latest issue. A mirror built once and never
|
|
54
|
+
* refreshed keeps its rows, and a title eCFR has re-issued since would answer
|
|
55
|
+
* with superseded text.
|
|
56
|
+
*/
|
|
57
|
+
async function mirrorAnswers(scope, title, ctx) {
|
|
58
|
+
const service = getEcfrService();
|
|
59
|
+
if (title !== undefined)
|
|
60
|
+
return service.isLatestIssue(title, scope.issueDates.get(title), ctx);
|
|
61
|
+
if (!scope.complete)
|
|
62
|
+
return false;
|
|
63
|
+
for (const held of scope.titles) {
|
|
64
|
+
if (!(await service.isLatestIssue(held, scope.issueDates.get(held), ctx)))
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
return true;
|
|
42
68
|
}
|
|
43
69
|
/** Human-readable coverage of the live eCFR search index, for `sourceScope`. */
|
|
44
70
|
function describeLiveScope(date, title, part) {
|
|
@@ -62,7 +88,7 @@ const structureNode = z
|
|
|
62
88
|
cfrCite: z
|
|
63
89
|
.string()
|
|
64
90
|
.nullable()
|
|
65
|
-
.describe('Assembled cite → regulations_get_cfr_section: "40 CFR 50.1" for a section, "Appendix A-1 to Part 50, Title 40" for an appendix. Null on a level with no read path (title, subtitle, chapter).'),
|
|
91
|
+
.describe('Assembled cite → regulations_get_cfr_section: "40 CFR 50.1" for a section ("14 CFR 241 § 25" for one numbered without its part), "Appendix A-1 to Part 50, Title 40" for an appendix. Null on a level with no read path (title, subtitle, chapter).'),
|
|
66
92
|
appendix: z
|
|
67
93
|
.string()
|
|
68
94
|
.nullable()
|
|
@@ -119,7 +145,7 @@ export const browseCfrTool = tool('regulations_browse_cfr', {
|
|
|
119
145
|
part: z
|
|
120
146
|
.string()
|
|
121
147
|
.optional()
|
|
122
|
-
.describe('CFR part within the title, in both modes — structure mode lists every section and appendix in the part, flattened and paged by page/per_page; search mode restricts matches to text inside that part. Requires title; a part on its own is rejected. Parts can be alphanumeric ("1203a", "16A") and are matched exactly, so pass the identifier as eCFR writes it — "58"
|
|
148
|
+
.describe('CFR part within the title, in both modes — structure mode lists every section and appendix in the part, flattened and paged by page/per_page; search mode restricts matches to text inside that part. Requires title; a part on its own is rejected. Parts can be alphanumeric ("1203a", "16A") and are matched exactly once a leading "Part" or "Pt." is dropped, so pass the identifier as eCFR writes it — "58" ("Part 58" also reads as 58), not "058".'),
|
|
123
149
|
query: z
|
|
124
150
|
.union([z.literal(''), z.string().min(2).describe('Search phrase, at least 2 characters.')])
|
|
125
151
|
.optional()
|
|
@@ -149,7 +175,7 @@ export const browseCfrTool = tool('regulations_browse_cfr', {
|
|
|
149
175
|
date: z
|
|
150
176
|
.string()
|
|
151
177
|
.optional()
|
|
152
|
-
.describe('Resolved point-in-time date — the hierarchy snapshot (structure mode), or the day whose section text was searched (search mode
|
|
178
|
+
.describe('Resolved point-in-time date — the hierarchy snapshot (structure mode), or the day whose section text was searched (search mode).'),
|
|
153
179
|
nodes: z
|
|
154
180
|
.array(structureNode)
|
|
155
181
|
.optional()
|
|
@@ -298,21 +324,22 @@ export const browseCfrTool = tool('regulations_browse_cfr', {
|
|
|
298
324
|
if (!query) {
|
|
299
325
|
throw ctx.fail('query_required', undefined, { ...ctx.recoveryFor('query_required') });
|
|
300
326
|
}
|
|
301
|
-
// The mirror answers only what it actually holds
|
|
302
|
-
// or an all-titles query against a scoped
|
|
303
|
-
// a corpus that never contained the
|
|
304
|
-
//
|
|
327
|
+
// The mirror answers only what it actually holds, as of the issue eCFR serves
|
|
328
|
+
// now. A title outside its scope, or an all-titles query against a scoped
|
|
329
|
+
// mirror, would come back empty from a corpus that never contained the
|
|
330
|
+
// answer, and a title behind its latest issue would match superseded text —
|
|
331
|
+
// so those go to live eCFR, as section reads already do on a mirror miss.
|
|
305
332
|
const scope = !input.date && (await mirrorReady()) ? await mirrorScope() : null;
|
|
306
|
-
const answering = scope && (input.title
|
|
307
|
-
? scope
|
|
308
|
-
: null;
|
|
333
|
+
const answering = scope && (await mirrorAnswers(scope, input.title, ctx)) ? scope : null;
|
|
309
334
|
const { page, per_page: perPage } = input;
|
|
310
335
|
let provenance;
|
|
311
336
|
let response;
|
|
312
337
|
if (answering) {
|
|
338
|
+
const date = await service.currentDate(ctx);
|
|
313
339
|
provenance = {
|
|
314
340
|
source: 'mirror',
|
|
315
|
-
sourceScope: describeMirrorScope(answering, input.title, part),
|
|
341
|
+
sourceScope: describeMirrorScope(answering, date, input.title, part),
|
|
342
|
+
date,
|
|
316
343
|
};
|
|
317
344
|
response = await mirrorSearch(query, input.title, part, perPage, (page - 1) * perPage);
|
|
318
345
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browse-cfr.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/browse-cfr.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,KAAK,GACN,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAEL,WAAW,EACX,WAAW,EACX,YAAY,GACb,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,kFAAkF;AAClF,SAAS,YAAY,CAAC,KAAyB,EAAE,IAAwB;IACvE,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACnC,OAAO,IAAI,KAAK,SAAS;QACvB,CAAC,CAAC,uBAAuB,KAAK,EAAE;QAChC,CAAC,CAAC,uBAAuB,KAAK,SAAS,IAAI,EAAE,CAAC;AAClD,CAAC;AAED,gFAAgF;AAChF,SAAS,mBAAmB,CAC1B,KAAkB,EAClB,KAAyB,EACzB,IAAwB;IAExB,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,cAAc,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACzF,4EAA4E;IAC5E,0EAA0E;IAC1E,OAAO,wBAAwB,IAAI,GAAG,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,oGAAoG,CAAC;AACtK,CAAC;AAED,gFAAgF;AAChF,SAAS,iBAAiB,CACxB,IAAY,EACZ,KAAyB,EACzB,IAAwB;IAExB,OAAO,oCAAoC,YAAY,CAAC,KAAK,EAAE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AC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;gBAC5C,IAAI,CAAC,CAAC,QAAQ;oBAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACrD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,MAAM,CAAC,CAAC,OAAO,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACpE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC;gBACnC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;gBACtB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjB,CAAC;QACH,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC3D,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* @fileoverview regulations_get_cfr_section — read the codified text at a CFR
|
|
3
3
|
* location via eCFR, current or as of a past date: one section, a whole part, or
|
|
4
4
|
* one appendix. Mirror row lookup is the primary path for a current single
|
|
5
|
-
* section; historical dates, whole-part fetches, appendix reads,
|
|
6
|
-
* mirror
|
|
5
|
+
* section; historical dates, whole-part fetches, appendix reads, a title the
|
|
6
|
+
* mirror holds at an older issue than eCFR's latest, and a cold mirror fall back
|
|
7
|
+
* to the live eCFR versioner. Keyless.
|
|
7
8
|
*
|
|
8
9
|
* An appendix is a location in the same hierarchy as a section, reached the same
|
|
9
10
|
* way and answered in the same shape, so it is an input to this tool rather than
|
|
@@ -11,7 +12,8 @@
|
|
|
11
12
|
* free-form prose, not a letter — which is what regulations_browse_cfr emits.
|
|
12
13
|
*
|
|
13
14
|
* A section cite is resolved the way people write one ("61", "§ 141.61",
|
|
14
|
-
* "141.61(c)") by `readSection`,
|
|
15
|
+
* "141.61(c)", "40 CFR 141.61") by `readSection`, a part the way `normalizePart`
|
|
16
|
+
* reads one ("Part 141"), and every read returns its text as one bounded
|
|
15
17
|
* character window, on the same paging contract as regulations_get_document's
|
|
16
18
|
* full text. A date is checked against the title's up-to-date date before any
|
|
17
19
|
* text request goes out.
|
|
@@ -40,6 +42,9 @@ export declare const getCfrSectionTool: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
40
42
|
live: "live";
|
|
41
43
|
mirror: "mirror";
|
|
42
44
|
}>;
|
|
45
|
+
authority: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
+
sourceNote: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
+
notes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
48
|
bodyText: z.ZodString;
|
|
44
49
|
bodyTextOffset: z.ZodNumber;
|
|
45
50
|
bodyTextLength: z.ZodNumber;
|
|
@@ -49,6 +54,8 @@ export declare const getCfrSectionTool: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
49
54
|
heading: z.ZodString;
|
|
50
55
|
cfrCite: z.ZodString;
|
|
51
56
|
offset: z.ZodNumber;
|
|
57
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
58
|
+
sourceNote: z.ZodOptional<z.ZodString>;
|
|
52
59
|
}, z.core.$strip>>>;
|
|
53
60
|
appendices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
61
|
appendix: z.ZodString;
|
|
@@ -69,6 +76,11 @@ export declare const getCfrSectionTool: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
69
76
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
70
77
|
readonly when: "Both section and appendix were given. They name two different locations, and picking one silently would return text the call did not ask for.";
|
|
71
78
|
readonly recovery: "Send section or appendix, not both; make two calls to read both.";
|
|
79
|
+
}, {
|
|
80
|
+
readonly reason: "conflicting_title";
|
|
81
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
82
|
+
readonly when: "section is written as a full cite (\"21 CFR 141.61\") naming a different title than title.";
|
|
83
|
+
readonly recovery: "Set title to the title the cite names, or pass the section without its title prefix (\"141.61\").";
|
|
72
84
|
}, {
|
|
73
85
|
readonly reason: "date_out_of_range";
|
|
74
86
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-cfr-section.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-cfr-section.tool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"get-cfr-section.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-cfr-section.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAiBjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0c5B,CAAC"}
|