@cliwant/mcp-sam-gov 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.ja.md +11 -11
  2. package/README.ko.md +11 -11
  3. package/README.md +21 -13
  4. package/dist/cbp-border.d.ts +51 -0
  5. package/dist/cbp-border.d.ts.map +1 -0
  6. package/dist/cbp-border.js +123 -0
  7. package/dist/cbp-border.js.map +1 -0
  8. package/dist/datagov-catalog.d.ts.map +1 -1
  9. package/dist/datagov-catalog.js +16 -2
  10. package/dist/datagov-catalog.js.map +1 -1
  11. package/dist/ecfr.d.ts +2 -2
  12. package/dist/ecfr.d.ts.map +1 -1
  13. package/dist/ecfr.js +24 -10
  14. package/dist/ecfr.js.map +1 -1
  15. package/dist/edgar.d.ts.map +1 -1
  16. package/dist/edgar.js +26 -6
  17. package/dist/edgar.js.map +1 -1
  18. package/dist/epa-envirofacts.d.ts.map +1 -1
  19. package/dist/epa-envirofacts.js +14 -1
  20. package/dist/epa-envirofacts.js.map +1 -1
  21. package/dist/errors.d.ts.map +1 -1
  22. package/dist/errors.js +11 -0
  23. package/dist/errors.js.map +1 -1
  24. package/dist/far.d.ts.map +1 -1
  25. package/dist/far.js +3 -1
  26. package/dist/far.js.map +1 -1
  27. package/dist/federal-register.d.ts +2 -2
  28. package/dist/federal-register.d.ts.map +1 -1
  29. package/dist/federal-register.js +26 -10
  30. package/dist/federal-register.js.map +1 -1
  31. package/dist/fema.d.ts +36 -0
  32. package/dist/fema.d.ts.map +1 -1
  33. package/dist/fema.js +124 -0
  34. package/dist/fema.js.map +1 -1
  35. package/dist/gov-domains.d.ts +66 -0
  36. package/dist/gov-domains.d.ts.map +1 -0
  37. package/dist/gov-domains.js +211 -0
  38. package/dist/gov-domains.js.map +1 -0
  39. package/dist/nist-controls.d.ts +48 -0
  40. package/dist/nist-controls.d.ts.map +1 -0
  41. package/dist/nist-controls.js +174 -0
  42. package/dist/nist-controls.js.map +1 -0
  43. package/dist/nws-weather.d.ts +57 -0
  44. package/dist/nws-weather.d.ts.map +1 -0
  45. package/dist/nws-weather.js +131 -0
  46. package/dist/nws-weather.js.map +1 -0
  47. package/dist/openfda-drugsfda.d.ts +72 -0
  48. package/dist/openfda-drugsfda.d.ts.map +1 -0
  49. package/dist/openfda-drugsfda.js +230 -0
  50. package/dist/openfda-drugsfda.js.map +1 -0
  51. package/dist/openfda.d.ts.map +1 -1
  52. package/dist/openfda.js +31 -8
  53. package/dist/openfda.js.map +1 -1
  54. package/dist/server.d.ts.map +1 -1
  55. package/dist/server.js +331 -10
  56. package/dist/server.js.map +1 -1
  57. package/dist/treasury.d.ts +2 -0
  58. package/dist/treasury.d.ts.map +1 -1
  59. package/dist/treasury.js +7 -0
  60. package/dist/treasury.js.map +1 -1
  61. package/dist/usaspending.d.ts +32 -1
  62. package/dist/usaspending.d.ts.map +1 -1
  63. package/dist/usaspending.js +143 -16
  64. package/dist/usaspending.js.map +1 -1
  65. package/package.json +2 -2
  66. package/src/cbp-border.ts +177 -0
  67. package/src/datagov-catalog.ts +18 -2
  68. package/src/ecfr.ts +27 -10
  69. package/src/edgar.ts +39 -7
  70. package/src/epa-envirofacts.ts +17 -1
  71. package/src/errors.ts +11 -0
  72. package/src/far.ts +3 -1
  73. package/src/federal-register.ts +29 -10
  74. package/src/fema.ts +139 -0
  75. package/src/gov-domains.ts +237 -0
  76. package/src/nist-controls.ts +219 -0
  77. package/src/nws-weather.ts +167 -0
  78. package/src/openfda-drugsfda.ts +313 -0
  79. package/src/openfda.ts +30 -7
  80. package/src/server.ts +352 -10
  81. package/src/treasury.ts +7 -0
  82. package/src/usaspending.ts +189 -17
@@ -1 +1 @@
1
- {"version":3,"file":"openfda.js","sourceRoot":"","sources":["../src/openfda.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH,OAAO,EAAE,gB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wBAAsB,OAAO,CAC3B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,OAAO,CAAC,CAalB"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG;AAQH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,YAAY,EAKb,MAAM,oBAAoB,CAAC;AAm5I5B,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,CAAC,UAAU,CAAC;IAO1B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE;QAAE,GAAG,EAAE,YAAY,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACxE,CAAC;AAoBF,eAAO,MAAM,KAAK,EAAE,OAAO,EAivD1B,CAAC;AAmKF,wBAAsB,OAAO,CAC3B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,OAAO,CAAC,CAkClB"}
package/dist/server.js CHANGED
@@ -58,18 +58,23 @@ import * as lda from "./lda.js";
58
58
  import * as courtlistener from "./courtlistener.js";
59
59
  import * as nonprofit from "./nonprofit.js";
60
60
  import * as fema from "./fema.js";
61
+ import * as nws from "./nws-weather.js";
62
+ import * as govDomains from "./gov-domains.js";
61
63
  import * as fdic from "./fdic.js";
62
64
  import * as bls from "./bls.js";
63
65
  import * as ofac from "./ofac.js";
64
66
  import * as nvd from "./nvd.js";
67
+ import * as nistControls from "./nist-controls.js";
65
68
  import * as nppes from "./nppes.js";
66
69
  import * as cms from "./cms.js";
67
70
  import * as fac from "./fac.js";
68
71
  import * as usitc from "./usitc.js";
69
72
  import * as openfda from "./openfda.js";
70
73
  import * as openfdaDevice from "./openfda-device.js";
74
+ import * as openfdaDrugsfda from "./openfda-drugsfda.js";
71
75
  import * as nhtsa from "./nhtsa.js";
72
76
  import * as cpsc from "./cpsc.js";
77
+ import * as cbpBorder from "./cbp-border.js";
73
78
  import { fetchAttachmentText } from "./attachments.js";
74
79
  import * as keys from "./keys.js";
75
80
  import { toToolError, ToolErrorCarrier, errorFromResponse } from "./errors.js";
@@ -79,7 +84,7 @@ import { realpathSync } from "node:fs";
79
84
  const SERVER_NAME = "mcp-sam-gov";
80
85
  // Kept in lockstep with package.json / manifest.json / server.json.
81
86
  // Keep in sync with package.json "version" (asserted at release; see CHANGELOG).
82
- const SERVER_VERSION = "1.4.0";
87
+ const SERVER_VERSION = "1.5.0";
83
88
  // ─── Tool input schemas (Zod) ────────────────────────────────────
84
89
  const SamSearchInput = z.object({
85
90
  query: z.string().optional().describe("Free-text title query"),
@@ -94,6 +99,7 @@ const SamSearchInput = z.object({
94
99
  .describe("Place-of-performance state, 2-letter, e.g. 'MD'"),
95
100
  setAside: z.array(z.string()).optional().describe("Set-aside codes: SBA, 8A, HZS, SDVOSBC, WOSB, EDWOSB, VSA, VSS"),
96
101
  limit: z.number().min(1).max(50).optional(),
102
+ offset: z.number().min(0).optional().describe("Page offset into the result set (default 0)."),
97
103
  });
98
104
  // Pre-solicitation shaping radar (doc 06 §3.1). Surfaces Sources Sought /
99
105
  // Presolicitation / Special Notices BEFORE the RFP exists — the free, real-time
@@ -178,7 +184,9 @@ const UsasIndividualAwardsInput = UsasFiltersBase.extend({
178
184
  limit: z.number().min(1).max(50).optional(),
179
185
  });
180
186
  const UsasSubAgencyInput = z.object({
181
- agency: z.string(),
187
+ agency: z
188
+ .string()
189
+ .describe("Canonical agency NAME (e.g. 'Department of Veterans Affairs'), NOT a toptier code — this filter matches by name; a numeric code silently matches nothing. Resolve via usas_lookup_agency / usas_list_toptier_agencies."),
182
190
  fiscalYear: z.number().int().min(2007).optional(),
183
191
  });
184
192
  const UsasLookupAgencyInput = z.object({
@@ -192,7 +200,14 @@ const UsasRecipientAwardsInput = z.object({
192
200
  limit: z.number().min(1).max(50).optional(),
193
201
  });
194
202
  const UsasSubawardsInput = z.object({
195
- primeRecipientName: z.string().optional(),
203
+ // DRIFT/SEMANTICS FIX (dogfooding 2026-07-16): this filters the SUBAWARDEE name,
204
+ // NOT the prime. On spending_by_award{subawards:true} the only keyless recipient
205
+ // filter is `recipient_search_text`, which USAspending matches against the
206
+ // SUB-recipient (live-verified: recipient_search_text:["Leidos"] returns rows
207
+ // whose Sub-Awardee Name IS Leidos, under OTHER primes). The old name
208
+ // `primeRecipientName` promised the opposite. Renamed to `subRecipientName`; the
209
+ // #182 unknown-key guard makes the old name fail loud with the valid-key list.
210
+ subRecipientName: z.string().optional(),
196
211
  agency: z.string().optional(),
197
212
  naics: z.string().optional(),
198
213
  fiscalYear: z.number().int().min(2007).optional(),
@@ -297,13 +312,19 @@ const UsasSpendingOverTimeInput = z.object({
297
312
  .optional(),
298
313
  });
299
314
  const UsasCategorySpendingInput = z.object({
300
- agency: z.string().optional(),
315
+ agency: z
316
+ .string()
317
+ .optional()
318
+ .describe("Canonical agency NAME (e.g. 'Department of Veterans Affairs'), NOT a toptier code — this filter matches by name; a numeric code silently matches nothing. Resolve via usas_lookup_agency."),
301
319
  naics: z.string().optional(),
302
320
  fiscalYear: z.number().int().min(2007).optional(),
303
321
  limit: z.number().min(1).max(50).optional(),
304
322
  });
305
323
  const UsasCfdaInput = z.object({
306
- agency: z.string().optional(),
324
+ agency: z
325
+ .string()
326
+ .optional()
327
+ .describe("Canonical agency NAME (e.g. 'Department of Veterans Affairs'), NOT a toptier code — this filter matches by name; a numeric code silently matches nothing. Resolve via usas_lookup_agency."),
307
328
  fiscalYear: z.number().int().min(2007).optional(),
308
329
  limit: z.number().min(1).max(50).optional(),
309
330
  });
@@ -355,6 +376,21 @@ const UsasGlossaryInput = z.object({
355
376
  const UsasListAgenciesInput = z.object({
356
377
  limit: z.number().min(1).max(150).optional(),
357
378
  });
379
+ const UsasListDisasterCodesInput = z.object({});
380
+ const UsasDisasterSpendingInput = z.object({
381
+ defCodes: z
382
+ .array(z.string().min(1))
383
+ .min(1)
384
+ .describe("Disaster Emergency Fund Codes (DEFC) to include — REQUIRED. e.g. ['L','M'] (COVID-19 relief) or ['1'] (IIJA / infrastructure). Discover the full code set via usas_list_disaster_codes."),
385
+ spendingType: z
386
+ .enum(["obligation", "outlay"])
387
+ .optional()
388
+ .describe("obligation (default) or outlay. Some DEFCs report $0 obligations but real outlays — try both."),
389
+ geoLayer: z
390
+ .enum(["state", "county", "district"])
391
+ .optional()
392
+ .describe("Geographic breakout: state (default), county, or congressional district."),
393
+ });
358
394
  // Federal Register
359
395
  const FedRegSearchInput = z.object({
360
396
  query: z.string().optional(),
@@ -797,6 +833,39 @@ const CisaKevLookupInput = z.object({
797
833
  .describe("Max matches returned (default 100, max 1000)."),
798
834
  offset: z.number().min(0).optional().describe("Zero-based page offset (default 0)."),
799
835
  });
836
+ const NistControlsInput = z.object({
837
+ controlId: z
838
+ .string()
839
+ .min(1)
840
+ .optional()
841
+ .describe("Exact control identifier, e.g. 'AC-2', 'SC-7', 'AC-2(1)' (case-insensitive; zero-padding is normalized)."),
842
+ family: z
843
+ .string()
844
+ .min(1)
845
+ .optional()
846
+ .describe("Control family — the 2-letter code ('AC', 'SC', 'IA') OR a substring of the family name ('Access Control', 'Audit'). Case-insensitive."),
847
+ keyword: z
848
+ .string()
849
+ .min(1)
850
+ .optional()
851
+ .describe("Case-insensitive substring searched over the control title + requirement statement."),
852
+ limit: z.number().int().min(1).max(200).optional().describe("Max controls returned (default 25, max 200)."),
853
+ offset: z.number().int().min(0).optional().describe("Zero-based page offset (default 0)."),
854
+ });
855
+ const CbpBorderWaitInput = z.object({
856
+ border: z
857
+ .string()
858
+ .min(1)
859
+ .optional()
860
+ .describe("Filter by border — case-insensitive substring, e.g. 'Canadian' or 'Mexican' (the feed labels ports 'Canadian Border' / 'Mexican Border')."),
861
+ portName: z
862
+ .string()
863
+ .min(1)
864
+ .optional()
865
+ .describe("Filter by port name — case-insensitive substring, e.g. 'Laredo', 'Detroit'."),
866
+ limit: z.number().int().min(1).max(200).optional().describe("Max ports returned (default 100, max 200)."),
867
+ offset: z.number().int().min(0).optional().describe("Zero-based page offset (default 0)."),
868
+ });
800
869
  // ━━━ NPPES NPI Registry — the healthcare-provider identity/credentialing lane (1) ━━━ ADR-0036
801
870
  // nppes_lookup_provider: exact NPI detail OR search over CMS/HHS's keyless public
802
871
  // registry of every US healthcare provider (npiregistry.cms.hhs.gov/api, version=2.1
@@ -1094,8 +1163,10 @@ const TreasuryDatasetEnum = z
1094
1163
  "mts_table_1",
1095
1164
  "rates_of_exchange",
1096
1165
  "debt_outstanding",
1166
+ "interest_expense",
1167
+ "tror",
1097
1168
  ])
1098
- .describe("Which confirmed Treasury Fiscal Data dataset to query: debt_to_penny (daily total public debt), avg_interest_rates (avg rate by security type), mts_table_1 (Monthly Treasury Statement receipts/outlays/deficit), rates_of_exchange (quarterly FX by currency), debt_outstanding (historical fiscal-year-end debt).");
1169
+ .describe("Which confirmed Treasury Fiscal Data dataset to query: debt_to_penny (daily total public debt), avg_interest_rates (avg rate by security type), mts_table_1 (Monthly Treasury Statement receipts/outlays/deficit), rates_of_exchange (quarterly FX by currency), debt_outstanding (historical fiscal-year-end debt), interest_expense (ACTUAL interest PAID / debt-service cost by security type — distinct from the rate), tror (Treasury Report on Receivables: federal receivables + delinquent-debt collections BY AGENCY).");
1099
1170
  const TreasuryQueryDatasetInput = z.object({
1100
1171
  dataset: TreasuryDatasetEnum,
1101
1172
  fields: z
@@ -2037,6 +2108,124 @@ const FemaDisasterDeclarationsInput = z.object({
2037
2108
  .default(0)
2038
2109
  .describe("0-based row offset ($skip) for pagination, default 0."),
2039
2110
  });
2111
+ const FemaSearchHazardMitigationInput = z.object({
2112
+ state: z
2113
+ .string()
2114
+ .min(1)
2115
+ .optional()
2116
+ .describe("Filter by state (→ state eq '...'). Accepts EITHER a 2-letter code ('AL', like the other FEMA tools) OR the full name ('Alabama'); the module maps a 2-letter code to the full name this dataset requires."),
2117
+ programArea: z
2118
+ .string()
2119
+ .min(1)
2120
+ .optional()
2121
+ .describe("Filter by mitigation program (→ programArea eq '...'): HMGP (Hazard Mitigation Grant Program), FMA (Flood Mitigation Assistance), PDM (Pre-Disaster Mitigation), BRIC (Building Resilient Infrastructure and Communities), LPDM, FMA-SL."),
2122
+ disasterNumber: z
2123
+ .number()
2124
+ .int()
2125
+ .positive()
2126
+ .optional()
2127
+ .describe("Filter by FEMA disaster number (→ disasterNumber eq N)."),
2128
+ status: z
2129
+ .string()
2130
+ .min(1)
2131
+ .optional()
2132
+ .describe("Filter by project status (→ status eq '...'). e.g. 'Closed', 'Open'."),
2133
+ programFy: z
2134
+ .number()
2135
+ .int()
2136
+ .optional()
2137
+ .describe("Filter by program fiscal year (→ programFy eq N). e.g. 2005."),
2138
+ region: z
2139
+ .number()
2140
+ .int()
2141
+ .min(1)
2142
+ .max(10)
2143
+ .optional()
2144
+ .describe("Filter by FEMA region number 1–10 (→ region eq N)."),
2145
+ minProjectAmount: z
2146
+ .number()
2147
+ .optional()
2148
+ .describe("Minimum project amount (→ projectAmount ge N)."),
2149
+ maxProjectAmount: z
2150
+ .number()
2151
+ .optional()
2152
+ .describe("Maximum project amount (→ projectAmount le N)."),
2153
+ limit: z
2154
+ .number()
2155
+ .int()
2156
+ .min(1)
2157
+ .max(1000)
2158
+ .default(100)
2159
+ .describe("Rows per page ($top), 1..1000, default 100."),
2160
+ offset: z
2161
+ .number()
2162
+ .int()
2163
+ .min(0)
2164
+ .default(0)
2165
+ .describe("0-based row offset ($skip) for pagination, default 0."),
2166
+ });
2167
+ const NwsActiveAlertsInput = z.object({
2168
+ state: z
2169
+ .string()
2170
+ .regex(/^[A-Za-z]{2}$/)
2171
+ .optional()
2172
+ .describe("2-letter US state/territory code to scope alerts (→ NWS ?area=), e.g. 'CA'. Omit for all active US alerts."),
2173
+ event: z
2174
+ .string()
2175
+ .min(1)
2176
+ .optional()
2177
+ .describe("Filter by event type — case-insensitive substring, e.g. 'Flood', 'Wind', 'Winter Storm'."),
2178
+ severity: z
2179
+ .enum(["Extreme", "Severe", "Moderate", "Minor", "Unknown"])
2180
+ .optional()
2181
+ .describe("Filter by severity (exact): Extreme | Severe | Moderate | Minor | Unknown."),
2182
+ limit: z.number().int().min(1).max(500).optional().describe("Max alerts returned (default 50, max 500)."),
2183
+ offset: z.number().int().min(0).optional().describe("Zero-based page offset (default 0)."),
2184
+ });
2185
+ const SearchGovDomainsInput = z.object({
2186
+ scope: z
2187
+ .enum(["all", "federal"])
2188
+ .optional()
2189
+ .describe("'all' (federal + SLED: state/county/city/school-district/special-district/tribal, ~16k rows, DEFAULT) or 'federal' (federal-only, ~1.3k rows)."),
2190
+ organization: z
2191
+ .string()
2192
+ .min(1)
2193
+ .optional()
2194
+ .describe("Organization name — case-insensitive SUBSTRING match (e.g. 'veterans', 'cybersecurity')."),
2195
+ domain: z
2196
+ .string()
2197
+ .min(1)
2198
+ .optional()
2199
+ .describe("Domain name — case-insensitive SUBSTRING match (e.g. 'cdc.gov', 'irs')."),
2200
+ domainType: z
2201
+ .string()
2202
+ .min(1)
2203
+ .optional()
2204
+ .describe("Domain type — case-insensitive match (e.g. 'Federal - Executive', 'County', 'Tribal', 'State or territory', 'School district')."),
2205
+ state: z
2206
+ .string()
2207
+ .min(1)
2208
+ .optional()
2209
+ .describe("2-letter state/territory code — case-insensitive exact match (e.g. 'CA')."),
2210
+ city: z
2211
+ .string()
2212
+ .min(1)
2213
+ .optional()
2214
+ .describe("City — case-insensitive SUBSTRING match."),
2215
+ limit: z
2216
+ .number()
2217
+ .int()
2218
+ .min(1)
2219
+ .max(500)
2220
+ .optional()
2221
+ .describe("Rows per page, 1..500, default 50."),
2222
+ offset: z
2223
+ .number()
2224
+ .int()
2225
+ .min(0)
2226
+ .optional()
2227
+ .describe("0-based row offset for pagination, default 0."),
2228
+ });
2040
2229
  // ─── EPA ECHO REST (keyless facility compliance/enforcement) — input schemas ──
2041
2230
  // ADR-0009. KEYLESS, single fixed host (echodata.epa.gov) + three fixed service
2042
2231
  // paths (the SSRF core — no free host/path). `state` is a curated US state/
@@ -2280,7 +2469,7 @@ const DatagovSearchDatasetsInput = z.object({
2280
2469
  .min(1)
2281
2470
  .max(500)
2282
2471
  .optional()
2283
- .describe("Free-text search over the dataset catalog (→ _q), e.g. 'wildfire'. LIVE-CONFIRMED to narrow."),
2472
+ .describe("Free-text search over the dataset catalog (→ q), e.g. 'wildfire'. LIVE-CONFIRMED to narrow (2026-07-16: the v4 API param is `q`; the old `_q` is silently ignored)."),
2284
2473
  organization: z
2285
2474
  .string()
2286
2475
  .min(1)
@@ -3238,6 +3427,41 @@ const OpenfdaDeviceClearancesInput = z.object({
3238
3427
  .optional()
3239
3428
  .describe("Row offset for pagination (default 0). Page with _meta.pagination.nextOffset."),
3240
3429
  });
3430
+ const OpenfdaDrugApprovalsInput = z.object({
3431
+ sponsorName: z
3432
+ .string()
3433
+ .min(1)
3434
+ .optional()
3435
+ .describe("Sponsor / applicant company name (→ sponsor_name), e.g. 'pfizer'. Matched as an escaped Lucene phrase."),
3436
+ brandName: z
3437
+ .string()
3438
+ .min(1)
3439
+ .optional()
3440
+ .describe("Product brand name (→ products.brand_name), e.g. 'lipitor'. Matched as an escaped Lucene phrase."),
3441
+ activeIngredient: z
3442
+ .string()
3443
+ .min(1)
3444
+ .optional()
3445
+ .describe("Active ingredient name (→ products.active_ingredients.name), e.g. 'atorvastatin calcium'. Matched as an escaped Lucene phrase."),
3446
+ applicationNumber: z
3447
+ .string()
3448
+ .min(1)
3449
+ .optional()
3450
+ .describe("FDA application number (→ application_number), e.g. 'NDA050347'. Matched as an escaped Lucene phrase."),
3451
+ limit: z
3452
+ .number()
3453
+ .int()
3454
+ .min(1)
3455
+ .max(100)
3456
+ .optional()
3457
+ .describe("Max application records to return (default 25, max 100). Offset-paginated via skip."),
3458
+ skip: z
3459
+ .number()
3460
+ .int()
3461
+ .min(0)
3462
+ .optional()
3463
+ .describe("Row offset for pagination (default 0). Page with _meta.pagination.nextOffset."),
3464
+ });
3241
3465
  // ─── NHTSA vehicle safety (api.nhtsa.gov) — KEYLESS vehicle/parts supplier vetting ──
3242
3466
  // ADR-0057. Two tools (recalls + complaints) share make/model/modelYear inputs. NO
3243
3467
  // API key at all. ★The complaints VIN (PII) is excluded from the output. modelYear is
@@ -4097,7 +4321,7 @@ export const TOOLS = [
4097
4321
  }),
4098
4322
  defineTool({
4099
4323
  name: "usas_search_subawards",
4100
- description: "Enumerate subcontracts on prime awards. Use for 'who teams with Leidos at DISA' or 'show small-business subs on Accenture's DHS contracts' — surfaces the prime/sub network for teaming-map artifacts.",
4324
+ description: "Enumerate federal subawards (subcontracts), optionally filtered by SUBAWARDEE name. Use for 'where does Leidos appear as a SUBcontractor, and under which primes' — surfaces the prime/sub network for teaming-map artifacts. NOTE: subRecipientName matches the SUB-recipient, NOT the prime (the keyless spending_by_award subaward view has no prime-name filter); to see the subs UNDER a specific prime, resolve that prime's awards first (usas_search_awards → usas_get_award_detail) and read their sub network. Each row carries subRecipient (the subawardee), amount, actionDate, the prime award id, and the prime award's NAICS.",
4101
4325
  inputSchema: UsasSubawardsInput,
4102
4326
  handler: (input) => usas.searchSubawards(input),
4103
4327
  }),
@@ -4225,6 +4449,18 @@ export const TOOLS = [
4225
4449
  inputSchema: UsasListAgenciesInput,
4226
4450
  handler: (input) => usas.listToptierAgencies(input),
4227
4451
  }),
4452
+ defineTool({
4453
+ name: "usas_list_disaster_codes",
4454
+ description: "List the Disaster Emergency Fund Codes (DEFC) — the supplemental-appropriation tags (COVID-19 relief, IIJA/infrastructure, and other emergency laws) that usas_disaster_spending filters on. Keyless USAspending references/def_codes. Returns the COMPLETE code set (no pagination): each `code` with its `group` ('covid_19' | 'infrastructure' | null), `title`, and `publicLaw`. Use this to discover the codes to pass to usas_disaster_spending. HONESTY: group is null (never fabricated) when a code belongs to no named group; totalAvailable is the exact complete count.",
4455
+ inputSchema: UsasListDisasterCodesInput,
4456
+ handler: () => usas.listDisasterCodes(),
4457
+ }),
4458
+ defineTool({
4459
+ name: "usas_disaster_spending",
4460
+ description: "Disaster / emergency-fund spending BY GEOGRAPHY — obligations or outlays tagged to one or more Disaster Emergency Fund Codes (DEFC: COVID-19, IIJA, etc.), broken out per state / county / congressional district (keyless USAspending disaster/spending_by_geography). Answers 'which geographies captured COVID/IIJA relief money' — a distinct axis the standard award search does not expose. `defCodes` REQUIRED (discover via usas_list_disaster_codes); `spendingType` obligation (default) | outlay; `geoLayer` state (default) | county | district. Each row: name, code, amount, awardCount, population, perCapita. HONESTY: amount/perCapita are number|null (a real 0 stays 0 — some DEFCs like IIJA report $0 OBLIGATIONS with a nonzero awardCount, disclosed in a note; absent → null, never a fabricated 0); the endpoint returns the COMPLETE set of geo units (no pagination) so totalAvailable = returned; an outage/4xx THROWS (never a fake empty).",
4461
+ inputSchema: UsasDisasterSpendingInput,
4462
+ handler: (input) => usas.disasterSpending(input),
4463
+ }),
4228
4464
  // ━━━ Federal Register (4) ━━━
4229
4465
  defineTool({
4230
4466
  name: "fed_register_search_documents",
@@ -4365,6 +4601,12 @@ export const TOOLS = [
4365
4601
  inputSchema: CisaKevLookupInput,
4366
4602
  handler: (input) => nvd.cisaKevLookup(input),
4367
4603
  }),
4604
+ defineTool({
4605
+ name: "nist_800_53_controls",
4606
+ description: "Look up NIST SP 800-53 Rev 5 security & privacy CONTROLS (keyless) — the requirement backbone for FedRAMP / CMMC / RMF compliance work. Retrieve a control by `controlId` (exact, e.g. 'AC-2', 'SC-7', 'AC-2(1)'), a `family` (2-letter code 'AC'/'SC'/'IA' or a name substring 'Access Control'), and/or a `keyword` (case-insensitive substring over title + statement); `limit`/`offset` pagination. Each row: { id (e.g. 'AC-2'), family (e.g. 'AC — Access Control'), title, statement (the labelled requirement prose), guidance (discussion), enhancements:[{id,title}] (e.g. AC-2(1)) }. Complements cve_lookup + cisa_kev_lookup (the vulnerability side) with the CONTROL/requirement side. HONESTY: source is NIST's OFFICIAL OSCAL catalog published at github.com/usnistgov/oscal-content (authoritative first-party data served from GitHub, not a .gov API host — provenance disclosed in _meta); the catalog has no query API so filtering is CLIENT-SIDE and totalAvailable is the EXACT match count; this is the REQUIREMENT text only — applicability depends on the system's FIPS-199 impact baseline (Low/Moderate/High), which the catalog does not encode (disclosed); a download failure or an implausibly-truncated catalog (< 15 families) THROWS (never a fake-empty 'control not found').",
4607
+ inputSchema: NistControlsInput,
4608
+ handler: (input) => nistControls.searchControls(input),
4609
+ }),
4368
4610
  // ━━━ NPPES NPI Registry — Healthcare-Provider Vetting (1) ━━━ ADR-0036
4369
4611
  defineTool({
4370
4612
  name: "nppes_lookup_provider",
@@ -4408,7 +4650,7 @@ export const TOOLS = [
4408
4650
  // ━━━ US Treasury — Fiscal Data (keyless) (4) ━━━ ADR-0002
4409
4651
  defineTool({
4410
4652
  name: "treasury_query_dataset",
4411
- description: "Escape-hatch query over 5 confirmed US Treasury Fiscal Data datasets (keyless): debt_to_penny, avg_interest_rates, mts_table_1 (Monthly Treasury Statement), rates_of_exchange, debt_outstanding. Choose `dataset` (enum — no free path), and optionally project `fields` (CSV), `filter` (CSV 'col:op:val', ops lt|lte|gt|gte|eq|in, AND-combined), and `sort` (CSV, '-' = desc), with page[size]/page[number] pagination. Returns raw rows plus a truthful `_meta` (totalAvailable = upstream total-count, offset pagination). Value/amount fields are raw upstream strings — the string \"null\"/empty means 'no value', never 0. Covers rates_of_exchange + debt_outstanding without a dedicated tool.",
4653
+ description: "Escape-hatch query over 7 confirmed US Treasury Fiscal Data datasets (keyless): debt_to_penny, avg_interest_rates, mts_table_1 (Monthly Treasury Statement), rates_of_exchange, debt_outstanding, interest_expense (actual interest PAID / debt-service cost), tror (Treasury Report on Receivables — federal receivables + delinquent-debt collections by agency). Choose `dataset` (enum — no free path), and optionally project `fields` (CSV), `filter` (CSV 'col:op:val', ops lt|lte|gt|gte|eq|in, AND-combined), and `sort` (CSV, '-' = desc), with page[size]/page[number] pagination. Returns raw rows plus a truthful `_meta` (totalAvailable = upstream total-count, offset pagination). Value/amount fields are raw upstream strings — the string \"null\"/empty means 'no value', never 0. Covers rates_of_exchange + debt_outstanding without a dedicated tool.",
4412
4654
  inputSchema: TreasuryQueryDatasetInput,
4413
4655
  handler: (input) => treasury.queryDataset(input),
4414
4656
  }),
@@ -4601,7 +4843,7 @@ export const TOOLS = [
4601
4843
  inputSchema: BlsQcewInput,
4602
4844
  handler: (input) => bls.qcew(input),
4603
4845
  }),
4604
- // ━━━ OpenFEMA — keyless disaster declarations + emergency-assistance spend (2) ━━━ ADR-0016
4846
+ // ━━━ OpenFEMA — keyless disaster declarations + emergency-assistance spend (3) ━━━ ADR-0016
4605
4847
  defineTool({
4606
4848
  name: "fema_search_public_assistance",
4607
4849
  description: "Search FEMA Public Assistance funded projects — federal emergency-assistance spend to state/local/tribal applicants (keyless OpenFEMA, dataset PublicAssistanceFundedProjectsDetails v2, ~800k rows). Structured filters (module-built into an OData $filter; each LIVE-VERIFIED to narrow): `state` (→ stateAbbreviation), `disasterNumber`, `applicantId`, `damageCategoryCode` (e.g. 'B' = Emergency Protective Measures), `incidentType`, `minProjectAmount`/`maxProjectAmount` (projectAmount ge/le), `declaredDateFrom`/`declaredDateTo` (declarationDate ge/le). `limit` (≤1000, def 100 → $top), `offset` (→ $skip). HONESTY: the module ALWAYS sends $inlinecount=allpages so totalAvailable is the EXACT filtered total (metadata.count), never the page length; amount fields are number|null (a real 0 stays 0, absent → null); genuine-empty ⇒ complete:true/total:0; an outage/400/404 THROWS (never a fake empty).",
@@ -4614,6 +4856,26 @@ export const TOOLS = [
4614
4856
  inputSchema: FemaDisasterDeclarationsInput,
4615
4857
  handler: (input) => fema.disasterDeclarations(input),
4616
4858
  }),
4859
+ defineTool({
4860
+ name: "fema_search_hazard_mitigation",
4861
+ description: "Search FEMA Hazard Mitigation Assistance projects — the disaster-RESILIENCE grant axis (HMGP/FMA/PDM/BRIC mitigation grants to state/local/tribal subrecipients, distinct from the disaster-RECOVERY spend in fema_search_public_assistance). Keyless OpenFEMA, dataset HazardMitigationAssistanceProjects v4, ~56k rows. Structured filters (module-built into an OData $filter; each LIVE-VERIFIED to narrow): `state` (→ state — the FULL state NAME, e.g. 'Alabama', NOT the 2-letter code), `programArea` (HMGP/FMA/PDM/BRIC/LPDM/FMA-SL), `disasterNumber`, `status` (e.g. 'Closed'), `programFy`, `region` (FEMA region 1–10), `minProjectAmount`/`maxProjectAmount` (projectAmount ge/le). `limit` (≤1000, def 100 → $top), `offset` (→ $skip). HONESTY: the module ALWAYS sends $inlinecount=allpages so totalAvailable is the EXACT filtered total (metadata.count), never the page length; amount fields (projectAmount/federalShareObligated/initialObligationAmount/netValueBenefits) are number|null (a real 0 stays 0, absent → null); genuine-empty ⇒ complete:true/total:0; an outage/400/404 THROWS (never a fake empty). NOTE: 'state' here is the full name (this dataset 400s on a 2-letter code), whereas fema_search_public_assistance maps 'state' to the 2-letter 'stateAbbreviation'.",
4862
+ inputSchema: FemaSearchHazardMitigationInput,
4863
+ handler: (input) => fema.searchHazardMitigation(input),
4864
+ }),
4865
+ // ━━━ NWS — National Weather Service active alerts (keyless) (1) ━━━
4866
+ defineTool({
4867
+ name: "nws_active_alerts",
4868
+ description: "List CURRENTLY-ACTIVE National Weather Service alerts — watches, warnings, and advisories (keyless; api.weather.gov). The disaster/climate-readiness lane that pairs with the FEMA tools (declarations → public assistance → hazard mitigation → LIVE active weather): where severe-weather events are active NOW, ahead of the declarations/contracts that follow. Filters: `state` (2-letter code → server-side ?area=, e.g. 'CA'; omit for all US), `event` (case-insensitive substring, e.g. 'Flood', 'Wind'), `severity` (Extreme/Severe/Moderate/Minor/Unknown); `limit`/`offset` pagination. Each alert: { id, event, headline, severity, urgency, certainty, category, status, messageType, areaDesc, effective, onset, expires, ends, senderName, description, instruction, response }. HONESTY: this is REAL-TIME data (alerts active at request time — a live snapshot, NOT a historical archive; read effective/expires for each window, disclosed in _meta); every scalar is null-never-empty-string and dates are ISO strings; totalAvailable is the EXACT count of matched active alerts; a NO-active-alerts result is an HONEST EMPTY (returned:0), never an error; an outage/4xx/timeout THROWS and a non-FeatureCollection body ⇒ schema_drift. A descriptive User-Agent is sent per NWS policy (no key/token).",
4869
+ inputSchema: NwsActiveAlertsInput,
4870
+ handler: (input) => nws.activeAlerts(input),
4871
+ }),
4872
+ // ━━━ get.gov — CISA authoritative .gov domain registry (keyless) (1) ━━━
4873
+ defineTool({
4874
+ name: "search_gov_domains",
4875
+ description: "Search the authoritative US .gov domain registry (CISA get.gov) — resolve which ORGANIZATION owns a .gov domain, enumerate federal agencies, and MAP SLED entities (state/county/city/school-district/special-district/tribal) for market targeting. Keyless. scope 'all' (federal + SLED, ~16k rows, default) | 'federal'. Filters (client-side over the published CSV): organization/domain/city (case-insensitive SUBSTRING), domainType (e.g. 'Federal - Executive', 'County', 'Tribal'), state (2-letter). Each row: domain, domainType, organization, suborganization, city, state. HONESTY: source is CISA's OFFICIAL registry published at github.com/cisagov/dotgov-data (authoritative first-party data, not a .gov API host — provenance disclosed in _meta); the registry has no query API so filtering is CLIENT-SIDE and totalAvailable is the EXACT match count; the 'Security contact email' column is intentionally EXCLUDED (org mailbox — this tool resolves organizations, not contacts); an outage/4xx THROWS (never a fake empty); a header-column rename ⇒ schema_drift.",
4876
+ inputSchema: SearchGovDomainsInput,
4877
+ handler: (input) => govDomains.searchGovDomains(input),
4878
+ }),
4617
4879
  // ━━━ FPDS-NG — federal contract AWARD ACTIONS (keyless ATOM) (1) ━━━ ADR-0012
4618
4880
  // The FIRST XML/ATOM source (bounded, ReDoS-safe hand-parser — the far.ts/gao.ts
4619
4881
  // lineage; NOT the getJson port). FPDS is the system-of-record USAspending
@@ -4952,6 +5214,12 @@ export const TOOLS = [
4952
5214
  inputSchema: OpenfdaDeviceClearancesInput,
4953
5215
  handler: (input) => openfdaDevice.deviceClearances(input),
4954
5216
  }),
5217
+ defineTool({
5218
+ name: "openfda_drug_approvals",
5219
+ description: "Search openFDA Drugs@FDA DRUG APPROVALS — FDA-approved drug applications (NDA/ANDA/BLA) with the sponsor, application number, each approved product (brand + generic/active-ingredient name, dosage form, route, marketing status), and the submission/approval history (openFDA /drug/drugsfda.json; api.fda.gov). Answers 'what drugs did sponsor X get approved, and which are still marketed' — pharma vendor product/approval intelligence. KEYLESS (an OPTIONAL free OPENFDA_API_KEY only RAISES the rate limit — keyless works at ~1000 requests/day; NEVER throws for a missing key; api_key_status lists every source's key requirement). Input: STRUCTURED filters — `sponsorName` (→sponsor_name), `brandName` (→products.brand_name), `activeIngredient` (→products.active_ingredients.name), `applicationNumber` (→application_number) — safely escaped into the openFDA search= Lucene string (NO raw passthrough — injection-safe), plus `limit` (1..100, default 25) and `skip` (offset ≥0). Returns { applications:[{ applicationNumber, sponsorName, products:[{ brandName, genericIngredients:[{name,strength}], dosageForm, route, marketingStatus }], submissions:[{ submissionType, submissionNumber, submissionStatus, submissionStatusDate, submissionClass }] }] } + honest _meta. HONESTY: totalAvailable is openFDA's EXACT meta.results.total (skip/limit pagination — never results.length); every scalar is null-never-empty-string; a 'Discontinued' marketingStatus is NOT an approval revocation (disclosed in _meta). ★A no-match query returns openFDA HTTP 404 NOT_FOUND ⇒ an HONEST EMPTY (returned:0/total:0), NOT an error; a 400 ⇒ invalid_input surfacing openFDA's message; a 5xx ⇒ THROWS; a 200 non-JSON ⇒ schema_drift. The optional key rides ONLY the &api_key= query param — never logged or echoed.",
5220
+ inputSchema: OpenfdaDrugApprovalsInput,
5221
+ handler: (input) => openfdaDrugsfda.drugApprovals(input),
5222
+ }),
4955
5223
  // ━━━ NHTSA vehicle safety (api.nhtsa.gov) — vehicle/parts supplier vetting (2) ━━━ ADR-0057
4956
5224
  // ★KEYLESS — no API key at all (no parameter, no header). The cross-agency
4957
5225
  // product-safety family alongside openFDA (medical). Both tools share
@@ -4983,6 +5251,13 @@ export const TOOLS = [
4983
5251
  inputSchema: CpscRecallsInput,
4984
5252
  handler: (input) => cpsc.recalls(input),
4985
5253
  }),
5254
+ // ━━━ CBP Border Wait Times (bwt.cbp.gov) — freight/logistics (1) ━━━
5255
+ defineTool({
5256
+ name: "cbp_border_wait_times",
5257
+ description: "Live CBP land-border-port wait times — current commercial-vehicle (and passenger) crossing delays at every US Canadian- and Mexican-border port (keyless; bwt.cbp.gov). The FREIGHT / LOGISTICS situational-awareness lane: per-port commercial-vehicle standard + FAST lane delay (minutes), operational status, open-lane count, and maximum lanes. Filters (optional): `border` (case-insensitive substring, 'Canadian'/'Mexican'), `portName` (substring, e.g. 'Laredo'); `limit`/`offset` pagination. Each row: { portNumber, portName, crossingName, border, portStatus (Open/Closed), asOf, commercialVehicle:{ maxLanes, standard:{operationalStatus, delayMinutes, lanesOpen, updateTime}, fast:{…} } }. HONESTY: this is REAL-TIME operational data — each lane carries its own updateTime (surfaced verbatim; freshness never implied live-to-the-second); delayMinutes/lanesOpen are number|null (a real 0 stays 0; an empty/N/A value — e.g. a closed lane — is null, NEVER a fabricated 0, because a closed lane's delay is UNKNOWN, not zero); the API returns the WHOLE port set so totalAvailable is the EXACT matched-port count; an outage/4xx/timeout THROWS and a non-array body ⇒ schema_drift (never a fake empty).",
5258
+ inputSchema: CbpBorderWaitInput,
5259
+ handler: (input) => cbpBorder.borderWaitTimes(input),
5260
+ }),
4986
5261
  // ━━━ BEA Regional Economic Accounts (apps.bea.gov) — regional GDP/income (1) ━━━ ADR-0051
4987
5262
  // ★The server's THIRD KEY-REQUIRED source: the BEA Data API has NO keyless tier, so
4988
5263
  // WITHOUT a BEA_API_KEY this tool throws an honest invalid_input config error (the
@@ -5221,6 +5496,32 @@ function synthesizeDefaultMeta(toolName, sam) {
5221
5496
  }
5222
5497
  return buildMeta({ source, keylessMode, complete: true, truncated: false });
5223
5498
  }
5499
+ // Unwrap a tool's inputSchema down to its underlying ZodObject so we can read the
5500
+ // set of declared top-level keys. Tools wrap the object in .refine()/.superRefine()
5501
+ // (ZodEffects), or occasionally .optional()/.default()/.nullable(), so peel those
5502
+ // layers. Returns null if no ZodObject is reachable (then unknown-key rejection is
5503
+ // skipped for that tool — fail open, never fail closed on our own introspection).
5504
+ function objectSchemaOf(schema) {
5505
+ let s = schema;
5506
+ for (let i = 0; i < 20; i++) {
5507
+ const def = s?._def;
5508
+ if (!def)
5509
+ break;
5510
+ const tn = def.typeName;
5511
+ if (tn === "ZodObject")
5512
+ return s;
5513
+ if (tn === "ZodEffects") {
5514
+ s = def.schema;
5515
+ continue;
5516
+ }
5517
+ if (tn === "ZodOptional" || tn === "ZodDefault" || tn === "ZodNullable") {
5518
+ s = def.innerType;
5519
+ continue;
5520
+ }
5521
+ break;
5522
+ }
5523
+ return null;
5524
+ }
5224
5525
  export async function runTool(name, args, sam) {
5225
5526
  // R1 (ADR-0001) — registry dispatch. Every tool's TOOLS[] entry carries a
5226
5527
  // co-located `handler`: route through it by parsing `args` with the entry's
@@ -5230,6 +5531,26 @@ export async function runTool(name, args, sam) {
5230
5531
  // gone (all 52 tools migrated) — an unknown name has no entry and throws.
5231
5532
  const entry = TOOLS.find((t) => t.name === name);
5232
5533
  if (entry?.handler) {
5534
+ // HONESTY (dogfooding 2026-07-15): reject UNKNOWN top-level input keys LOUD
5535
+ // instead of Zod's default silent-strip. A misspelled filter (naicsCode↔naics,
5536
+ // keyword↔query) was otherwise dropped and the tool scanned the WHOLE corpus,
5537
+ // returning an authoritative-looking WRONG answer with no error. We name the
5538
+ // unknown key(s) and list the valid ones so the mistake self-corrects. Skip
5539
+ // when the schema intentionally accepts extras (unknownKeys==="passthrough").
5540
+ const obj = objectSchemaOf(entry.inputSchema);
5541
+ if (obj && obj._def.unknownKeys !== "passthrough" && args && typeof args === "object") {
5542
+ const known = new Set(Object.keys(obj.shape));
5543
+ const unknown = Object.keys(args).filter((k) => !known.has(k));
5544
+ if (unknown.length > 0) {
5545
+ throw new ToolErrorCarrier({
5546
+ kind: "invalid_input",
5547
+ message: `Unknown input ${unknown.length > 1 ? "keys" : "key"} for ${name}: ` +
5548
+ `${unknown.map((k) => `'${k}'`).join(", ")}. ` +
5549
+ `Valid keys: ${[...known].sort().join(", ")}.`,
5550
+ retryable: false,
5551
+ });
5552
+ }
5553
+ }
5233
5554
  const input = entry.inputSchema.parse(args);
5234
5555
  return await entry.handler(input, { sam });
5235
5556
  }