@cyanheads/usaspending-mcp-server 0.7.2 → 0.7.3

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 (65) hide show
  1. package/AGENTS.md +1 -1
  2. package/CLAUDE.md +1 -1
  3. package/README.md +20 -9
  4. package/changelog/0.7.x/0.7.3.md +29 -0
  5. package/dist/index.js +1 -6
  6. package/dist/index.js.map +1 -1
  7. package/dist/mcp-server/tools/definitions/agency-filters.d.ts +36 -0
  8. package/dist/mcp-server/tools/definitions/agency-filters.d.ts.map +1 -0
  9. package/dist/mcp-server/tools/definitions/agency-filters.js +123 -0
  10. package/dist/mcp-server/tools/definitions/agency-filters.js.map +1 -0
  11. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.d.ts +4 -1
  12. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.d.ts.map +1 -1
  13. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.js +44 -9
  14. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.js.map +1 -1
  15. package/dist/mcp-server/tools/definitions/dates.d.ts +2 -0
  16. package/dist/mcp-server/tools/definitions/dates.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/dates.js +2 -0
  18. package/dist/mcp-server/tools/definitions/dates.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/disaster-spending.tool.d.ts +1 -1
  20. package/dist/mcp-server/tools/definitions/disaster-spending.tool.js +4 -4
  21. package/dist/mcp-server/tools/definitions/disaster-spending.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/filters.d.ts +9 -9
  23. package/dist/mcp-server/tools/definitions/filters.d.ts.map +1 -1
  24. package/dist/mcp-server/tools/definitions/filters.js +10 -11
  25. package/dist/mcp-server/tools/definitions/filters.js.map +1 -1
  26. package/dist/mcp-server/tools/definitions/get-agency.tool.d.ts +2 -0
  27. package/dist/mcp-server/tools/definitions/get-agency.tool.d.ts.map +1 -1
  28. package/dist/mcp-server/tools/definitions/get-agency.tool.js +35 -13
  29. package/dist/mcp-server/tools/definitions/get-agency.tool.js.map +1 -1
  30. package/dist/mcp-server/tools/definitions/get-recipient.tool.d.ts +1 -1
  31. package/dist/mcp-server/tools/definitions/get-recipient.tool.d.ts.map +1 -1
  32. package/dist/mcp-server/tools/definitions/get-recipient.tool.js +20 -10
  33. package/dist/mcp-server/tools/definitions/get-recipient.tool.js.map +1 -1
  34. package/dist/mcp-server/tools/definitions/index.d.ts +30 -11
  35. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  36. package/dist/mcp-server/tools/definitions/search-awards.tool.d.ts +8 -3
  37. package/dist/mcp-server/tools/definitions/search-awards.tool.d.ts.map +1 -1
  38. package/dist/mcp-server/tools/definitions/search-awards.tool.js +38 -24
  39. package/dist/mcp-server/tools/definitions/search-awards.tool.js.map +1 -1
  40. package/dist/mcp-server/tools/definitions/search-recipients.tool.d.ts +1 -0
  41. package/dist/mcp-server/tools/definitions/search-recipients.tool.d.ts.map +1 -1
  42. package/dist/mcp-server/tools/definitions/search-recipients.tool.js +7 -5
  43. package/dist/mcp-server/tools/definitions/search-recipients.tool.js.map +1 -1
  44. package/dist/mcp-server/tools/definitions/spending-by-category.tool.d.ts +5 -2
  45. package/dist/mcp-server/tools/definitions/spending-by-category.tool.d.ts.map +1 -1
  46. package/dist/mcp-server/tools/definitions/spending-by-category.tool.js +25 -16
  47. package/dist/mcp-server/tools/definitions/spending-by-category.tool.js.map +1 -1
  48. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.d.ts +5 -2
  49. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.d.ts.map +1 -1
  50. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.js +21 -17
  51. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.js.map +1 -1
  52. package/dist/mcp-server/tools/definitions/spending-over-time.tool.d.ts +4 -2
  53. package/dist/mcp-server/tools/definitions/spending-over-time.tool.d.ts.map +1 -1
  54. package/dist/mcp-server/tools/definitions/spending-over-time.tool.js +12 -13
  55. package/dist/mcp-server/tools/definitions/spending-over-time.tool.js.map +1 -1
  56. package/dist/services/usaspending/types.d.ts +3 -2
  57. package/dist/services/usaspending/types.d.ts.map +1 -1
  58. package/dist/services/usaspending/types.js.map +1 -1
  59. package/dist/services/usaspending/usaspending-service.d.ts +21 -6
  60. package/dist/services/usaspending/usaspending-service.d.ts.map +1 -1
  61. package/dist/services/usaspending/usaspending-service.js +86 -21
  62. package/dist/services/usaspending/usaspending-service.js.map +1 -1
  63. package/package.json +2 -2
  64. package/server.json +3 -3
  65. package/skills/usaspending-guide/SKILL.md +7 -3
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** usaspending-mcp-server
4
- **Version:** 0.7.2
4
+ **Version:** 0.7.3
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.22`
6
6
  **Engines:** Bun ≥1.4.4, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** usaspending-mcp-server
4
- **Version:** 0.7.2
4
+ **Version:** 0.7.3
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.22`
6
6
  **Engines:** Bun ≥1.4.4, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.4.0
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.7.2-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/usaspending-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.4.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/usaspending-mcp-server?style=flat-square)](https://www.npmjs.com/package/@cyanheads/usaspending-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.4-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.7.3-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/usaspending-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.4.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/usaspending-mcp-server?style=flat-square)](https://www.npmjs.com/package/@cyanheads/usaspending-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.4-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -36,7 +36,7 @@ Where federal money goes, from USAspending.gov: awards, recipients, agencies, an
36
36
  | Tool | Description |
37
37
  |:---|:---|
38
38
  | `usaspending_list_agencies` | List top-tier federal agencies with codes, slugs, and budget totals labelled by reporting year and quarter |
39
- | `usaspending_autocomplete_filters` | Look up NAICS, PSC, CFDA, agency, recipient, or state, county, and district location codes from a free-text description |
39
+ | `usaspending_autocomplete_filters` | Look up NAICS, PSC, CFDA, DEF, agency, recipient, or state, county, and district location codes from a free-text description |
40
40
  | `usaspending_search_awards` | Search awards by keyword, recipient, agency, award type, NAICS code, assistance listing, PSC, DEF code, location, or date range |
41
41
  | `usaspending_get_award` | Fetch one award's full record: amounts, recipient, agencies, codes, competition, parent IDV, DEF-code funding |
42
42
  | `usaspending_get_award_transactions` | List the transactions (modifications, amendments) on an award |
@@ -69,9 +69,10 @@ The [usaspending-guide](./skills/usaspending-guide/SKILL.md) covers recipient re
69
69
 
70
70
  ### `usaspending_autocomplete_filters` <sub>tool</sub>
71
71
 
72
- - `type` (`naics`, `psc`, `cfda`, `awarding_agency`, `recipient`, `location`) plus `search_text`; `limit` default 10, at most 500 per call
72
+ - `type` (`naics`, `psc`, `cfda`, `def_code`, `awarding_agency`, `recipient`, `location`) plus `search_text`; `limit` default 10, at most 500 per call
73
+ - `def_code` matches an exact code or text in the appropriation title or public law, case-insensitively. Rows carry `code`, `name`, and `public_law` / `disaster_group` when supplied; exact code matches come first. Use the returned code in spending and disaster filters
73
74
  - Rows carry `code` and `name`, and `uei` / `duns` for recipients; no match fails as `no_match`. A `cfda` code goes in `assistance_listings` and a `psc` code in `psc_codes` on `usaspending_search_awards` and the three spending analytics tools
74
- - Agency rows carry the matched agency's own `name`, `abbreviation`, and `tier` (`toptier` or `subtier`), its parent's `toptier_name` and `toptier_code`, and `subtier_code` when supplied. Pass `name` to `agency_name` on award search or spending analytics to match that agency; pass `toptier_name` for the whole department. Agency results combine top-tier then sub-tier matches under one `limit`; office matches are excluded
75
+ - Agency rows carry the matched agency's own `name`, `abbreviation`, and `tier` (`toptier` or `subtier`), its parent's `toptier_name` and `toptier_code`, and `subtier_code` when supplied. Pass `name` to `agency_name` or `funding_agency_name` on award search or spending analytics to match that agency; pass `toptier_name` for the whole department. Agency results combine top-tier then sub-tier matches under one `limit`; office matches are excluded
75
76
  - `naics` matches official NAICS title text: "software" resolves, "cybersecurity" does not, so search with the industry term a title would use
76
77
  - `location` matches US states, then counties, then congressional districts by name. Rows carry `kind` (`state`, `county`, or `district`), the upstream's uppercase `name`, and `code`: a postal code for a state, the 5-digit state + county FIPS code for a county, the state FIPS + district number (e.g. `5307`) for a district; county and district rows add the `state` postal code. Upstream returns at most 100 rows of each kind, and a notice says when one hits it. Countries, cities, and ZIP codes are not returned; `no_match` names the three kinds. The freely associated states (`FM`, `MH`, `PW`) and the Minor Outlying Islands (`UM`) have no upstream state row and get no code. Pass a code to `usaspending_search_awards` and the spending analytics location filters, or to `shape_codes` on `usaspending_spending_by_geography`
77
78
 
@@ -80,7 +81,7 @@ The [usaspending-guide](./skills/usaspending-guide/SKILL.md) covers recipient re
80
81
  ### `usaspending_search_awards` <sub>tool</sub>
81
82
 
82
83
  - Filters:
83
- - `keyword`, `agency_name`, `recipient_name`, `naics_codes`
84
+ - `keyword`, `agency_name` (awarding), `funding_agency_name`, `recipient_name`, `naics_codes`
84
85
  - `assistance_listings`: Assistance Listing numbers such as `93.866`, from `usaspending_autocomplete_filters` `type: cfda`
85
86
  - `psc_codes`: 1–4 characters, where a prefix such as `Y1` covers the codes under it; contracts and IDVs only
86
87
  - `def_codes`: Disaster Emergency Fund Codes such as `Z` (PSC and DEF codes are sent uppercased)
@@ -138,13 +139,14 @@ The [usaspending-guide](./skills/usaspending-guide/SKILL.md) covers recipient re
138
139
 
139
140
  - `keyword` matches names, UEI, or DUNS, partial matches included; surrounding whitespace is trimmed, and blank text applies no keyword filter with a notice. Optional `award_type` still scopes the totals; `limit` at most 1,000 per call
140
141
  - Rows carry `id` (a hash suffixed `-P` parent, `-C` child, or `-R` standalone) for `usaspending_get_recipient`, plus `uei`, `duns`, `recipient_level`, and `amount`; `page_metadata.total` is the full match count
142
+ - `amount` is the selected award types' precomputed trailing-12-month obligations; `period: "trailing 12 months"` labels every page. Snapshot totals can differ from the profile's live trailing-12-month totals
141
143
 
142
144
  ---
143
145
 
144
146
  ### `usaspending_get_recipient` <sub>tool</sub>
145
147
 
146
- - `recipient_id` from `usaspending_search_recipients` or `usaspending_get_award`; optional `fiscal_year` (2001–2030) scopes the totals to that fiscal year, which otherwise cover the trailing 12 months; an unknown ID fails as `recipient_not_found`
147
- - Returns address, `business_types`, `parent_id`, `parents` (`parent_id`, `parent_name`, `parent_uei`, `parent_duns` for each; `parent_name` / `parent_uei` describe the first), `alternate_names`, `total_transaction_amount`, `total_transactions`, and loan face-value totals, with `period` naming the window (`FY2020` or `trailing 12 months`). Totals span every award type; for totals by type, use `usaspending_spending_over_time` with `filters.recipient_id` and `award_type_codes`
148
+ - `recipient_id` from `usaspending_search_recipients` or `usaspending_get_award`; optional `fiscal_year` (2001–2030 or `"all"`) selects one fiscal year or all available fiscal years. Omission covers the trailing 12 months; an unknown ID fails as `recipient_not_found`
149
+ - Returns address, `business_types`, `parent_id`, `parents` (`parent_id`, `parent_name`, `parent_uei`, `parent_duns` for each; `parent_name` / `parent_uei` describe the first), `alternate_names`, `total_transaction_amount`, `total_transactions`, and loan face-value totals, with `period` naming the window (`FY2020`, `all fiscal years`, or `trailing 12 months`). Totals span every award type; for totals by type, use `usaspending_spending_over_time` with `filters.recipient_id` and `award_type_codes`
148
150
  - A `-P` parent also returns `children` (`recipient_id`, `name`, `uei`, `duns`, `amount`, `state_province`) over the same period, highest amount first, with `children_total`; `children_limit` defaults to 50, at most 500 per call. Children come from a best-effort second request: if it fails the profile still returns and `unavailable_sections` names `children`
149
151
 
150
152
  ---
@@ -154,13 +156,14 @@ The [usaspending-guide](./skills/usaspending-guide/SKILL.md) covers recipient re
154
156
  - One of directory `toptier_code` (e.g. `097` or `1601`) or `agency_slug` (e.g. `department-of-defense`); one- and two-digit numeric codes are padded (`80` becomes `080`), while three- and four-digit codes are preserved. `page` walks the sub-agency list 10 at a time. Failures are `missing_input`, `conflicting_input` (both identifiers sent), and `agency_not_found`
155
157
  - Returns `mission`, plus `budgetary_resources_amount`, `obligated_amount`, and `outlay_amount` for the most recent `fiscal_year` with reported budget data (a newly opened year with no amounts yet is skipped), `sub_agencies` with obligations and transaction and new-award counts for that same year (`sub_agency_fiscal_year` names it; without a budget year within 5 seconds the breakdown covers the current fiscal year), and `def_codes`
156
158
  - `budget_by_fiscal_year` lists `budgetary_resources_amount`, `obligated_amount`, `outlay_amount`, and `reported_through_period` for every fiscal year with reported data since FY2017, newest first; a `reported_through_period` below 12 is a year to date
159
+ - `def_codes_fiscal_year` identifies the DEF list's year, aligned with the returned budget year when available. A failed year-specific lookup omits the DEF data and names `def_codes` in `unavailable_sections`; without a budget year, the overview's DEF year is used
157
160
  - A failed budget or sub-agency request still returns the overview: the missing fields are omitted and `unavailable_sections` names each section with its `reason` (`api_unavailable`, `api_timeout`, or `upstream_error`) and whether a retry may load it
158
161
 
159
162
  ---
160
163
 
161
164
  ### `usaspending_spending_by_geography` <sub>tool</sub>
162
165
 
163
- - `scope` (`place_of_performance`, `recipient_location`) and `geo_layer` (`state`, `county`, `district`) are required; `filters` takes `keywords`, `award_type_codes`, `agency_name`, `recipient_id`, `naics_codes`, `assistance_listings`, `psc_codes`, `def_codes` (the same code filters as `usaspending_search_awards`, echoed as `applied_*`), `place_of_performance_location` and `recipient_location` (the location filters of award search, echoed as `applied_location` and `applied_recipient_location`), and `time_period_start` / `time_period_end` (`YYYY-MM-DD`; either alone fills the other, as in `usaspending_search_awards`, `applied_time_period_*` echoes the range sent, a start after the end fails as `date_range_inverted`, and a range starting before 2007-10-01 fails as `date_before_earliest`); `limit` default 50, no maximum
166
+ - `scope` (`place_of_performance`, `recipient_location`) and `geo_layer` (`state`, `county`, `district`) are required; `filters` takes `keywords`, `award_type_codes`, `agency_name`, `funding_agency_name`, `recipient_id`, `naics_codes`, `assistance_listings`, `psc_codes`, `def_codes` (the same code filters as `usaspending_search_awards`, echoed as `applied_*`), `place_of_performance_location` and `recipient_location` (the location filters of award search, echoed as `applied_location` and `applied_recipient_location`), and `time_period_start` / `time_period_end` (`YYYY-MM-DD`; either alone fills the other, as in `usaspending_search_awards`, `applied_time_period_*` echoes the range sent, a start after the end fails as `date_range_inverted`, and a range starting before 2007-10-01 fails as `date_before_earliest`); `limit` default 50, no maximum
164
167
  - Award types may mix groups. When every one named is a contract or IDV, `assistance_listings` fails as `assistance_listings_type_mismatch`; when every one is assistance, `psc_codes` fails as `psc_codes_type_mismatch`. Code-filtered amounts cover whole matching awards, and DEF-filtered totals can be negative
165
168
  - All three analytics tools apply the same keyword and NAICS rules as award search. `recipient_id` is a hexadecimal 8-4-4-4-12 hash with uppercase `-P`, `-C`, or `-R`; malformed active IDs fail as `invalid_recipient_id`, blank IDs remain unset, and hexadecimal case is normalized in `applied_recipient_id`. A well-formed unknown ID returns an empty result
166
169
  - Rows carry `shape_code`, `display_name`, `aggregated_amount`, `population`, and `per_capita`, ranked by amount; `total_areas_available` counts every match before the cap
@@ -183,6 +186,14 @@ The [usaspending-guide](./skills/usaspending-guide/SKILL.md) covers recipient re
183
186
  - Rows carry `time_period`, `aggregated_amount`, and per-type `contracts`, `grants`, `direct_payments`, `idvs`, `loans`, and `other`
184
187
  - `applied_award_type_codes` names the scope of every total and breakdown; omitted or empty codes also set `applied_award_type_default: contracts`. A zero in an excluded category does not describe that category's spending outside the selected scope
185
188
 
189
+ ### Shared spending scope
190
+
191
+ Award search and all three spending analytics tools accept `funding_agency_name` beside the awarding `agency_name`. Both roles together select their intersection, and each name matches either agency tier. Exact names and unambiguous abbreviations are resolved through agency discovery; inconclusive or unavailable lookup preserves the supplied name with an unresolved-name notice. Effective names are echoed as `applied_agency_name` and `applied_funding_agency_name`.
192
+
193
+ Award search, category, and geography disclose when no date filter was supplied and results use USAspending's available coverage. They echo the `applied_award_type_codes` actually sent; award search also echoes `applied_recipient_name`. Explicit date bounds retain their existing filling and validation rules.
194
+
195
+ Analytics using a `-P` recipient ID disclose that amounts cover awards attributed to that parent. Historical parent attribution can vary. For an entity's own awards, use returned `-C` or `-R` IDs; check both if search returns both rather than constructing a new ID by changing a suffix.
196
+
186
197
  ---
187
198
 
188
199
  ### `usaspending_disaster_spending` <sub>tool</sub>
@@ -225,7 +236,7 @@ Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): s
225
236
  USAspending-specific:
226
237
 
227
238
  - USAspending.gov API v2, keyless: the data is public under the DATA Act
228
- - Award search and the spending analytics tools cover action dates from 2007-10-01 on (an earlier start date fails as `date_before_earliest`), and DoD contract data lags publication by 90 days
239
+ - Award search and the spending analytics tools accept explicit action-date ranges from 2007-10-01 on (an earlier start fails as `date_before_earliest`), and DoD contract data lags publication by 90 days
229
240
  - `usaspending_spending_by_category` puts ten category sub-routes behind one `category` enum, and `usaspending_disaster_spending` puts five disaster endpoints behind `dimension`
230
241
  - Each request runs under one wall-clock budget (45 s by default); a slow answer gets the whole budget in one attempt, and only fast failures are retried. Failures surface as `api_timeout` or `api_unavailable` with each tool's recovery hint, and a rejected request carries USAspending's own explanation in the error message
231
242
 
@@ -0,0 +1,29 @@
1
+ ---
2
+ summary: "Filter awards and spending by funding agency, look up DEF codes by title or public law, and get all-year recipient totals. Agency detail aligns DEF codes with the budget year, and spending results explain their applied scope."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.7.3 — 2026-11-13
8
+
9
+ ## Added
10
+
11
+ - **`funding_agency_name`** filters award search and all three spending analytics tools. Supply both agency roles to match their intersection ([#127](https://github.com/cyanheads/usaspending-mcp-server/issues/127)).
12
+ - **`usaspending_autocomplete_filters`** accepts `type: "def_code"` to find Disaster Emergency Fund codes by exact code, title, or public law ([#123](https://github.com/cyanheads/usaspending-mcp-server/issues/123)).
13
+ - **`usaspending_get_recipient`** accepts `fiscal_year: "all"` for profile totals and child recipients over all available fiscal years ([#126](https://github.com/cyanheads/usaspending-mcp-server/issues/126)).
14
+
15
+ ## Changed
16
+
17
+ - **`usaspending-guide` 1.2 → 1.3** covers agency-name verification, parent attribution, recipient periods, and DEF code discovery.
18
+
19
+ ## Fixed
20
+
21
+ - **`usaspending_get_agency`** aligns DEF codes with the returned budget year, labels it with `def_codes_fiscal_year`, and reports when the year-specific list is unavailable ([#120](https://github.com/cyanheads/usaspending-mcp-server/issues/120)).
22
+ - **Award search and spending analytics** resolve case-insensitive agency names and unambiguous abbreviations. Responses echo the names sent and disclose when a name could not be verified ([#121](https://github.com/cyanheads/usaspending-mcp-server/issues/121)).
23
+ - **`usaspending_search_recipients`** labels the precomputed obligations on every page as trailing 12 months ([#122](https://github.com/cyanheads/usaspending-mcp-server/issues/122)).
24
+ - **Spending analytics** explain the attribution scope of parent recipient IDs and point callers to returned child or standalone IDs for the entity's own awards ([#124](https://github.com/cyanheads/usaspending-mcp-server/issues/124)).
25
+ - **Award search, category, and geography spending** disclose when no date filter was sent and echo applied award-type codes. Award search also echoes the applied recipient name ([#128](https://github.com/cyanheads/usaspending-mcp-server/issues/128)).
26
+
27
+ ## Dependencies
28
+
29
+ - **`@biomejs/biome`** ^2.6.6 → ^2.6.7 (dev)
package/dist/index.js CHANGED
@@ -34,12 +34,7 @@ await createApp({
34
34
  * carries a meaningful value.
35
35
  */
36
36
  sessionMode: 'stateless',
37
- instructions: 'USAspending.gov MCP server — federal award, recipient, agency, and spending data from the US Treasury DATA Act platform.\n' +
38
- '- Start with usaspending_list_agencies or usaspending_autocomplete_filters to discover agency codes, NAICS/PSC codes, Assistance Listing numbers, and state, county, and district location codes\n' +
39
- '- Use usaspending_search_awards to find awards, then usaspending_get_award for full details\n' +
40
- '- Reuse NAICS, PSC, Assistance Listing, and DEF codes as filters on usaspending_search_awards and the usaspending_spending_* tools to see where and when that money went\n' +
41
- '- Chain recipient_id from usaspending_search_awards rows or usaspending_get_award into usaspending_get_recipient for entity profiles\n' +
42
- '- Search window: 2007-10-01 onward. DoD contracts have a 90-day publication lag.',
37
+ instructions: 'USAspending.gov MCP server — federal award, recipient, agency, and spending data from the US Treasury DATA Act platform.\n- Start with usaspending_list_agencies or usaspending_autocomplete_filters to discover agency codes, NAICS/PSC/DEF codes, Assistance Listing numbers, and state, county, and district location codes\n- Use usaspending_search_awards to find awards, then usaspending_get_award for full details\n- Reuse NAICS, PSC, Assistance Listing, and DEF codes as filters on usaspending_search_awards and the usaspending_spending_* tools to see where and when that money went\n- Chain recipient_id from usaspending_search_awards rows or usaspending_get_award into usaspending_get_recipient for entity profiles\n- Explicit award-search and analytics date ranges start no earlier than 2007-10-01. Check response notices for the applied scope. DoD contracts have a 90-day publication lag.',
43
38
  setup(core) {
44
39
  const serverConfig = getServerConfig();
45
40
  initUSASpendingService(core.config, core.storage, serverConfig);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAEvF,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,wBAAwB;IAC9B,KAAK,EAAE,wBAAwB;IAC/B,KAAK,EAAE,CAAC,GAAG,kBAAkB,CAAC;IAC9B,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;IAC/B;;;;;;OAMG;IACH,UAAU,EAAE;QACV,YAAY,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;KACzD;IACD;;;;;;OAMG;IACH,WAAW,EAAE,WAAW;IACxB,YAAY,EACV,4HAA4H;QAC5H,oMAAoM;QACpM,+FAA+F;QAC/F,4KAA4K;QAC5K,wIAAwI;QACxI,kFAAkF;IACpF,KAAK,CAAC,IAAI;QACR,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;QACvC,sBAAsB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAClE,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAEvF,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,wBAAwB;IAC9B,KAAK,EAAE,wBAAwB;IAC/B,KAAK,EAAE,CAAC,GAAG,kBAAkB,CAAC;IAC9B,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;IAC/B;;;;;;OAMG;IACH,UAAU,EAAE;QACV,YAAY,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;KACzD;IACD;;;;;;OAMG;IACH,WAAW,EAAE,WAAW;IACxB,YAAY,EACV,63BAA63B;IAC/3B,KAAK,CAAC,IAAI;QACR,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;QACvC,sBAAsB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAClE,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @fileoverview Resolve spending agency names and apply both agency tiers per role.
3
+ * @module mcp-server/tools/definitions/agency-filters
4
+ */
5
+ import { type Context, z } from '@cyanheads/mcp-ts-core';
6
+ import type { USASpendingService } from '../../../services/usaspending/usaspending-service.js';
7
+ /** Names from the same directory, with independent awarding and funding roles. */
8
+ export declare const AGENCY_FILTER_FIELDS: {
9
+ agency_name: z.ZodOptional<z.ZodString>;
10
+ funding_agency_name: z.ZodOptional<z.ZodString>;
11
+ };
12
+ /** Effective names selected after input precedence. */
13
+ export type AgencyFilters = z.infer<z.ZodObject<typeof AGENCY_FILTER_FIELDS>>;
14
+ /** Echo the names actually sent after best-effort lookup. */
15
+ export declare const AGENCY_FILTER_ENRICHMENT: {
16
+ applied_agency_name: z.ZodOptional<z.ZodString>;
17
+ applied_funding_agency_name: z.ZodOptional<z.ZodString>;
18
+ };
19
+ /** Look up distinct effective names in parallel under one deadline; disclose unresolved inputs. */
20
+ export declare function resolveAgencyFilters(svc: USASpendingService, input: AgencyFilters | undefined, ctx: Context): Promise<{
21
+ names: {
22
+ agency_name?: string | undefined;
23
+ funding_agency_name?: string | undefined;
24
+ };
25
+ notices: string[];
26
+ }>;
27
+ /** Match either tier within each supplied role, retaining matches under every parent. */
28
+ export declare function applyAgencyFilters(filters: Record<string, unknown>, names: AgencyFilters): void;
29
+ /** Output enrichment shared by search and analytics. */
30
+ export declare function agencyFilterEcho(names: AgencyFilters): {
31
+ applied_agency_name?: string;
32
+ applied_funding_agency_name?: string;
33
+ };
34
+ /** Agency predicates mentioned in empty-result guidance. */
35
+ export declare function describeAgencyFilters(names: AgencyFilters): string[];
36
+ //# sourceMappingURL=agency-filters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agency-filters.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/agency-filters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAKxF,kFAAkF;AAClF,eAAO,MAAM,oBAAoB;IAC/B,WAAW;IAMX,mBAAmB;CAMpB,CAAC;AAEF,uDAAuD;AACvD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC;AAK9E,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB;IACnC,mBAAmB;IACnB,2BAA2B;CAI5B,CAAC;AAkDF,mGAAmG;AACnG,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,kBAAkB,EACvB,KAAK,EAAE,aAAa,GAAG,SAAS,EAChC,GAAG,EAAE,OAAO;;;;;;GA2Bb;AAED,yFAAyF;AACzF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,aAAa,GAAG,IAAI,CAY/F;AAED,wDAAwD;AACxD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa;;;EAOpD;AAED,4DAA4D;AAC5D,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,CAEpE"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * @fileoverview Resolve spending agency names and apply both agency tiers per role.
3
+ * @module mcp-server/tools/definitions/agency-filters
4
+ */
5
+ import { z } from '@cyanheads/mcp-ts-core';
6
+ import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
7
+ const LOOKUP_LIMIT = 50;
8
+ const LOOKUP_TIMEOUT_MS = 2_000;
9
+ /** Names from the same directory, with independent awarding and funding roles. */
10
+ export const AGENCY_FILTER_FIELDS = {
11
+ agency_name: z
12
+ .string()
13
+ .optional()
14
+ .describe('Awarding top-tier or sub-tier agency name. Use the matched name from usaspending_autocomplete_filters type=awarding_agency, or toptier_name to select the whole parent department. A sub-tier name shared by several parents matches under all parents. Exact case-insensitive names and unambiguous abbreviations resolve to the directory spelling.'),
15
+ funding_agency_name: z
16
+ .string()
17
+ .optional()
18
+ .describe('Funding top-tier or sub-tier agency name. Use the matched name from usaspending_autocomplete_filters type=awarding_agency. Exact case-insensitive names and unambiguous abbreviations resolve to the directory spelling. When agency_name is also supplied, awards must match both roles.'),
19
+ };
20
+ const AGENCY_ROLES = { agency_name: 'awarding', funding_agency_name: 'funding' };
21
+ const AGENCY_KEYS = ['agency_name', 'funding_agency_name'];
22
+ /** Echo the names actually sent after best-effort lookup. */
23
+ export const AGENCY_FILTER_ENRICHMENT = {
24
+ applied_agency_name: z.string().optional().describe('Awarding agency name sent to USAspending'),
25
+ applied_funding_agency_name: z
26
+ .string()
27
+ .optional()
28
+ .describe('Funding agency name sent to USAspending'),
29
+ };
30
+ async function resolveName(svc, name, ctx, deadlineAt) {
31
+ try {
32
+ const { results } = await svc.autocompleteAwardingAgency(name, LOOKUP_LIMIT, ctx, deadlineAt);
33
+ ctx.signal.throwIfAborted();
34
+ const top = results?.toptier_agency ?? [];
35
+ const sub = results?.subtier_agency ?? [];
36
+ const rows = [...top, ...sub];
37
+ const folded = name.toLowerCase();
38
+ const exact = rows.flatMap((row) => row.name && row.name.toLowerCase() === folded ? [row.name] : []);
39
+ const matches = exact.length
40
+ ? exact
41
+ : rows.flatMap((row) => row.name && row.abbreviation?.toLowerCase() === folded ? [row.name] : []);
42
+ const candidates = [...new Set(matches)];
43
+ const [candidate] = candidates;
44
+ if (top.length >= LOOKUP_LIMIT || sub.length >= LOOKUP_LIMIT) {
45
+ return { name, reason: 'the agency directory result reached its limit', candidates };
46
+ }
47
+ if (candidate && candidates.length === 1)
48
+ return { name: candidate };
49
+ return {
50
+ name,
51
+ reason: candidates.length
52
+ ? 'multiple distinct agency names matched'
53
+ : 'no exact agency name or abbreviation matched',
54
+ candidates,
55
+ };
56
+ }
57
+ catch (err) {
58
+ ctx.signal.throwIfAborted();
59
+ if (!(err instanceof McpError) ||
60
+ (err.code !== JsonRpcErrorCode.Timeout &&
61
+ err.code !== JsonRpcErrorCode.ServiceUnavailable &&
62
+ err.code !== JsonRpcErrorCode.RateLimited)) {
63
+ throw err;
64
+ }
65
+ return { name, reason: 'the agency directory was unavailable' };
66
+ }
67
+ }
68
+ /** Look up distinct effective names in parallel under one deadline; disclose unresolved inputs. */
69
+ export async function resolveAgencyFilters(svc, input, ctx) {
70
+ if (!input?.agency_name && !input?.funding_agency_name)
71
+ return { names: {}, notices: [] };
72
+ const lookups = new Map();
73
+ const deadlineAt = Date.now() + LOOKUP_TIMEOUT_MS;
74
+ for (const key of AGENCY_KEYS) {
75
+ const name = input?.[key];
76
+ if (name && !lookups.has(name))
77
+ lookups.set(name, resolveName(svc, name, ctx, deadlineAt));
78
+ }
79
+ const names = {};
80
+ const notices = [];
81
+ const resolved = new Map(await Promise.all([...lookups].map(async ([name, lookup]) => [name, await lookup])));
82
+ for (const key of AGENCY_KEYS) {
83
+ const name = input?.[key];
84
+ const match = name ? resolved.get(name) : undefined;
85
+ if (!match)
86
+ continue;
87
+ names[key] = match.name;
88
+ if (match.reason) {
89
+ const candidates = match.candidates?.map((candidate) => JSON.stringify(candidate)).join(', ');
90
+ notices.push(`Could not verify ${key}=${JSON.stringify(name)} because ${match.reason}. Sent the original name.${candidates ? ` Matching names: ${candidates}.` : ''} Use usaspending_autocomplete_filters type=awarding_agency to check the name.`);
91
+ }
92
+ }
93
+ return { names, notices };
94
+ }
95
+ /** Match either tier within each supplied role, retaining matches under every parent. */
96
+ export function applyAgencyFilters(filters, names) {
97
+ const agencies = AGENCY_KEYS.flatMap((key) => {
98
+ const name = names[key];
99
+ const type = AGENCY_ROLES[key];
100
+ return name
101
+ ? [
102
+ { type, tier: 'toptier', name },
103
+ { type, tier: 'subtier', name },
104
+ ]
105
+ : [];
106
+ });
107
+ if (agencies.length)
108
+ filters.agencies = agencies;
109
+ }
110
+ /** Output enrichment shared by search and analytics. */
111
+ export function agencyFilterEcho(names) {
112
+ return {
113
+ ...(names.agency_name ? { applied_agency_name: names.agency_name } : {}),
114
+ ...(names.funding_agency_name
115
+ ? { applied_funding_agency_name: names.funding_agency_name }
116
+ : {}),
117
+ };
118
+ }
119
+ /** Agency predicates mentioned in empty-result guidance. */
120
+ export function describeAgencyFilters(names) {
121
+ return AGENCY_KEYS.flatMap((key) => (names[key] ? [`${key}=${JSON.stringify(names[key])}`] : []));
122
+ }
123
+ //# sourceMappingURL=agency-filters.js.map
@@ -0,0 +1 @@
1
+ {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AI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,MAAM,IAAI,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAC/B,OAAO,IAAI;YACT,CAAC,CAAC;gBACE,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;gBAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;aAChC;YACH,CAAC,CAAC,EAAE,CAAC;IACT,CAAC,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,MAAM;QAAE,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACnD,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,gBAAgB,CAAC,KAAoB;IACnD,OAAO;QACL,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxE,GAAG,CAAC,KAAK,CAAC,mBAAmB;YAC3B,CAAC,CAAC,EAAE,2BAA2B,EAAE,KAAK,CAAC,mBAAmB,EAAE;YAC5D,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,qBAAqB,CAAC,KAAoB;IACxD,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpG,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @fileoverview Tool to look up valid code values for filter fields: NAICS, PSC, CFDA,
2
+ * @fileoverview Tool to look up valid code values for filter fields: NAICS, PSC, CFDA, DEF,
3
3
  * agency names, recipient names, and US state, county, and congressional district codes.
4
4
  * @module mcp-server/tools/definitions/autocomplete-filters.tool
5
5
  */
@@ -9,6 +9,7 @@ export declare const autocompleteFiltersTool: import("@cyanheads/mcp-ts-core").T
9
9
  type: z.ZodEnum<{
10
10
  awarding_agency: "awarding_agency";
11
11
  cfda: "cfda";
12
+ def_code: "def_code";
12
13
  location: "location";
13
14
  naics: "naics";
14
15
  psc: "psc";
@@ -27,6 +28,8 @@ export declare const autocompleteFiltersTool: import("@cyanheads/mcp-ts-core").T
27
28
  }>>;
28
29
  code: z.ZodOptional<z.ZodString>;
29
30
  name: z.ZodOptional<z.ZodString>;
31
+ public_law: z.ZodOptional<z.ZodString>;
32
+ disaster_group: z.ZodOptional<z.ZodString>;
30
33
  state: z.ZodOptional<z.ZodString>;
31
34
  abbreviation: z.ZodOptional<z.ZodString>;
32
35
  tier: z.ZodOptional<z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete-filters.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/autocomplete-filters.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAiEjE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6WlC,CAAC"}
1
+ {"version":3,"file":"autocomplete-filters.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/autocomplete-filters.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAiEjE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgZlC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @fileoverview Tool to look up valid code values for filter fields: NAICS, PSC, CFDA,
2
+ * @fileoverview Tool to look up valid code values for filter fields: NAICS, PSC, CFDA, DEF,
3
3
  * agency names, recipient names, and US state, county, and congressional district codes.
4
4
  * @module mcp-server/tools/definitions/autocomplete-filters.tool
5
5
  */
@@ -61,16 +61,16 @@ function mapLocationBuckets(resp, requested) {
61
61
  }
62
62
  export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters', {
63
63
  title: 'Autocomplete Codes and Names',
64
- description: 'Look up valid code values for filter fields by searching free-text descriptions. Use the type parameter to select the lookup table: naics (NAICS industry codes), psc (product/service codes), cfda (CFDA/Assistance Listing program numbers), awarding_agency (agency and sub-agency names, each with its tier and top-tier parent — agency_name filters take the matched name; a sub-tier name shared by several parents matches under all parents), recipient (recipient names with UEI/DUNS), or location (US state, county, and congressional district names, resolved to the codes the location filters and usaspending_spending_by_geography shape_codes take). Call this before filtering awards when you know a description but not the exact code. Returns matching codes and names for use in other tool filters.',
64
+ description: 'Look up valid code values for filter fields by searching free-text descriptions. Use the type parameter to select the lookup table: naics (NAICS industry codes), psc (product/service codes), cfda (CFDA/Assistance Listing program numbers), def_code (Disaster/Emergency Funding codes by code, appropriation title, or public law), awarding_agency (agency and sub-agency names, each with its tier and top-tier parent — agency_name and funding_agency_name filters take the matched name; a sub-tier name shared by several parents matches under all parents), recipient (recipient names with UEI/DUNS), or location (US state, county, and congressional district names, resolved to the codes the location filters and usaspending_spending_by_geography shape_codes take). Call this before filtering awards when you know a description but not the exact code. Returns matching codes and names for use in other tool filters.',
65
65
  annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
66
66
  input: z.object({
67
67
  type: z
68
- .enum(['naics', 'psc', 'cfda', 'awarding_agency', 'recipient', 'location'])
69
- .describe('Lookup table to search: naics (industry codes), psc (product/service codes, for the psc_codes filter), cfda (Assistance Listing program numbers, for the assistance_listings filter), awarding_agency (agency and sub-agency names), recipient (recipient names), location (US states with DC and the territories, counties, and current congressional districts, matched from the start of their name: "King County", "Santa Fe", "WA-07"; countries, cities, and ZIP codes are not returned). The psc_codes and assistance_listings filters are taken by usaspending_search_awards and by the filters object of usaspending_spending_by_category, usaspending_spending_by_geography, and usaspending_spending_over_time.'),
68
+ .enum(['naics', 'psc', 'cfda', 'awarding_agency', 'recipient', 'location', 'def_code'])
69
+ .describe('Lookup table to search: naics (industry codes), psc (product/service codes, for psc_codes), cfda (Assistance Listing program numbers, for assistance_listings), def_code (Disaster/Emergency Funding codes, for def_codes), awarding_agency (agency and sub-agency names), recipient (recipient names), location (US states with DC and the territories, counties, and current congressional districts, matched from the start of their name: "King County", "Santa Fe", "WA-07"; countries, cities, and ZIP codes are not returned). The psc_codes, assistance_listings, and def_codes filters are taken by usaspending_search_awards and the spending analytics tools.'),
70
70
  search_text: z
71
71
  .string()
72
72
  .min(1)
73
- .describe('Free-text search string — use a description, keyword, or partial code to find matches'),
73
+ .describe('Free-text search string. For def_code, use an exact code or part of an appropriation title or public law. For other lookups, use a description, keyword, or partial code.'),
74
74
  limit: LIMIT.schema.describe('Maximum number of results to return. Default 10, at most 500 per call. Agency matches combine independently capped top-tier then sub-tier buckets, preserving their order without deduplicating names; offices are excluded. Location matches combine state, then county, then district rows, and upstream returns at most 100 of each kind. The recipient lookup unions three upstream match buckets (name, UEI, DUNS) and can return up to 3x this value, so its results are capped to this limit before returning — the cap keeps them in bucket order, so name matches fill the page first and identifier matches appear only in whatever room is left. To resolve a specific UEI or DUNS, pass the identifier itself as search_text. Every lookup returns at most limit rows.'),
75
75
  }),
76
76
  output: z.object({
@@ -86,11 +86,19 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
86
86
  code: z
87
87
  .string()
88
88
  .optional()
89
- .describe("Code value (NAICS code, PSC code, Assistance Listing/CFDA number, or location code); use this in filter parameters — an Assistance Listing number goes in usaspending_search_awards assistance_listings. A location row's code by kind: state, the 2-letter postal code for a location filter's state and state shape_codes; county, the 5-digit state + county FIPS code for a location filter's county and county shape_codes; district, the 4-digit state FIPS + district number for district shape_codes on usaspending_spending_by_geography. Agency rows carry toptier_code instead."),
89
+ .describe("Code value (NAICS, PSC, Assistance Listing/CFDA, DEF, or location code); use this in filter parameters — an Assistance Listing number goes in assistance_listings and a DEF code in def_codes. A location row's code by kind: state, the 2-letter postal code for a location filter's state and state shape_codes; county, the 5-digit state + county FIPS code for a location filter's county and county shape_codes; district, the 4-digit state FIPS + district number for district shape_codes on usaspending_spending_by_geography. Agency rows carry toptier_code instead."),
90
90
  name: z
91
91
  .string()
92
92
  .optional()
93
93
  .describe("Human-readable name or description; for awarding_agency, the matched agency's own name, which for a sub-agency differs from toptier_name; for location, upstream's uppercase name (WASHINGTON, KING, WA-07)"),
94
+ public_law: z
95
+ .string()
96
+ .optional()
97
+ .describe('def_code only: public law for the funding code, when supplied'),
98
+ disaster_group: z
99
+ .string()
100
+ .optional()
101
+ .describe('def_code only: USAspending disaster grouping, when supplied'),
94
102
  state: z
95
103
  .string()
96
104
  .optional()
@@ -106,11 +114,11 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
106
114
  toptier_name: z
107
115
  .string()
108
116
  .optional()
109
- .describe('awarding_agency only: the top-tier parent name. Use the matched name in agency_name on usaspending_search_awards and spending analytics to select the sub-agency; use toptier_name intentionally to select its whole parent department.'),
117
+ .describe('awarding_agency only: the top-tier parent name. Use the matched name in agency_name or funding_agency_name on usaspending_search_awards and spending analytics to select the sub-agency; use toptier_name intentionally to select its whole parent department.'),
110
118
  toptier_code: z
111
119
  .string()
112
120
  .optional()
113
- .describe('awarding_agency only: the 3-digit top-tier agency code, accepted by usaspending_get_agency'),
121
+ .describe('awarding_agency only: the directory top-tier agency code, accepted by usaspending_get_agency'),
114
122
  subtier_code: z
115
123
  .string()
116
124
  .optional()
@@ -133,7 +141,7 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
133
141
  // discloses truncation only when that row (or a recipient bucket overflow) came back.
134
142
  enrichment: {
135
143
  lookup_type: z.string().describe('Lookup table that was searched'),
136
- query: z.string().describe('Search text sent to the autocomplete API'),
144
+ query: z.string().describe('Lookup search text'),
137
145
  result_count: z.number().describe('Number of matching results returned'),
138
146
  truncated: z
139
147
  .boolean()
@@ -199,6 +207,28 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
199
207
  rawResults = mapped.rows;
200
208
  fullLocationKinds = mapped.full;
201
209
  }
210
+ else if (input.type === 'def_code') {
211
+ const codes = await svc.getDefCodesReference(ctx);
212
+ const query = input.search_text.trim().toLowerCase();
213
+ const exact = [];
214
+ const byText = [];
215
+ for (const entry of codes) {
216
+ const codeMatch = entry.code.toLowerCase() === query;
217
+ const textMatch = query !== '' &&
218
+ (entry.title?.toLowerCase().includes(query) ||
219
+ entry.public_law?.toLowerCase().includes(query));
220
+ if (!codeMatch && !textMatch)
221
+ continue;
222
+ const row = {
223
+ code: entry.code,
224
+ ...(entry.title ? { name: entry.title } : {}),
225
+ ...(entry.public_law ? { public_law: entry.public_law } : {}),
226
+ ...(entry.disaster ? { disaster_group: entry.disaster } : {}),
227
+ };
228
+ (codeMatch ? exact : byText).push(row);
229
+ }
230
+ rawResults = [...exact, ...byText];
231
+ }
202
232
  else if (input.type === 'naics') {
203
233
  const resp = await svc.autocompleteNaics(input.search_text, requested, ctx);
204
234
  rawResults = (resp.results ?? []).map((r) => ({
@@ -302,6 +332,7 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
302
332
  : `More matches exist beyond limit. ${narrow}`);
303
333
  }
304
334
  else if (input.type !== 'location' &&
335
+ input.type !== 'def_code' &&
305
336
  requested === limit.applied &&
306
337
  received === limit.applied) {
307
338
  notices.push(`Returned the upstream maximum of ${LIMIT.cap} matches, so more may exist. ${narrow}`);
@@ -352,6 +383,10 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
352
383
  parts.push(`**Sub-tier code:** ${escapeMarkdownInline(r.subtier_code)}`);
353
384
  if (r.duns)
354
385
  parts.push(`**DUNS:** ${escapeMarkdownInline(r.duns)}`);
386
+ if (r.public_law)
387
+ parts.push(`**Public Law:** ${escapeMarkdownInline(r.public_law)}`);
388
+ if (r.disaster_group)
389
+ parts.push(`**Disaster Group:** ${escapeMarkdownInline(r.disaster_group)}`);
355
390
  lines.push(`- ${parts.join(' | ')}`);
356
391
  }
357
392
  lines.push(`\n**Total:** ${result.total}`);
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete-filters.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/autocomplete-filters.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,+BAA+B,GAGhC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpG,iHAAiH;AACjH,MAAM,KAAK,GAAG,UAAU,CAAC,EAAE,IAAI,EAAE,kCAAkC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;AAE9F,6GAA6G;AAC7G,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAIhD;;;;;;GAMG;AACH,SAAS,kBAAkB,CAAC,IAAqC,EAAE,SAAiB;IAClF,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,CAAC;IAC1C,MAAM,QAAQ,GAAG,I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oB,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACpE,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACvC,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"autocomplete-filters.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/autocomplete-filters.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,+BAA+B,GAGhC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpG,iHAAiH;AACjH,MAAM,KAAK,GAAG,UAAU,CAAC,EAAE,IAAI,EAAE,kCAAkC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;AAE9F,6GAA6G;AAC7G,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAIhD;;;;;;GAMG;AACH,SAAS,kBAAkB,CAAC,IAAqC,EAAE,SAAiB;IAClF,MAAM,MAAM,GAAG,IAAI,CAAC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kBAAkB,oBAAoB,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACjJ,CAAC;YACJ,IAAI,CAAC,CAAC,GAAG;gBAAE,KAAK,CAAC,IAAI,CAAC,YAAY,oBAAoB,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACjE,IAAI,CAAC,CAAC,YAAY;gBAAE,KAAK,CAAC,IAAI,CAAC,sBAAsB,oBAAoB,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;YAC7F,IAAI,CAAC,CAAC,IAAI;gBAAE,KAAK,CAAC,IAAI,CAAC,aAAa,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACpE,IAAI,CAAC,CAAC,UAAU;gBAAE,KAAK,CAAC,IAAI,CAAC,mBAAmB,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACtF,IAAI,CAAC,CAAC,cAAc;gBAClB,KAAK,CAAC,IAAI,CAAC,uBAAuB,oBAAoB,CAAC,CAAC,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YAC9E,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACvC,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -68,6 +68,8 @@ export declare const ANALYTICS_DATE_FIELDS: {
68
68
  readonly start: 'filters.time_period_start';
69
69
  readonly end: 'filters.time_period_end';
70
70
  };
71
+ /** Disclose that an endpoint queried its available coverage without dates. */
72
+ export declare const NO_DATE_FILTER_NOTICE = "Results use USAspending's available coverage without a date filter.";
71
73
  /**
72
74
  * The rejection message for a range whose start falls after its end, naming the
73
75
  * two input fields that carried them and telling the caller to swap them — or
@@ -1 +1 @@
1
- {"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/dates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,eAAe,CAAC;AAEjD;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,QAA4B,CAAC;AAI1D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,kFAanD;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,iGAElD;AAED,kFAAkF;AAClF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,GAAE,IAAiB,GAAG,MAAM,CAEvD;AAED,gFAAgF;AAChF,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,KAAK,GAAE,MAAmB,GACzB,SAAS,GAAG,SAAS,CAmBvB;AAED,qEAAqE;AACrE,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,iFAAiF;AACjF,eAAO,MAAM,qBAAqB;oBACzB,2BAA2B;kBAC7B,yBAAyB;CACD,CAAC;AAEhC;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK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