@cyanheads/epa-mcp-server 0.4.0 → 0.4.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.
- package/AGENTS.md +5 -5
- package/CLAUDE.md +5 -5
- package/Dockerfile +3 -3
- package/README.md +24 -19
- package/changelog/0.4.x/0.4.1.md +34 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/resources/definitions/facility.resource.d.ts +8 -1
- package/dist/mcp-server/resources/definitions/facility.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/facility.resource.js +13 -7
- package/dist/mcp-server/resources/definitions/facility.resource.js.map +1 -1
- package/dist/mcp-server/resources/definitions/index.d.ts +7 -1
- package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-facility.tool.d.ts +30 -2
- package/dist/mcp-server/tools/definitions/get-facility.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-facility.tool.js +208 -43
- package/dist/mcp-server/tools/definitions/get-facility.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-tri-releases.tool.d.ts +4 -2
- package/dist/mcp-server/tools/definitions/get-tri-releases.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-tri-releases.tool.js +12 -5
- package/dist/mcp-server/tools/definitions/get-tri-releases.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +116 -16
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-facilities.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-facilities.tool.js +34 -16
- package/dist/mcp-server/tools/definitions/search-facilities.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-superfund.tool.d.ts +3 -1
- package/dist/mcp-server/tools/definitions/search-superfund.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-superfund.tool.js +11 -1
- package/dist/mcp-server/tools/definitions/search-superfund.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-tri-releases.tool.d.ts +7 -0
- package/dist/mcp-server/tools/definitions/search-tri-releases.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-tri-releases.tool.js +21 -9
- package/dist/mcp-server/tools/definitions/search-tri-releases.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-violations.tool.d.ts +20 -3
- package/dist/mcp-server/tools/definitions/search-violations.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-violations.tool.js +84 -15
- package/dist/mcp-server/tools/definitions/search-violations.tool.js.map +1 -1
- package/dist/services/airnow/airnow-service.d.ts.map +1 -1
- package/dist/services/airnow/airnow-service.js +9 -3
- package/dist/services/airnow/airnow-service.js.map +1 -1
- package/dist/services/call-budget.d.ts +22 -0
- package/dist/services/call-budget.d.ts.map +1 -0
- package/dist/services/call-budget.js +28 -0
- package/dist/services/call-budget.js.map +1 -0
- package/dist/services/dmap/dmap-service.d.ts +43 -13
- package/dist/services/dmap/dmap-service.d.ts.map +1 -1
- package/dist/services/dmap/dmap-service.js +270 -68
- package/dist/services/dmap/dmap-service.js.map +1 -1
- package/dist/services/echo/echo-service.d.ts +38 -11
- package/dist/services/echo/echo-service.d.ts.map +1 -1
- package/dist/services/echo/echo-service.js +417 -223
- package/dist/services/echo/echo-service.js.map +1 -1
- package/dist/services/echo/types.d.ts +167 -80
- package/dist/services/echo/types.d.ts.map +1 -1
- package/dist/services/ejscreen/ejscreen-service.d.ts.map +1 -1
- package/dist/services/ejscreen/ejscreen-service.js +9 -3
- package/dist/services/ejscreen/ejscreen-service.js.map +1 -1
- package/package.json +6 -6
- package/server.json +3 -3
|
@@ -89,22 +89,47 @@ export declare const coreToolDefinitions: readonly [import("@cyanheads/mcp-ts-co
|
|
|
89
89
|
tri: import("zod").ZodBoolean;
|
|
90
90
|
sdwa: import("zod").ZodBoolean;
|
|
91
91
|
}, import("zod/v4/core").$strip>;
|
|
92
|
+
triFacilityIds: import("zod").ZodArray<import("zod").ZodString>;
|
|
92
93
|
triReleasesTransfersInLbs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
94
|
+
triReleasesTransfersYear: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
93
95
|
compliance: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
94
96
|
mediaStatusCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
95
97
|
mediaStatusDescription: import("zod").ZodOptional<import("zod").ZodString>;
|
|
96
98
|
quartersInViolation: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
97
99
|
}, import("zod/v4/core").$strip>>;
|
|
100
|
+
programCompliance: import("zod").ZodArray<import("zod").ZodObject<{
|
|
101
|
+
statute: import("zod").ZodString;
|
|
102
|
+
currentStatus: import("zod").ZodOptional<import("zod").ZodString>;
|
|
103
|
+
quartersInNoncompliance: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
104
|
+
quartersInSignificantNoncompliance: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
105
|
+
inspections: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
106
|
+
lastInspectionDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
107
|
+
informalActions: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
108
|
+
formalActions: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
109
|
+
totalPenaltiesInDollars: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
110
|
+
threeYearPeriodStart: import("zod").ZodOptional<import("zod").ZodString>;
|
|
111
|
+
fiveYearPeriodStart: import("zod").ZodOptional<import("zod").ZodString>;
|
|
112
|
+
periodEnd: import("zod").ZodOptional<import("zod").ZodString>;
|
|
113
|
+
}, import("zod/v4/core").$strip>>;
|
|
98
114
|
inspections: import("zod").ZodArray<import("zod").ZodObject<{
|
|
115
|
+
category: import("zod").ZodOptional<import("zod").ZodString>;
|
|
99
116
|
activityType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
100
117
|
activityDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
101
118
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
119
|
+
statute: import("zod").ZodOptional<import("zod").ZodString>;
|
|
120
|
+
sourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
121
|
+
leadAgency: import("zod").ZodOptional<import("zod").ZodString>;
|
|
102
122
|
}, import("zod/v4/core").$strip>>;
|
|
123
|
+
inspectionsTotal: import("zod").ZodNumber;
|
|
103
124
|
formalActions: import("zod").ZodArray<import("zod").ZodObject<{
|
|
104
125
|
caseId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
105
126
|
settlementDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
106
127
|
penaltyAssessedInDollars: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
107
128
|
actionType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
129
|
+
actionDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
130
|
+
statute: import("zod").ZodOptional<import("zod").ZodString>;
|
|
131
|
+
sourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
132
|
+
leadAgency: import("zod").ZodOptional<import("zod").ZodString>;
|
|
108
133
|
}, import("zod/v4/core").$strip>>;
|
|
109
134
|
airCompliance: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
110
135
|
programId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -119,9 +144,12 @@ export declare const coreToolDefinitions: readonly [import("@cyanheads/mcp-ts-co
|
|
|
119
144
|
}, import("zod/v4/core").$strip>, readonly [{
|
|
120
145
|
readonly reason: "facility_not_found";
|
|
121
146
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
122
|
-
readonly when: "ECHO
|
|
147
|
+
readonly when: "ECHO has no facility for the given Registry ID.";
|
|
123
148
|
readonly recovery: "Verify the Registry ID using epa_search_facilities and retry with a valid ID.";
|
|
124
|
-
|
|
149
|
+
readonly thrownBy: "service";
|
|
150
|
+
}], {
|
|
151
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
152
|
+
}>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
125
153
|
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
126
154
|
zip_code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
127
155
|
program: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -138,8 +166,8 @@ export declare const coreToolDefinitions: readonly [import("@cyanheads/mcp-ts-co
|
|
|
138
166
|
civil: "civil";
|
|
139
167
|
criminal: "criminal";
|
|
140
168
|
}>>;
|
|
141
|
-
date_filed_start: import("zod").ZodOptional<import("zod").ZodString
|
|
142
|
-
date_filed_end: import("zod").ZodOptional<import("zod").ZodString
|
|
169
|
+
date_filed_start: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodString]>>;
|
|
170
|
+
date_filed_end: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodString]>>;
|
|
143
171
|
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
144
172
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
145
173
|
cases: import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -161,7 +189,24 @@ export declare const coreToolDefinitions: readonly [import("@cyanheads/mcp-ts-co
|
|
|
161
189
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
162
190
|
readonly when: "Neither state nor zip_code was provided.";
|
|
163
191
|
readonly recovery: "Provide at least one of state or zip_code to scope the enforcement case search.";
|
|
164
|
-
}
|
|
192
|
+
}, {
|
|
193
|
+
readonly reason: "invalid_date";
|
|
194
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
195
|
+
readonly when: "date_filed_start or date_filed_end is not a real calendar date, such as 2024-02-30.";
|
|
196
|
+
readonly recovery: "Pass a real calendar date in YYYY-MM-DD form, such as 2024-02-29.";
|
|
197
|
+
}, {
|
|
198
|
+
readonly reason: "date_range_inverted";
|
|
199
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
200
|
+
readonly when: "date_filed_start is later than date_filed_end.";
|
|
201
|
+
readonly recovery: "Swap the two dates so date_filed_start is on or before date_filed_end.";
|
|
202
|
+
}, {
|
|
203
|
+
readonly reason: "criminal_date_filter";
|
|
204
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
205
|
+
readonly when: "case_type \"criminal\" was combined with a filing-date bound, which ECHO records for civil cases only.";
|
|
206
|
+
readonly recovery: "Drop date_filed_start and date_filed_end to search criminal cases, or set case_type to civil.";
|
|
207
|
+
}], {
|
|
208
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
209
|
+
}>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
165
210
|
facility_id: import("zod").ZodString;
|
|
166
211
|
year: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
167
212
|
chemical_name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -183,8 +228,10 @@ export declare const coreToolDefinitions: readonly [import("@cyanheads/mcp-ts-co
|
|
|
183
228
|
readonly reason: "no_releases_found";
|
|
184
229
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
185
230
|
readonly when: "No TRI records found for the given facility ID and filters.";
|
|
186
|
-
readonly recovery: "Take the 15-character TRI facility ID from the facilityId field of epa_search_tri_releases. TRI data lags 18 months — try an earlier year.";
|
|
187
|
-
}],
|
|
231
|
+
readonly recovery: "Take the 15-character TRI facility ID from the facilityId field of epa_search_tri_releases, or from epa_get_facility triFacilityIds for a known Registry ID. TRI data lags 18 months — try an earlier year.";
|
|
232
|
+
}], {
|
|
233
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
234
|
+
}>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
188
235
|
state: import("zod").ZodString;
|
|
189
236
|
county: import("zod").ZodOptional<import("zod").ZodString>;
|
|
190
237
|
year: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -216,6 +263,7 @@ export declare const coreToolDefinitions: readonly [import("@cyanheads/mcp-ts-co
|
|
|
216
263
|
readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
217
264
|
readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
218
265
|
readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
266
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
219
267
|
}>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
220
268
|
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
221
269
|
city: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -257,7 +305,9 @@ export declare const coreToolDefinitions: readonly [import("@cyanheads/mcp-ts-co
|
|
|
257
305
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
258
306
|
readonly when: "Latitude and longitude were provided without radius_miles.";
|
|
259
307
|
readonly recovery: "Provide radius_miles together with latitude and longitude for a proximity search.";
|
|
260
|
-
}],
|
|
308
|
+
}], {
|
|
309
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
310
|
+
}>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
261
311
|
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
262
312
|
zip_code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
263
313
|
has_violation: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
@@ -434,22 +484,47 @@ export declare const allToolDefinitions: readonly [import("@cyanheads/mcp-ts-cor
|
|
|
434
484
|
tri: import("zod").ZodBoolean;
|
|
435
485
|
sdwa: import("zod").ZodBoolean;
|
|
436
486
|
}, import("zod/v4/core").$strip>;
|
|
487
|
+
triFacilityIds: import("zod").ZodArray<import("zod").ZodString>;
|
|
437
488
|
triReleasesTransfersInLbs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
489
|
+
triReleasesTransfersYear: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
438
490
|
compliance: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
439
491
|
mediaStatusCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
440
492
|
mediaStatusDescription: import("zod").ZodOptional<import("zod").ZodString>;
|
|
441
493
|
quartersInViolation: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
442
494
|
}, import("zod/v4/core").$strip>>;
|
|
495
|
+
programCompliance: import("zod").ZodArray<import("zod").ZodObject<{
|
|
496
|
+
statute: import("zod").ZodString;
|
|
497
|
+
currentStatus: import("zod").ZodOptional<import("zod").ZodString>;
|
|
498
|
+
quartersInNoncompliance: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
499
|
+
quartersInSignificantNoncompliance: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
500
|
+
inspections: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
501
|
+
lastInspectionDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
502
|
+
informalActions: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
503
|
+
formalActions: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
504
|
+
totalPenaltiesInDollars: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
505
|
+
threeYearPeriodStart: import("zod").ZodOptional<import("zod").ZodString>;
|
|
506
|
+
fiveYearPeriodStart: import("zod").ZodOptional<import("zod").ZodString>;
|
|
507
|
+
periodEnd: import("zod").ZodOptional<import("zod").ZodString>;
|
|
508
|
+
}, import("zod/v4/core").$strip>>;
|
|
443
509
|
inspections: import("zod").ZodArray<import("zod").ZodObject<{
|
|
510
|
+
category: import("zod").ZodOptional<import("zod").ZodString>;
|
|
444
511
|
activityType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
445
512
|
activityDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
446
513
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
514
|
+
statute: import("zod").ZodOptional<import("zod").ZodString>;
|
|
515
|
+
sourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
516
|
+
leadAgency: import("zod").ZodOptional<import("zod").ZodString>;
|
|
447
517
|
}, import("zod/v4/core").$strip>>;
|
|
518
|
+
inspectionsTotal: import("zod").ZodNumber;
|
|
448
519
|
formalActions: import("zod").ZodArray<import("zod").ZodObject<{
|
|
449
520
|
caseId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
450
521
|
settlementDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
451
522
|
penaltyAssessedInDollars: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
452
523
|
actionType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
524
|
+
actionDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
525
|
+
statute: import("zod").ZodOptional<import("zod").ZodString>;
|
|
526
|
+
sourceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
527
|
+
leadAgency: import("zod").ZodOptional<import("zod").ZodString>;
|
|
453
528
|
}, import("zod/v4/core").$strip>>;
|
|
454
529
|
airCompliance: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
455
530
|
programId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -464,9 +539,12 @@ export declare const allToolDefinitions: readonly [import("@cyanheads/mcp-ts-cor
|
|
|
464
539
|
}, import("zod/v4/core").$strip>, readonly [{
|
|
465
540
|
readonly reason: "facility_not_found";
|
|
466
541
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
467
|
-
readonly when: "ECHO
|
|
542
|
+
readonly when: "ECHO has no facility for the given Registry ID.";
|
|
468
543
|
readonly recovery: "Verify the Registry ID using epa_search_facilities and retry with a valid ID.";
|
|
469
|
-
|
|
544
|
+
readonly thrownBy: "service";
|
|
545
|
+
}], {
|
|
546
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
547
|
+
}>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
470
548
|
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
471
549
|
zip_code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
472
550
|
program: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -483,8 +561,8 @@ export declare const allToolDefinitions: readonly [import("@cyanheads/mcp-ts-cor
|
|
|
483
561
|
civil: "civil";
|
|
484
562
|
criminal: "criminal";
|
|
485
563
|
}>>;
|
|
486
|
-
date_filed_start: import("zod").ZodOptional<import("zod").ZodString
|
|
487
|
-
date_filed_end: import("zod").ZodOptional<import("zod").ZodString
|
|
564
|
+
date_filed_start: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodString]>>;
|
|
565
|
+
date_filed_end: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodString]>>;
|
|
488
566
|
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
489
567
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
490
568
|
cases: import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -506,7 +584,24 @@ export declare const allToolDefinitions: readonly [import("@cyanheads/mcp-ts-cor
|
|
|
506
584
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
507
585
|
readonly when: "Neither state nor zip_code was provided.";
|
|
508
586
|
readonly recovery: "Provide at least one of state or zip_code to scope the enforcement case search.";
|
|
509
|
-
}
|
|
587
|
+
}, {
|
|
588
|
+
readonly reason: "invalid_date";
|
|
589
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
590
|
+
readonly when: "date_filed_start or date_filed_end is not a real calendar date, such as 2024-02-30.";
|
|
591
|
+
readonly recovery: "Pass a real calendar date in YYYY-MM-DD form, such as 2024-02-29.";
|
|
592
|
+
}, {
|
|
593
|
+
readonly reason: "date_range_inverted";
|
|
594
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
595
|
+
readonly when: "date_filed_start is later than date_filed_end.";
|
|
596
|
+
readonly recovery: "Swap the two dates so date_filed_start is on or before date_filed_end.";
|
|
597
|
+
}, {
|
|
598
|
+
readonly reason: "criminal_date_filter";
|
|
599
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
600
|
+
readonly when: "case_type \"criminal\" was combined with a filing-date bound, which ECHO records for civil cases only.";
|
|
601
|
+
readonly recovery: "Drop date_filed_start and date_filed_end to search criminal cases, or set case_type to civil.";
|
|
602
|
+
}], {
|
|
603
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
604
|
+
}>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
510
605
|
facility_id: import("zod").ZodString;
|
|
511
606
|
year: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
512
607
|
chemical_name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -528,8 +623,10 @@ export declare const allToolDefinitions: readonly [import("@cyanheads/mcp-ts-cor
|
|
|
528
623
|
readonly reason: "no_releases_found";
|
|
529
624
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
530
625
|
readonly when: "No TRI records found for the given facility ID and filters.";
|
|
531
|
-
readonly recovery: "Take the 15-character TRI facility ID from the facilityId field of epa_search_tri_releases. TRI data lags 18 months — try an earlier year.";
|
|
532
|
-
}],
|
|
626
|
+
readonly recovery: "Take the 15-character TRI facility ID from the facilityId field of epa_search_tri_releases, or from epa_get_facility triFacilityIds for a known Registry ID. TRI data lags 18 months — try an earlier year.";
|
|
627
|
+
}], {
|
|
628
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
629
|
+
}>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
533
630
|
state: import("zod").ZodString;
|
|
534
631
|
county: import("zod").ZodOptional<import("zod").ZodString>;
|
|
535
632
|
year: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -561,6 +658,7 @@ export declare const allToolDefinitions: readonly [import("@cyanheads/mcp-ts-cor
|
|
|
561
658
|
readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
562
659
|
readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
563
660
|
readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
661
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
564
662
|
}>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
565
663
|
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
566
664
|
city: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -602,7 +700,9 @@ export declare const allToolDefinitions: readonly [import("@cyanheads/mcp-ts-cor
|
|
|
602
700
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
603
701
|
readonly when: "Latitude and longitude were provided without radius_miles.";
|
|
604
702
|
readonly recovery: "Provide radius_miles together with latitude and longitude for a proximity search.";
|
|
605
|
-
}],
|
|
703
|
+
}], {
|
|
704
|
+
readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
705
|
+
}>, import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
606
706
|
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
607
707
|
zip_code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
608
708
|
has_violation: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAYxE;;;GAGG;AACH,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAYxE;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;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C;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"search-facilities.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-facilities.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkQ/B,CAAC"}
|
|
@@ -9,12 +9,15 @@ import { formatLocationLines } from '../format-location.js';
|
|
|
9
9
|
import { getEchoService } from '../../../services/echo/echo-service.js';
|
|
10
10
|
export const searchFacilitiesTool = tool('epa_search_facilities', {
|
|
11
11
|
title: 'Search EPA Facilities',
|
|
12
|
-
description: 'Search EPA-regulated facilities by location,
|
|
12
|
+
description: 'Search EPA-regulated facilities by location, environmental program, or compliance status across CAA, CWA, RCRA, TRI, and SDWA. Returns facility name, EPA Registry ID, coordinates, county FIPS code, per-program registration flags, five-year inspection and penalty totals, and TRI release totals. Registry IDs returned here feed epa_get_facility. Supports proximity search via latitude + longitude + radius_miles. At least one geographic filter (zip_code, state, city, or a complete latitude+longitude+radius_miles triple) is required — unscoped searches time out.',
|
|
13
13
|
annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
|
|
14
14
|
input: z.object({
|
|
15
15
|
zip_code: z.string().optional().describe('5-digit ZIP code to search within'),
|
|
16
16
|
state: z.string().optional().describe('2-letter US state abbreviation (e.g. "WA", "CA")'),
|
|
17
|
-
city: z
|
|
17
|
+
city: z
|
|
18
|
+
.string()
|
|
19
|
+
.optional()
|
|
20
|
+
.describe('City name, case-insensitive; matches cities that begin with it ("TACOMA", or "SEAT" for SEATTLE and SEATAC). Pair with state.'),
|
|
18
21
|
latitude: z
|
|
19
22
|
.number()
|
|
20
23
|
.min(-90)
|
|
@@ -33,15 +36,19 @@ export const searchFacilitiesTool = tool('epa_search_facilities', {
|
|
|
33
36
|
.max(100)
|
|
34
37
|
.optional()
|
|
35
38
|
.describe('Search radius in miles around the given latitude/longitude (max 100). Requires latitude and longitude.'),
|
|
36
|
-
active_only: z
|
|
39
|
+
active_only: z
|
|
40
|
+
.boolean()
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('When true, return only facilities with an active permit'),
|
|
37
43
|
programs: z
|
|
38
44
|
.array(z.enum(['CAA', 'CWA', 'RCRA', 'TRI', 'SDWA']))
|
|
45
|
+
.max(1)
|
|
39
46
|
.optional()
|
|
40
|
-
.describe('Restrict results to facilities registered in
|
|
47
|
+
.describe('Restrict results to facilities registered in one environmental program — ECHO filters on a single program per search, so pass one value. CAA=air, CWA=water, RCRA=hazardous waste, TRI=toxic releases, SDWA=drinking water.'),
|
|
41
48
|
has_violation: z
|
|
42
49
|
.boolean()
|
|
43
50
|
.optional()
|
|
44
|
-
.describe('When true, return only facilities with
|
|
51
|
+
.describe('When true, return only facilities with at least one program in significant noncompliance (complianceStatus "Significant Violation")'),
|
|
45
52
|
limit: z
|
|
46
53
|
.number()
|
|
47
54
|
.int()
|
|
@@ -75,24 +82,33 @@ export const searchFacilitiesTool = tool('epa_search_facilities', {
|
|
|
75
82
|
.describe('Overall compliance status text from ECHO'),
|
|
76
83
|
programs: z
|
|
77
84
|
.object({
|
|
78
|
-
air: z
|
|
79
|
-
|
|
80
|
-
|
|
85
|
+
air: z
|
|
86
|
+
.boolean()
|
|
87
|
+
.describe('Has a Clean Air Act (CAA) stationary-source record in ICIS-Air'),
|
|
88
|
+
water: z
|
|
81
89
|
.boolean()
|
|
82
|
-
.describe('
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
.describe('Has a Clean Water Act (CWA) discharge permit record in ICIS-NPDES'),
|
|
91
|
+
rcra: z.boolean().describe('Has an RCRA hazardous waste handler record'),
|
|
92
|
+
tri: z
|
|
93
|
+
.boolean()
|
|
94
|
+
.describe('Has a Toxics Release Inventory (TRI) facility ID, whether or not it reported in the latest year'),
|
|
95
|
+
sdwa: z
|
|
96
|
+
.boolean()
|
|
97
|
+
.describe('Has a Safe Drinking Water Act (SDWA) public water system record'),
|
|
85
98
|
})
|
|
86
|
-
.describe('Program registration flags'),
|
|
99
|
+
.describe('Program registration flags — the same programs the programs filter selects'),
|
|
87
100
|
triReleasesTransfersInLbs: z
|
|
88
101
|
.number()
|
|
89
102
|
.optional()
|
|
90
|
-
.describe(
|
|
91
|
-
inspectionCount: z
|
|
103
|
+
.describe("Total TRI on/off-site releases and transfers in pounds for ECHO's latest TRI year (summary). For the per-chemical breakdown, call epa_get_tri_releases with the TRI facility ID that epa_search_tri_releases returns as facilityId — the Registry ID is not a TRI facility ID."),
|
|
104
|
+
inspectionCount: z
|
|
105
|
+
.number()
|
|
106
|
+
.optional()
|
|
107
|
+
.describe('Inspections over the last five years, across programs'),
|
|
92
108
|
totalPenaltiesInDollars: z
|
|
93
109
|
.number()
|
|
94
110
|
.optional()
|
|
95
|
-
.describe('
|
|
111
|
+
.describe('Penalties from formal enforcement actions over the last five years, across programs, in dollars'),
|
|
96
112
|
})
|
|
97
113
|
.describe('EPA facility record with Registry ID, location, program flags, and compliance summary'))
|
|
98
114
|
.describe('Matching EPA facilities'),
|
|
@@ -148,7 +164,7 @@ export const searchFacilitiesTool = tool('epa_search_facilities', {
|
|
|
148
164
|
...(longitude !== undefined && { longitude }),
|
|
149
165
|
...(radiusMiles !== undefined && { radiusMiles }),
|
|
150
166
|
...(input.active_only && { activeOnly: input.active_only }),
|
|
151
|
-
...(input.programs?.
|
|
167
|
+
...(input.programs?.[0] && { program: input.programs[0] }),
|
|
152
168
|
...(input.has_violation && { hasViolation: input.has_violation }),
|
|
153
169
|
limit: input.limit,
|
|
154
170
|
}, ctx);
|
|
@@ -163,6 +179,8 @@ export const searchFacilitiesTool = tool('epa_search_facilities', {
|
|
|
163
179
|
parts.push(`city="${input.city}"`);
|
|
164
180
|
if (hasProximity)
|
|
165
181
|
parts.push(`within ${radiusMiles} mi of (${latitude}, ${longitude})`);
|
|
182
|
+
if (input.active_only)
|
|
183
|
+
parts.push('active_only=true');
|
|
166
184
|
if (input.programs?.length)
|
|
167
185
|
parts.push(`programs=[${input.programs.join(', ')}]`);
|
|
168
186
|
if (input.has_violation)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-facilities.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-facilities.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,uBAAuB,EAAE;IAChE,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"search-facilities.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-facilities.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,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AC;gBAC5C,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,uBAAuB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YACpF,CAAC;QACH,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -45,5 +45,7 @@ export declare const searchSuperfundTool: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
45
45
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
46
46
|
readonly when: "Latitude and longitude were provided without radius_miles.";
|
|
47
47
|
readonly recovery: "Provide radius_miles together with latitude and longitude for a proximity search.";
|
|
48
|
-
}],
|
|
48
|
+
}], {
|
|
49
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}>;
|
|
49
51
|
//# sourceMappingURL=search-superfund.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-superfund.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-superfund.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"search-superfund.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-superfund.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkL9B,CAAC"}
|
|
@@ -12,7 +12,11 @@ export const searchSuperfundTool = tool('epa_search_superfund', {
|
|
|
12
12
|
annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
|
|
13
13
|
input: z.object({
|
|
14
14
|
state: z.string().optional().describe('2-letter US state abbreviation to filter sites'),
|
|
15
|
-
city: z
|
|
15
|
+
city: z
|
|
16
|
+
.string()
|
|
17
|
+
.max(4094)
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('City name (partial match within state, case-insensitive). Punctuation is matched as written ("St. Louis", "Coeur d\'Alene").'),
|
|
16
20
|
zip_code: z.string().optional().describe('5-digit ZIP code to filter sites'),
|
|
17
21
|
latitude: z
|
|
18
22
|
.number()
|
|
@@ -70,6 +74,12 @@ export const searchSuperfundTool = tool('epa_search_superfund', {
|
|
|
70
74
|
.optional()
|
|
71
75
|
.describe('Recovery hint when no sites are found. Absent when sites are returned.'),
|
|
72
76
|
}),
|
|
77
|
+
enrichment: {
|
|
78
|
+
notice: z
|
|
79
|
+
.string()
|
|
80
|
+
.optional()
|
|
81
|
+
.describe('Present when a punctuated city filter read its page limit before finding limit sites spelled as given, so more matching sites may exist.'),
|
|
82
|
+
},
|
|
73
83
|
errors: [
|
|
74
84
|
{
|
|
75
85
|
reason: 'no_location_filter',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-superfund.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-superfund.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,sBAAsB,EAAE;IAC9D,KAAK,EAAE,wBAAwB;IAC/B,WAAW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E,EAAE;QACjB,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QACjC,KAAK,CAAC,IAAI,CAAC,cAAc,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;QAC9C,IAAI,MAAM,CAAC,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAExD,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;YACvC,KAAK,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;YACtC,IAAI,CAAC,CAAC,SAAS;gBAAE,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;YAC9D,IAAI,CAAC,CAAC,aAAa;gBAAE,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC;QAC5E,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
+
/**
|
|
8
|
+
* A county name as TRI stores it: trimmed, uppercase, and without a trailing County, Parish, or
|
|
9
|
+
* Borough ("KING", never "KING COUNTY"), so a suffixed input still matches. Linear in the name:
|
|
10
|
+
* the suffix match anchors on one whitespace character rather than a run of them.
|
|
11
|
+
*/
|
|
12
|
+
export declare function bareCountyName(county: string): string;
|
|
7
13
|
export declare const searchTriReleasesTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
8
14
|
state: z.ZodString;
|
|
9
15
|
county: z.ZodOptional<z.ZodString>;
|
|
@@ -36,5 +42,6 @@ export declare const searchTriReleasesTool: import("@cyanheads/mcp-ts-core").Too
|
|
|
36
42
|
readonly truncated: z.ZodOptional<z.ZodBoolean>;
|
|
37
43
|
readonly shown: z.ZodOptional<z.ZodNumber>;
|
|
38
44
|
readonly cap: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
39
46
|
}>;
|
|
40
47
|
//# sourceMappingURL=search-tri-releases.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-tri-releases.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-tri-releases.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"search-tri-releases.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-tri-releases.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuMhC,CAAC"}
|
|
@@ -6,9 +6,19 @@ import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
|
6
6
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
7
|
import { formatTriReleaseLines } from '../format-tri-release.js';
|
|
8
8
|
import { getDmapService } from '../../../services/dmap/dmap-service.js';
|
|
9
|
+
/**
|
|
10
|
+
* A county name as TRI stores it: trimmed, uppercase, and without a trailing County, Parish, or
|
|
11
|
+
* Borough ("KING", never "KING COUNTY"), so a suffixed input still matches. Linear in the name:
|
|
12
|
+
* the suffix match anchors on one whitespace character rather than a run of them.
|
|
13
|
+
*/
|
|
14
|
+
export function bareCountyName(county) {
|
|
15
|
+
const name = county.trim();
|
|
16
|
+
const suffix = /\s(county|parish|borough)$/i.exec(name);
|
|
17
|
+
return (suffix ? name.slice(0, suffix.index).trimEnd() : name).toUpperCase();
|
|
18
|
+
}
|
|
9
19
|
export const searchTriReleasesTool = tool('epa_search_tri_releases', {
|
|
10
20
|
title: 'Search TRI Releases by Region',
|
|
11
|
-
description: 'Search Toxic Release Inventory data across facilities in a state or county for
|
|
21
|
+
description: 'Search Toxic Release Inventory data across facilities in a state or county, for one reporting year or, without year, every available year newest first. Returns facility name and county, TRI facility ID, chemical name, and the one-time / non-routine release quantity; set include_release_breakdown to add routine on-site releases by medium (air, water, land, and underground-injection), at the cost of a slower call. Quantities are in pounds; dioxin and dioxin-like compounds, which TRI has facilities report in grams, are converted and marked with reportedUnit. Use to identify top polluters in an area or build an environmental exposure profile. Use epa_get_tri_releases for detailed release records for a single facility. TRI data lags ~18 months from the current calendar year.',
|
|
12
22
|
annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
|
|
13
23
|
input: z.object({
|
|
14
24
|
state: z
|
|
@@ -18,19 +28,21 @@ export const searchTriReleasesTool = tool('epa_search_tri_releases', {
|
|
|
18
28
|
.describe('2-letter US state abbreviation (required, e.g. "WA", "TX")'),
|
|
19
29
|
county: z
|
|
20
30
|
.string()
|
|
31
|
+
.max(4094)
|
|
21
32
|
.optional()
|
|
22
|
-
.describe('County name to narrow results within the state, e.g. "King". Case-insensitive partial match on the bare name, so a short name can also match a longer one (LAKE matches LAKE OF THE WOODS; check countyName on each record); a trailing "County", "Parish", or "Borough" is dropped before matching.'),
|
|
33
|
+
.describe('County name to narrow results within the state, e.g. "King". Case-insensitive partial match on the bare name, so a short name can also match a longer one (LAKE matches LAKE OF THE WOODS; check countyName on each record); a trailing "County", "Parish", or "Borough" is dropped before matching. Punctuation is matched as written ("Prince George\'s").'),
|
|
23
34
|
year: z
|
|
24
35
|
.number()
|
|
25
36
|
.int()
|
|
26
37
|
.min(1987)
|
|
27
38
|
.max(2030)
|
|
28
39
|
.optional()
|
|
29
|
-
.describe('Reporting year.
|
|
40
|
+
.describe('Reporting year. Omit to search every available year in the state, newest reporting year first, so limit keeps the most recent filings. TRI data lags ~18 months.'),
|
|
30
41
|
chemical_name: z
|
|
31
42
|
.string()
|
|
43
|
+
.max(4094)
|
|
32
44
|
.optional()
|
|
33
|
-
.describe('Optional filter to restrict results to a specific chemical (partial match, case-insensitive)'),
|
|
45
|
+
.describe('Optional filter to restrict results to a specific chemical (partial match, case-insensitive). Commas, apostrophes, brackets, and Greek letters are matched as written, e.g. "4,4\'-Methylenedianiline".'),
|
|
34
46
|
limit: z
|
|
35
47
|
.number()
|
|
36
48
|
.int()
|
|
@@ -98,6 +110,10 @@ export const searchTriReleasesTool = tool('epa_search_tri_releases', {
|
|
|
98
110
|
.optional()
|
|
99
111
|
.describe('Number of release records returned. Present only when truncated.'),
|
|
100
112
|
cap: z.number().optional().describe('The limit that was applied. Present only when truncated.'),
|
|
113
|
+
notice: z
|
|
114
|
+
.string()
|
|
115
|
+
.optional()
|
|
116
|
+
.describe('Present when a punctuated county or chemical_name filter read its page limit before finding limit matches spelled as given, so more matching records may exist.'),
|
|
101
117
|
},
|
|
102
118
|
errors: [
|
|
103
119
|
{
|
|
@@ -114,11 +130,7 @@ export const searchTriReleasesTool = tool('epa_search_tri_releases', {
|
|
|
114
130
|
county: input.county,
|
|
115
131
|
includeReleaseBreakdown: input.include_release_breakdown,
|
|
116
132
|
});
|
|
117
|
-
|
|
118
|
-
const county = input.county
|
|
119
|
-
?.trim()
|
|
120
|
-
.replace(/\s+(county|parish|borough)$/i, '')
|
|
121
|
-
.toUpperCase();
|
|
133
|
+
const county = input.county === undefined ? undefined : bareCountyName(input.county);
|
|
122
134
|
const chemicalName = input.chemical_name?.trim();
|
|
123
135
|
const releases = await getDmapService().searchTriReleases({
|
|
124
136
|
state: input.state.trim().toUpperCase(),
|