@cyanheads/usaspending-mcp-server 0.5.0 → 0.6.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 (92) hide show
  1. package/AGENTS.md +3 -3
  2. package/CLAUDE.md +3 -3
  3. package/Dockerfile +3 -3
  4. package/README.md +46 -20
  5. package/changelog/0.5.x/0.5.1.md +29 -0
  6. package/changelog/0.6.x/0.6.0.md +48 -0
  7. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.d.ts +1 -0
  8. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.d.ts.map +1 -1
  9. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.js +39 -29
  10. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.js.map +1 -1
  11. package/dist/mcp-server/tools/definitions/disaster-spending.tool.d.ts +10 -1
  12. package/dist/mcp-server/tools/definitions/disaster-spending.tool.d.ts.map +1 -1
  13. package/dist/mcp-server/tools/definitions/disaster-spending.tool.js +61 -25
  14. package/dist/mcp-server/tools/definitions/disaster-spending.tool.js.map +1 -1
  15. package/dist/mcp-server/tools/definitions/filters.d.ts +6 -0
  16. package/dist/mcp-server/tools/definitions/filters.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/filters.js +8 -1
  18. package/dist/mcp-server/tools/definitions/filters.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/fiscal-year.d.ts +15 -0
  20. package/dist/mcp-server/tools/definitions/fiscal-year.d.ts.map +1 -0
  21. package/dist/mcp-server/tools/definitions/fiscal-year.js +34 -0
  22. package/dist/mcp-server/tools/definitions/fiscal-year.js.map +1 -0
  23. package/dist/mcp-server/tools/definitions/get-agency.tool.d.ts.map +1 -1
  24. package/dist/mcp-server/tools/definitions/get-agency.tool.js +9 -7
  25. package/dist/mcp-server/tools/definitions/get-agency.tool.js.map +1 -1
  26. package/dist/mcp-server/tools/definitions/get-award-federal-accounts.tool.d.ts.map +1 -1
  27. package/dist/mcp-server/tools/definitions/get-award-federal-accounts.tool.js +14 -10
  28. package/dist/mcp-server/tools/definitions/get-award-federal-accounts.tool.js.map +1 -1
  29. package/dist/mcp-server/tools/definitions/get-award-subawards.tool.d.ts +0 -6
  30. package/dist/mcp-server/tools/definitions/get-award-subawards.tool.d.ts.map +1 -1
  31. package/dist/mcp-server/tools/definitions/get-award-subawards.tool.js +11 -40
  32. package/dist/mcp-server/tools/definitions/get-award-subawards.tool.js.map +1 -1
  33. package/dist/mcp-server/tools/definitions/get-award-transactions.tool.d.ts +4 -3
  34. package/dist/mcp-server/tools/definitions/get-award-transactions.tool.d.ts.map +1 -1
  35. package/dist/mcp-server/tools/definitions/get-award-transactions.tool.js +57 -30
  36. package/dist/mcp-server/tools/definitions/get-award-transactions.tool.js.map +1 -1
  37. package/dist/mcp-server/tools/definitions/get-award.tool.d.ts +12 -0
  38. package/dist/mcp-server/tools/definitions/get-award.tool.d.ts.map +1 -1
  39. package/dist/mcp-server/tools/definitions/get-award.tool.js +101 -29
  40. package/dist/mcp-server/tools/definitions/get-award.tool.js.map +1 -1
  41. package/dist/mcp-server/tools/definitions/get-federal-account-breakdown.tool.d.ts +7 -0
  42. package/dist/mcp-server/tools/definitions/get-federal-account-breakdown.tool.d.ts.map +1 -1
  43. package/dist/mcp-server/tools/definitions/get-federal-account-breakdown.tool.js +43 -11
  44. package/dist/mcp-server/tools/definitions/get-federal-account-breakdown.tool.js.map +1 -1
  45. package/dist/mcp-server/tools/definitions/get-federal-account.tool.d.ts +4 -1
  46. package/dist/mcp-server/tools/definitions/get-federal-account.tool.d.ts.map +1 -1
  47. package/dist/mcp-server/tools/definitions/get-federal-account.tool.js +31 -10
  48. package/dist/mcp-server/tools/definitions/get-federal-account.tool.js.map +1 -1
  49. package/dist/mcp-server/tools/definitions/get-idv-awards.tool.d.ts.map +1 -1
  50. package/dist/mcp-server/tools/definitions/get-idv-awards.tool.js +14 -10
  51. package/dist/mcp-server/tools/definitions/get-idv-awards.tool.js.map +1 -1
  52. package/dist/mcp-server/tools/definitions/get-recipient.tool.d.ts.map +1 -1
  53. package/dist/mcp-server/tools/definitions/get-recipient.tool.js +12 -11
  54. package/dist/mcp-server/tools/definitions/get-recipient.tool.js.map +1 -1
  55. package/dist/mcp-server/tools/definitions/index.d.ts +52 -11
  56. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  57. package/dist/mcp-server/tools/definitions/list-agencies.tool.d.ts +6 -0
  58. package/dist/mcp-server/tools/definitions/list-agencies.tool.d.ts.map +1 -1
  59. package/dist/mcp-server/tools/definitions/list-agencies.tool.js +54 -11
  60. package/dist/mcp-server/tools/definitions/list-agencies.tool.js.map +1 -1
  61. package/dist/mcp-server/tools/definitions/pagination.d.ts +2 -0
  62. package/dist/mcp-server/tools/definitions/pagination.d.ts.map +1 -1
  63. package/dist/mcp-server/tools/definitions/pagination.js +9 -0
  64. package/dist/mcp-server/tools/definitions/pagination.js.map +1 -1
  65. package/dist/mcp-server/tools/definitions/search-awards.tool.d.ts +6 -0
  66. package/dist/mcp-server/tools/definitions/search-awards.tool.d.ts.map +1 -1
  67. package/dist/mcp-server/tools/definitions/search-awards.tool.js +35 -26
  68. package/dist/mcp-server/tools/definitions/search-awards.tool.js.map +1 -1
  69. package/dist/mcp-server/tools/definitions/search-federal-accounts.tool.d.ts +2 -0
  70. package/dist/mcp-server/tools/definitions/search-federal-accounts.tool.d.ts.map +1 -1
  71. package/dist/mcp-server/tools/definitions/search-federal-accounts.tool.js +25 -7
  72. package/dist/mcp-server/tools/definitions/search-federal-accounts.tool.js.map +1 -1
  73. package/dist/mcp-server/tools/definitions/search-recipients.tool.d.ts.map +1 -1
  74. package/dist/mcp-server/tools/definitions/search-recipients.tool.js +21 -12
  75. package/dist/mcp-server/tools/definitions/search-recipients.tool.js.map +1 -1
  76. package/dist/mcp-server/tools/definitions/spending-by-category.tool.d.ts.map +1 -1
  77. package/dist/mcp-server/tools/definitions/spending-by-category.tool.js +10 -4
  78. package/dist/mcp-server/tools/definitions/spending-by-category.tool.js.map +1 -1
  79. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.d.ts.map +1 -1
  80. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.js +7 -3
  81. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.js.map +1 -1
  82. package/dist/mcp-server/tools/definitions/spending-over-time.tool.d.ts.map +1 -1
  83. package/dist/mcp-server/tools/definitions/spending-over-time.tool.js +8 -4
  84. package/dist/mcp-server/tools/definitions/spending-over-time.tool.js.map +1 -1
  85. package/dist/services/usaspending/types.d.ts +16 -20
  86. package/dist/services/usaspending/types.d.ts.map +1 -1
  87. package/dist/services/usaspending/usaspending-service.d.ts +20 -4
  88. package/dist/services/usaspending/usaspending-service.d.ts.map +1 -1
  89. package/dist/services/usaspending/usaspending-service.js +10 -6
  90. package/dist/services/usaspending/usaspending-service.js.map +1 -1
  91. package/package.json +10 -8
  92. package/server.json +3 -3
package/AGENTS.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** usaspending-mcp-server
4
- **Version:** 0.5.0
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
4
+ **Version:** 0.6.0
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.16`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
8
- **Zod:** ^4.6.5
8
+ **Zod:** ^4.6.7
9
9
 
10
10
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
11
11
 
package/CLAUDE.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** usaspending-mcp-server
4
- **Version:** 0.5.0
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
4
+ **Version:** 0.6.0
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.16`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
8
- **Zod:** ^4.6.5
8
+ **Zod:** ^4.6.7
9
9
 
10
10
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
11
11
 
package/Dockerfile CHANGED
@@ -14,7 +14,7 @@
14
14
  # output. A stage that compiles a native addon needs the target-arch toolchain
15
15
  # and cannot cross-compile this way — drop the flag there.
16
16
  # ==============================================================================
17
- FROM --platform=$BUILDPLATFORM oven/bun:1.4.3 AS build
17
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.4 AS build
18
18
 
19
19
  WORKDIR /usr/src/app
20
20
 
@@ -46,7 +46,7 @@ RUN bun run build
46
46
  # A clean image rather than `FROM build`: the build stage's node_modules holds
47
47
  # devDependencies.
48
48
  # ==============================================================================
49
- FROM --platform=$BUILDPLATFORM oven/bun:1.4.3 AS deps
49
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.4 AS deps
50
50
 
51
51
  WORKDIR /usr/src/app
52
52
 
@@ -114,7 +114,7 @@ RUN rm -rf node_modules/@socketsecurity/bun-security-scanner
114
114
  # dependencies and build artifacts. Its only Bun invocations are HEALTHCHECK
115
115
  # and CMD, which run on the real target at container start.
116
116
  # ==============================================================================
117
- FROM oven/bun:1.4.3-slim AS production
117
+ FROM oven/bun:1.4.4-slim AS production
118
118
 
119
119
  WORKDIR /usr/src/app
120
120
 
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.5.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/usaspending-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.3.1-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/usaspending-mcp-server?style=flat-square&logo=npm&logoColor=white)](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.3-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.6.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/usaspending-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.3.1-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/usaspending-mcp-server?style=flat-square&logo=npm&logoColor=white)](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
 
@@ -29,13 +29,13 @@
29
29
 
30
30
  ## Overview
31
31
 
32
- Federal award, recipient, agency, and spending data from USAspending.gov, the US Treasury's DATA Act transparency platform. Search and trace awards down to transactions, subawards, and funding accounts; profile recipients and agencies; and aggregate spending by geography, category, time, and disaster appropriation. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
32
+ Where federal money goes, from USAspending.gov: awards, recipients, agencies, and spending. Search and trace awards down to transactions, subawards, and funding accounts; profile recipients and agencies; and aggregate spending by geography, category, time, and disaster appropriation.
33
33
 
34
34
  ### Tools
35
35
 
36
36
  | Tool | Description |
37
37
  |:---|:---|
38
- | `usaspending_list_agencies` | List every top-tier federal agency with its toptier code, slug, and current-year budget totals |
38
+ | `usaspending_list_agencies` | List top-tier federal agencies with codes, slugs, and budget totals labelled by reporting year and quarter |
39
39
  | `usaspending_autocomplete_filters` | Look up NAICS, PSC, CFDA, agency, or recipient 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, parent IDV, DEF-code funding |
@@ -58,8 +58,8 @@ Federal award, recipient, agency, and spending data from USAspending.gov, the US
58
58
 
59
59
  ### `usaspending_list_agencies` <sub>tool</sub>
60
60
 
61
- - Takes only `sort` (`agency_name`, `budget_authority_amount`, `obligated_amount`, `outlay_amount`) and `order`; returns every agency in one unpaginated response
62
- - Rows carry `toptier_code` and `agency_slug`, both accepted by `usaspending_get_agency`, plus current-year `budget_authority_amount`, `obligated_amount`, and `outlay_amount`
61
+ - Takes `sort` (`agency_name`, `budget_authority_amount`, `obligated_amount`, `outlay_amount`) and `order`; returns every agency unless an optional positive `limit` is supplied. With `limit`, `page` defaults to 1; without it, `page` is ignored. `total` always counts the full directory and `has_next` appears only when paginating
62
+ - Rows carry `toptier_code` and `agency_slug`, both accepted by `usaspending_get_agency`, plus `budget_authority_amount`, `obligated_amount`, and `outlay_amount` for the latest reported period. `fiscal_year` and `fiscal_quarter` preserve the provider's reporting labels when present
63
63
 
64
64
  ---
65
65
 
@@ -67,7 +67,7 @@ Federal award, recipient, agency, and spending data from USAspending.gov, the US
67
67
 
68
68
  - `type` (`naics`, `psc`, `cfda`, `awarding_agency`, `recipient`) plus `search_text`; `limit` 1–500, default 10
69
69
  - 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
70
- - Agency rows carry the matched agency's own `name`, `abbreviation`, and `tier` (`toptier` or `subtier`), plus its parent's `toptier_name` and `toptier_code`. The `agency_name` filters are top-tier only and take `toptier_name`, so a sub-agency such as the U.S. Geological Survey filters at its whole department
70
+ - 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
71
71
  - `naics` matches official NAICS title text: "software" resolves, "cybersecurity" does not, so search with the industry term a title would use
72
72
 
73
73
  ---
@@ -83,9 +83,9 @@ Federal award, recipient, agency, and spending data from USAspending.gov, the US
83
83
  ### `usaspending_get_award` <sub>tool</sub>
84
84
 
85
85
  - `award_id` is a `generated_unique_award_id`, the `generated_internal_id` from search; an unknown ID fails as `award_not_found`
86
- - Returns `category`, `total_obligation`, `total_outlays`, `subaward_count`, NAICS / PSC codes, `account_obligations_by_defc`, and, on loans, `total_loan_value` and `total_subsidy_cost`
86
+ - Returns `category`, `total_obligation`, `total_outlays`, `total_account_obligation`, `total_account_outlay`, `base_exercised_options`, `subaward_count`, NAICS / PSC codes, `account_obligations_by_defc`, `account_outlays_by_defc`, and, on loans, `total_loan_value` and `total_subsidy_cost`, where supplied
87
87
  - `assistance_listings` lists every Assistance Listing on an assistance award, in upstream order, as `number`, `title`, and `obligation`; a `number` goes in `usaspending_search_awards` `assistance_listings`
88
- - `recipient` carries `uei`, `parent_uei`, `business_categories` (category names, not the `business_types` codes of `usaspending_get_recipient`), and a three-letter `country_code` on its `location`, as does `place_of_performance`; a location with no fields upstream is omitted
88
+ - `recipient` carries `uei`, `parent_uei`, `business_categories` (category names, not the `business_types` codes of `usaspending_get_recipient`), and a three-letter `country_code`, `county_name`, `congressional_code`, and `zip5` on its `location`. `place_of_performance` also carries a country code, county name, and congressional code; a location with no fields upstream is omitted
89
89
  - `recipient.recipient_id` and `recipient.parent_recipient_id` chain to `usaspending_get_recipient` and `parent_award.generated_unique_award_id` to the parent IDV; `category: "idv"` awards list their children via `usaspending_get_idv_awards`
90
90
 
91
91
  ---
@@ -93,14 +93,14 @@ Federal award, recipient, agency, and spending data from USAspending.gov, the US
93
93
  ### `usaspending_get_award_transactions` <sub>tool</sub>
94
94
 
95
95
  - `award_id` plus `sort` (`action_date`, `federal_action_obligation`, `modification_number`); `limit` up to 100
96
- - Rows carry `action_date`, `modification_number`, `action_type`, and a signed `federal_action_obligation` (negative is a deobligation)
96
+ - Rows carry a string `id` (`ASST_TX` or `CONT_TX`), `action_date`, `modification_number`, `action_type`, and a signed `federal_action_obligation` (negative is a deobligation). Loan transactions also carry `face_value_loan_guarantee` and `original_loan_subsidy_cost`; assistance transactions carry `cfda_number` when supplied
97
97
 
98
98
  ---
99
99
 
100
100
  ### `usaspending_get_award_subawards` <sub>tool</sub>
101
101
 
102
102
  - `award_id` plus `sort` (`subaward_number`, `description`, `action_date`, `amount`, `recipient_name`); `limit` up to 100
103
- - Rows carry `subaward_number`, `amount`, `action_date`, `recipient_name`, `recipient_uei`, and place of performance; `subaward_count` on `usaspending_get_award` says whether any exist
103
+ - Rows carry `id`, `subaward_number`, `description`, `amount`, `action_date`, and `recipient_name`; the upstream listing supplies no recipient UEI or location. `subaward_count` on `usaspending_get_award` says whether any exist
104
104
 
105
105
  ---
106
106
 
@@ -120,7 +120,7 @@ Federal award, recipient, agency, and spending data from USAspending.gov, the US
120
120
 
121
121
  ### `usaspending_search_recipients` <sub>tool</sub>
122
122
 
123
- - `keyword` matches names, UEI, or DUNS, partial matches included; optional `award_type` scopes the totals; `limit` up to 100
123
+ - `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` up to 100
124
124
  - 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
125
125
 
126
126
  ---
@@ -166,23 +166,24 @@ Federal award, recipient, agency, and spending data from USAspending.gov, the US
166
166
 
167
167
  ### `usaspending_disaster_spending` <sub>tool</sub>
168
168
 
169
- - `dimension` is `overview`, `agency`, `cfda`, `recipient`, or `geography`; every dimension except `overview` requires `filters.def_codes` (e.g. `["L", "M", "N", "O", "P"]` for COVID-19); `limit` up to 100 on every dimension but `overview`; `spending_type` (`award`, the default, or `total`) applies to agency only, and geography takes `filters.geo_layer` (`state`, `county`)
170
- - Rows carry `obligation`, `outlay`, and `award_count`, plus `total_budgetary_resources` on agency rows under `spending_type: total`; `overview` returns totals and `funding_by_def_code`. A recipient row's `id` chains to `usaspending_get_recipient`. The recipient total tops out at 10,000, and a response at that cap is flagged `truncated`. Geography areas are ranked by `aggregated_amount` and paged with `limit` and `page`, with the full area count as `total`; a page with areas below it is flagged `truncated`, and `truncationCeiling` is the lowest amount shown. Spending with no recorded place of performance ranks as one unattributed area
171
- - Agency, cfda, and recipient also return `totals` across every matching row: `obligation`, `outlay`, and either `total_budgetary_resources` (agency, `total`) or `award_count`. When `overview` outlasts the request budget, the agency breakdown with `spending_type: total` still reports obligations, outlays, and budgetary resources
169
+ - `dimension` is `overview`, `agency`, `cfda`, `recipient`, or `geography`; `filters.def_codes` is optional for `overview` and required for every other dimension (`missing_def_codes` when absent/empty). Codes such as `["L", "M", "N", "O", "P"]` isolate COVID-19 funding and are echoed as `applied_def_codes`. `limit` is up to 100 on every dimension but `overview`; `spending_type` (`award`, the default, or `total`) applies to agency only, and geography takes `filters.geo_layer` (`state`, `county`)
170
+ - Rows carry `obligation`, `outlay`, and `award_count`, plus `total_budgetary_resources` on agency rows under `spending_type: total`; `overview` returns totals and `funding_by_def_code`. A recipient row's `id` chains to `usaspending_get_recipient`. Recipient `filters.query` narrows by search text; it is trimmed and echoed as `applied_query`, with blanks applying no query. A recipient total of 10,000 is a reachable ceiling and a lower bound on possible matches, flagged `truncated`; narrow with `filters.query` to reach the tail. Geography areas are ranked by `aggregated_amount` and paged with `limit` and `page`, with the full area count as `total`; a page with areas below it is flagged `truncated`, and `truncationCeiling` is the lowest amount shown. Spending with no recorded place of performance ranks as one unattributed area
171
+ - Agency, cfda, and recipient also return `totals` across every matching row: `obligation`, `outlay`, and either `total_budgetary_resources` (agency, `total`) or `award_count`. Overview can still time out with codes supplied: narrow `filters.def_codes`, retry later, or use the agency breakdown with `spending_type: total` for obligations, outlays, and budgetary resources
172
+ - Notices preserve upstream messages, ignored filters, cap guidance, and empty-page recovery on both output surfaces. `query` is ignored outside recipient, `geo_layer` outside geography, and `award_type_codes` on overview. An empty page whose offset reaches a positive total directs callers to an earlier page with the same filters; an empty interior page reports the total without claiming exhaustion, and an absent total stays unknown
172
173
 
173
174
  ---
174
175
 
175
176
  ### `usaspending_search_federal_accounts` <sub>tool</sub>
176
177
 
177
178
  - Optional `keyword` and 3-digit `agency_identifier`; `sort_field` is `account_name`, `account_number`, `budgetary_resources` (default), or `managing_agency`; `limit` up to 100
178
- - Rows carry `account_number` (e.g. `097-8097`) for the federal-account tools, `managing_agency`, and `budgetary_resources`; `page_metadata.count` is the total
179
+ - Rows carry `account_number` (e.g. `097-8097`) for the federal-account tools, `managing_agency`, and `budgetary_resources`; `page_metadata.count` is the total. Optional `fiscal_year` selects the reporting year; otherwise the provider uses its latest submission year. The returned `fiscal_year` identifies that period
179
180
 
180
181
  ---
181
182
 
182
183
  ### `usaspending_get_federal_account` <sub>tool</sub>
183
184
 
184
185
  - `account_code` in AGENCY-MAIN format, from `account_number` in search results or `federal_account` on an award; an unknown code fails as `account_not_found`
185
- - Returns `total_obligated_amount`, `total_gross_outlay_amount`, and `total_budgetary_resources` for `fiscal_year`, plus `children`: one entry per Treasury Account Symbol with its own amounts
186
+ - Optional `fiscal_year` selects the reporting year; otherwise the provider uses the current federal fiscal year. Returns `total_obligated_amount`, `total_gross_outlay_amount`, and `total_budgetary_resources` for the returned `fiscal_year`, plus `children`: one entry per Treasury Account Symbol with its own amounts. A year without financial data retains account metadata and a notice, without substituting another year
186
187
 
187
188
  ---
188
189
 
@@ -190,6 +191,9 @@ Federal award, recipient, agency, and spending data from USAspending.gov, the US
190
191
 
191
192
  - `account_code` plus `dimension` (`program_activity` or `object_class`); `limit` up to 100, with `page_metadata.total` as the row count
192
193
  - Rows carry `code`, `name`, and `obligations`; `program_activity` rows add `type`, either `PAC/PAN` or `PARK`
194
+ - Optional `fiscal_year` scopes financial reporting periods to October 1 through September 30, echoed in `time_period` and `period`. Omission covers `all available periods`
195
+
196
+ All three federal-account tools accept an integer `fiscal_year` from 2001 through the current federal fiscal year (which rolls over October 1); blank form values mean omitted. Search and detail budget totals use different upstream calculations and need not match even for the same year.
193
197
 
194
198
  ## Features
195
199
 
@@ -206,26 +210,48 @@ Agent-friendly output:
206
210
 
207
211
  - Chaining IDs as explicit fields: `generated_internal_id`, `agency_slug`, `recipient.recipient_id`, `federal_account`, and `account_number`, so agents follow the money without parsing display strings
208
212
  - Honest pagination: `page_metadata.has_next` on every list, a `total` or `count` where the upstream publishes one, and `truncated` / `shown` / `cap` only when rows are known to exist beyond those returned. A full page with no such evidence keeps `has_next` without claiming truncation
209
- - Empty results are notices, not errors: an empty page carries a `notice` echoing the filters and how to broaden them. The ID-keyed list tools (transactions, subawards, funding accounts, IDV children, account breakdown) return an empty list for an unknown ID rather than failing
210
- - Typed failures with recovery hints: `award_not_found`, `recipient_not_found`, `agency_not_found`, `account_not_found`, `no_match`, `conflicting_input`, `date_before_earliest`, `date_range_inverted`, `unsupported_sort`, `assistance_listings_type_mismatch`, `psc_codes_type_mismatch`, `invalid_location`, `pagination_limit_exceeded`
213
+ - Empty results are notices, not errors: account funding, account breakdown, and recipient search distinguish a known zero total from an empty page past the total, which directs callers to an earlier page with the same filters. Without a total, notices describe only the page; award search never supplies a total. The ID-keyed list tools (transactions, subawards, funding accounts, IDV children, account breakdown) return an empty list for an unknown ID rather than failing
214
+ - Typed failures with recovery hints: `award_not_found`, `recipient_not_found`, `agency_not_found`, `account_not_found`, `no_match`, `conflicting_input`, `date_before_earliest`, `date_range_inverted`, `unsupported_sort`, `assistance_listings_type_mismatch`, `psc_codes_type_mismatch`, `invalid_location`, `pagination_limit_exceeded`, `incomplete_cursor`, `missing_def_codes`
211
215
 
212
216
  ## Getting started
213
217
 
214
218
  ### Public Hosted Instance
215
219
 
216
- A public instance is available at `https://usaspending.caseyjhand.com/mcp` — no installation required. Point any MCP client at it via Streamable HTTP:
220
+ A public instance is available at `https://usaspending.caseyjhand.com/mcp` — no installation required. It serves Streamable HTTP; each client takes its own config shape.
221
+
222
+ For Claude Code:
223
+
224
+ ```sh
225
+ claude mcp add --transport http usaspending-mcp-server https://usaspending.caseyjhand.com/mcp
226
+ ```
227
+
228
+ For Cline (`cline_mcp_settings.json`):
229
+
230
+ ```json
231
+ {
232
+ "mcpServers": {
233
+ "usaspending-mcp-server": {
234
+ "type": "streamableHttp",
235
+ "url": "https://usaspending.caseyjhand.com/mcp"
236
+ }
237
+ }
238
+ }
239
+ ```
240
+
241
+ For Cursor (`mcp.json`):
217
242
 
218
243
  ```json
219
244
  {
220
245
  "mcpServers": {
221
246
  "usaspending-mcp-server": {
222
- "type": "streamable-http",
223
247
  "url": "https://usaspending.caseyjhand.com/mcp"
224
248
  }
225
249
  }
226
250
  }
227
251
  ```
228
252
 
253
+ Claude Desktop adds remote servers under Settings → Connectors.
254
+
229
255
  ### Self-Hosted / Local
230
256
 
231
257
  Add the following to your MCP client configuration file. No API key is required.
@@ -0,0 +1,29 @@
1
+ ---
2
+ summary: "Correct search results and disaster spending recovery"
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.5.1 — 2026-10-24
8
+
9
+ ## Changed
10
+
11
+ - **Disaster recipient narrowing** accepts trimmed `filters.query`, echoes the applied query, preserves upstream messages, and describes the 10,000 reachable ceiling as a lower bound on possible matches. ([#100](https://github.com/cyanheads/usaspending-mcp-server/issues/100))
12
+
13
+ ## Fixed
14
+
15
+ - **Disaster overview filters** forward optional DEF codes and echo applied codes; unsupported filters produce notices, and timeout recovery includes filtered requests plus retry and agency-breakdown alternatives. ([#91](https://github.com/cyanheads/usaspending-mcp-server/issues/91))
16
+ - **Empty-page recovery** distinguishes zero totals, exhausted pages, empty interior pages, and unknown totals across award/account, recipient, and disaster tools, with notices on both output surfaces. ([#93](https://github.com/cyanheads/usaspending-mcp-server/issues/93))
17
+ - **Recipient keywords** are trimmed; blank text omits the keyword filter and discloses the unrestricted keyword search while retaining award-type filters and pagination notices. ([#94](https://github.com/cyanheads/usaspending-mcp-server/issues/94))
18
+ - **Validation recovery** declares non-retryable `incomplete_cursor` and `missing_def_codes` reasons with structured recovery hints and matching text. ([#95](https://github.com/cyanheads/usaspending-mcp-server/issues/95))
19
+ - **Award performance cities** use `Primary Place of Performance.city_name` instead of a city code, preserving sparse locations. ([#101](https://github.com/cyanheads/usaspending-mcp-server/issues/101))
20
+
21
+ ## Dependencies
22
+
23
+ - `zod` ^4.6.5 → ^4.6.7.
24
+ - `@biomejs/biome` ^2.5.15 → ^2.6.2.
25
+ - `ignore` ^7.0.12 → ^7.0.13.
26
+ - `tsc-alias` ^1.9.7 → ^1.9.8.
27
+ - `vitest` ^5.0.3 → ^5.0.5.
28
+ - Transitive `vite` 8.3.2 → 8.3.3.
29
+ - **Bun toolchain and Docker images** 1.4.3 → 1.4.4.
@@ -0,0 +1,48 @@
1
+ ---
2
+ summary: "Federal spending drilldowns preserve provider identities and reporting periods."
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.6.0 — 2026-10-24
8
+
9
+ ## Added
10
+
11
+ - **Federal-account tools** accept optional `fiscal_year` across search, detail, and breakdowns, return reporting periods, and retain empty selected years with a notice (#97).
12
+ - **`usaspending_get_award`** exposes district, county, recipient ZIP, federal-account totals, DEF-code outlays, and exercised-options values when supplied (#87).
13
+ - **`usaspending_get_award_transactions`** returns populated loan face values, original subsidy costs, and assistance `cfda_number` values (#90).
14
+ - **`usaspending_list_agencies`** supports optional pagination with the full directory total and `has_next`, preserving the full-list default (#98).
15
+
16
+ ## Changed
17
+
18
+ - **`usaspending_get_award_transactions`** returns string transaction IDs and removes unsupported `recipient_name` and `awarding_agency_name` output fields (#90).
19
+ - **`usaspending_autocomplete_filters`** uses the replacement agency endpoint, preserves agency tiers and parent identities, and exposes optional `subtier_code` (#85).
20
+
21
+ ## Removed
22
+
23
+ - **`usaspending_get_award_subawards`** removes unsupported `recipient_uei` and `place_of_performance` output fields (#96).
24
+
25
+ ## Fixed
26
+
27
+ - **`agency_name`** matches top-tier and sub-tier names across award search and spending analytics; shared sub-tier names match under every parent (#84).
28
+ - **`usaspending_list_agencies`** returns provider fiscal-year and quarter labels and describes amounts as the latest reported period (#92).
29
+ - **Markdown output** preserves upstream strings through client parsing, including punctuation in names, descriptions, notices, and table values.
30
+ - **Development guidance and audit classification** follow the adopted framework; hosted-client examples use each client's configuration shape.
31
+
32
+ ## Dependencies
33
+
34
+ - **`@cyanheads/mcp-ts-core`** ^0.13.15 → ^0.13.16.
35
+ - **Test dependencies:** add `markdown-it` ^15.0.3 and `@types/markdown-it` ^14.2.0 for client-rendering assertions.
36
+ - **`@babel/traverse`** 7.29.8 → 7.29.10.
37
+ - **`@hono/node-server`** 2.1.4 → 2.1.5.
38
+ - **`@oxc-project/types`** 0.152.0 → 0.155.0.
39
+ - **`rolldown` and `@rolldown/binding-*`** 1.2.12 → 1.2.15.
40
+ - **`@vue/compiler-*` and `@vue/shared`** 3.5.43 → 3.5.44.
41
+ - **`fast-copy`** 4.1.1 → 4.2.0.
42
+ - **`jose`** 6.2.12 → 6.2.13.
43
+ - **`nanoid`** 3.3.19 → 3.3.20.
44
+ - **`postcss`** 8.5.28 → 8.5.31.
45
+ - **`process-warning`** 5.1.0 → 5.1.1.
46
+ - **`resolve`** 1.22.12 → 1.22.13.
47
+ - **`secure-json-parse`** 4.1.0 → 4.1.1.
48
+ - **`vite`** 8.3.3 → 8.3.5.
@@ -28,6 +28,7 @@ export declare const autocompleteFiltersTool: import("@cyanheads/mcp-ts-core").T
28
28
  }>>;
29
29
  toptier_name: z.ZodOptional<z.ZodString>;
30
30
  toptier_code: z.ZodOptional<z.ZodString>;
31
+ subtier_code: z.ZodOptional<z.ZodString>;
31
32
  uei: z.ZodOptional<z.ZodString>;
32
33
  duns: z.ZodOptional<z.ZodString>;
33
34
  }, z.core.$strip>>;
@@ -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;AAOjE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmSlC,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;AAQjE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgTlC,CAAC"}
@@ -5,12 +5,13 @@
5
5
  */
6
6
  import { tool, z } from '@cyanheads/mcp-ts-core';
7
7
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
8
+ import { escapeMarkdownInline } from '@cyanheads/mcp-ts-core/utils';
8
9
  import { getUSASpendingService } from '../../../services/usaspending/usaspending-service.js';
9
10
  /** Largest `limit` every autocomplete route accepts; 501 is rejected with HTTP 400. */
10
11
  const UPSTREAM_LIMIT_MAX = 500;
11
12
  export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters', {
12
13
  title: 'Autocomplete Codes and Names',
13
- 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 — the agency_name filters take the top-tier name), or recipient (recipient names with UEI/DUNS). 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.',
14
+ 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), or recipient (recipient names with UEI/DUNS). 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.',
14
15
  annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
15
16
  input: z.object({
16
17
  type: z
@@ -26,7 +27,7 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
26
27
  .min(1)
27
28
  .max(UPSTREAM_LIMIT_MAX)
28
29
  .default(10)
29
- .describe('Maximum number of results to return (1–500), enforced client-side. 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. naics/psc/cfda/awarding_agency honor this limit exactly.'),
30
+ .describe('Maximum number of results to return (1–500), enforced client-side. Agency matches combine independently capped top-tier then sub-tier buckets, preserving their order without deduplicating names; offices are excluded. 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.'),
30
31
  }),
31
32
  output: z.object({
32
33
  type: z.string().describe('Lookup table searched'),
@@ -53,11 +54,15 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
53
54
  toptier_name: z
54
55
  .string()
55
56
  .optional()
56
- .describe('awarding_agency only: the top-tier agency name — the value the agency_name filters on usaspending_search_awards, usaspending_spending_by_category, usaspending_spending_by_geography, and usaspending_spending_over_time take. Those filters are top-tier only, so a sub-agency filters at its parent and the results cover the whole department.'),
57
+ .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.'),
57
58
  toptier_code: z
58
59
  .string()
59
60
  .optional()
60
61
  .describe('awarding_agency only: the 3-digit top-tier agency code, accepted by usaspending_get_agency'),
62
+ subtier_code: z
63
+ .string()
64
+ .optional()
65
+ .describe('awarding_agency only: the matched sub-tier agency code, when supplied'),
61
66
  uei: z
62
67
  .string()
63
68
  .optional()
@@ -89,6 +94,9 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
89
94
  .optional()
90
95
  .describe('How to reach the matches left out when truncated, or — when limit is 500 and all 500 slots filled — that the upstream maximum was reached and more matches may exist. Absent otherwise.'),
91
96
  },
97
+ enrichmentTrailer: {
98
+ notice: { render: (notice) => (notice ? `> ${escapeMarkdownInline(notice)}` : '') },
99
+ },
92
100
  errors: [
93
101
  {
94
102
  reason: 'no_match',
@@ -153,24 +161,21 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
153
161
  }
154
162
  else if (input.type === 'awarding_agency') {
155
163
  const resp = await svc.autocompleteAwardingAgency(input.search_text, requested, ctx);
156
- rawResults = (resp.results ?? []).map((r) => {
157
- /**
158
- * A top-tier row repeats the department under subtier_agency; a sub-agency row
159
- * names itself there, with its parent under toptier_agency.
160
- */
161
- const own = r.toptier_flag ? r.toptier_agency : r.subtier_agency;
164
+ const mapAgency = (r, tier) => {
165
+ const parent = tier === 'toptier' ? r : r.toptier_agency;
162
166
  return {
163
- ...(own?.name ? { name: own.name } : {}),
164
- ...(own?.abbreviation ? { abbreviation: own.abbreviation } : {}),
165
- ...(typeof r.toptier_flag === 'boolean'
166
- ? { tier: r.toptier_flag ? 'toptier' : 'subtier' }
167
- : {}),
168
- ...(r.toptier_agency?.name ? { toptier_name: r.toptier_agency.name } : {}),
169
- ...(r.toptier_agency?.toptier_code
170
- ? { toptier_code: r.toptier_agency.toptier_code }
171
- : {}),
167
+ ...(r.name ? { name: r.name } : {}),
168
+ ...(r.abbreviation ? { abbreviation: r.abbreviation } : {}),
169
+ tier,
170
+ ...(parent?.name ? { toptier_name: parent.name } : {}),
171
+ ...(parent?.code ? { toptier_code: parent.code } : {}),
172
+ ...(tier === 'subtier' && r.code ? { subtier_code: r.code } : {}),
172
173
  };
173
- });
174
+ };
175
+ rawResults = [
176
+ ...(resp.results?.toptier_agency ?? []).map((r) => mapAgency(r, 'toptier')),
177
+ ...(resp.results?.subtier_agency ?? []).map((r) => mapAgency(r, 'subtier')),
178
+ ];
174
179
  }
175
180
  else {
176
181
  // recipient
@@ -183,9 +188,9 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
183
188
  }
184
189
  /**
185
190
  * `autocomplete/recipient/` applies `limit` per match bucket (name, UEI, DUNS) and
186
- * unions them, so it can hand back up to 3x what was asked for; the other four
187
- * lookups return at most `requested`. Truncation is judged on everything received —
188
- * for recipients, the bucket union — before the slice to `limit`.
191
+ * unions them. Agency autocomplete caps each tier independently; omit offices and
192
+ * union top-tier then sub-tier rows. Judge truncation on the relevant bucket union
193
+ * before the combined caller slice to `limit`.
189
194
  */
190
195
  const received = rawResults.length;
191
196
  rawResults = rawResults.slice(0, input.limit);
@@ -231,21 +236,26 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
231
236
  };
232
237
  },
233
238
  format: (result) => {
234
- const lines = [`## Autocomplete: ${result.type} — "${result.search_text}"`, ''];
239
+ const lines = [
240
+ `## Autocomplete: ${escapeMarkdownInline(result.type)} — "${escapeMarkdownInline(result.search_text)}"`,
241
+ '',
242
+ ];
235
243
  for (const r of result.results) {
236
244
  const parts = [];
237
245
  if (r.code)
238
- parts.push(`**Code:** ${r.code}`);
246
+ parts.push(`**Code:** ${escapeMarkdownInline(r.code)}`);
239
247
  if (r.name)
240
- parts.push(`**Name:** ${r.name}${r.abbreviation ? ` (${r.abbreviation})` : ''}`);
248
+ parts.push(`**Name:** ${escapeMarkdownInline(r.name)}${r.abbreviation ? ` (${escapeMarkdownInline(r.abbreviation)})` : ''}`);
241
249
  if (r.tier)
242
- parts.push(`**Tier:** ${r.tier}`);
250
+ parts.push(`**Tier:** ${escapeMarkdownInline(r.tier)}`);
243
251
  if (r.toptier_name)
244
- parts.push(`**Top-tier agency:** ${r.toptier_name}${r.toptier_code ? ` (toptier_code ${r.toptier_code})` : ''}`);
252
+ parts.push(`**Top-tier agency:** ${escapeMarkdownInline(r.toptier_name)}${r.toptier_code ? ` (toptier_code ${escapeMarkdownInline(r.toptier_code)})` : ''}`);
245
253
  if (r.uei)
246
- parts.push(`**UEI:** ${r.uei}`);
254
+ parts.push(`**UEI:** ${escapeMarkdownInline(r.uei)}`);
255
+ if (r.subtier_code)
256
+ parts.push(`**Sub-tier code:** ${escapeMarkdownInline(r.subtier_code)}`);
247
257
  if (r.duns)
248
- parts.push(`**DUNS:** ${r.duns}`);
258
+ parts.push(`**DUNS:** ${escapeMarkdownInline(r.duns)}`);
249
259
  lines.push(`- ${parts.join(' | ')}`);
250
260
  }
251
261
  lines.push(`\n**Total:** ${result.total}`);
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete-filters.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/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C,GAAG,EAAE,CAAC,CAAC;YAC3C,IAAI,CAAC,CAAC,IAAI;gBAAE,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAC9C,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;AAEpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,uFAAuF;AACvF,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,kCAAkC,EAAE;IAC9E,KAAK,EAAE,8BAA8B;IACrC,WAAW,EACT,4nBAA4nB;IAC9nB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE;IAE9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC;aACJ,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,CAAC,CAAC;a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AAC,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,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"}
@@ -20,6 +20,7 @@ export declare const disasterSpendingTool: import("@cyanheads/mcp-ts-core").Tool
20
20
  filters: z.ZodOptional<z.ZodObject<{
21
21
  def_codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
22
  award_type_codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
+ query: z.ZodOptional<z.ZodString>;
23
24
  geo_layer: z.ZodOptional<z.ZodEnum<{
24
25
  county: "county";
25
26
  state: "state";
@@ -73,6 +74,12 @@ export declare const disasterSpendingTool: import("@cyanheads/mcp-ts-core").Tool
73
74
  limit: z.ZodNumber;
74
75
  }, z.core.$strip>>;
75
76
  }, z.core.$strip>, readonly [{
77
+ readonly reason: "missing_def_codes";
78
+ readonly code: JsonRpcErrorCode.ValidationError;
79
+ readonly when: "A non-overview dimension has no DEF codes.";
80
+ readonly retryable: false;
81
+ readonly recovery: "Provide at least one code in filters.def_codes, or use dimension \"overview\" without codes. Find codes in usaspending_get_agency def_codes fields.";
82
+ }, {
76
83
  readonly reason: "api_unavailable";
77
84
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
78
85
  readonly when: "USAspending.gov API is unreachable or returns an error.";
@@ -85,9 +92,11 @@ export declare const disasterSpendingTool: import("@cyanheads/mcp-ts-core").Tool
85
92
  readonly when: "USAspending.gov did not respond before the request deadline elapsed.";
86
93
  readonly retryable: true;
87
94
  readonly thrownBy: "service";
88
- readonly recovery: "By dimension — agency, cfda, recipient: pass fewer filters.def_codes or a smaller limit, then retry. geography: pass fewer filters.def_codes, then retry. overview: the upstream endpoint can run past the request budget on its own, so retry later, or call dimension \"agency\" with filters.def_codes (e.g. [\"L\", \"M\", \"N\", \"O\", \"P\"] for COVID-19), spending_type \"total\", and limit 100 for per-agency obligations and outlays plus overall totals.";
95
+ readonly recovery: "By dimension — agency, cfda, recipient: pass fewer filters.def_codes or a smaller limit, then retry. geography: pass fewer filters.def_codes, then retry. overview: narrow with optional filters.def_codes; filtered requests can still time out, so retry later, or call dimension \"agency\" with filters.def_codes (e.g. [\"L\", \"M\", \"N\", \"O\", \"P\"] for COVID-19), spending_type \"total\", and limit 100 for per-agency obligations and outlays plus overall totals.";
89
96
  }], {
90
97
  readonly applied_dimension: z.ZodString;
98
+ readonly applied_def_codes: z.ZodOptional<z.ZodString>;
99
+ readonly applied_query: z.ZodOptional<z.ZodString>;
91
100
  readonly totalCount: z.ZodOptional<z.ZodNumber>;
92
101
  readonly current_page: z.ZodOptional<z.ZodNumber>;
93
102
  readonly has_next_page: z.ZodOptional<z.ZodBoolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"disaster-spending.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/disaster-spending.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAmB,MAAM,+BAA+B,CAAC;AAoDlF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAghB/B,CAAC"}
1
+ {"version":3,"file":"disaster-spending.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/disaster-spending.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAwDjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmjB/B,CAAC"}