@cyanheads/usaspending-mcp-server 0.4.5 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/AGENTS.md +4 -4
  2. package/CLAUDE.md +4 -4
  3. package/Dockerfile +3 -3
  4. package/README.md +35 -28
  5. package/changelog/0.5.x/0.5.0.md +50 -0
  6. package/changelog/0.5.x/0.5.1.md +29 -0
  7. package/dist/config/server-config.d.ts.map +1 -1
  8. package/dist/config/server-config.js +3 -3
  9. package/dist/config/server-config.js.map +1 -1
  10. package/dist/index.js +1 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.d.ts +8 -1
  13. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.d.ts.map +1 -1
  14. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.js +94 -35
  15. package/dist/mcp-server/tools/definitions/autocomplete-filters.tool.js.map +1 -1
  16. package/dist/mcp-server/tools/definitions/disaster-spending.tool.d.ts +12 -2
  17. package/dist/mcp-server/tools/definitions/disaster-spending.tool.d.ts.map +1 -1
  18. package/dist/mcp-server/tools/definitions/disaster-spending.tool.js +107 -41
  19. package/dist/mcp-server/tools/definitions/disaster-spending.tool.js.map +1 -1
  20. package/dist/mcp-server/tools/definitions/filters.d.ts +73 -4
  21. package/dist/mcp-server/tools/definitions/filters.d.ts.map +1 -1
  22. package/dist/mcp-server/tools/definitions/filters.js +138 -4
  23. package/dist/mcp-server/tools/definitions/filters.js.map +1 -1
  24. package/dist/mcp-server/tools/definitions/get-agency.tool.d.ts +22 -3
  25. package/dist/mcp-server/tools/definitions/get-agency.tool.d.ts.map +1 -1
  26. package/dist/mcp-server/tools/definitions/get-agency.tool.js +166 -29
  27. package/dist/mcp-server/tools/definitions/get-agency.tool.js.map +1 -1
  28. package/dist/mcp-server/tools/definitions/get-award-federal-accounts.tool.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/get-award-federal-accounts.tool.js +3 -5
  30. package/dist/mcp-server/tools/definitions/get-award-federal-accounts.tool.js.map +1 -1
  31. package/dist/mcp-server/tools/definitions/get-award.tool.d.ts +8 -3
  32. package/dist/mcp-server/tools/definitions/get-award.tool.d.ts.map +1 -1
  33. package/dist/mcp-server/tools/definitions/get-award.tool.js +148 -139
  34. package/dist/mcp-server/tools/definitions/get-award.tool.js.map +1 -1
  35. package/dist/mcp-server/tools/definitions/get-federal-account-breakdown.tool.d.ts.map +1 -1
  36. package/dist/mcp-server/tools/definitions/get-federal-account-breakdown.tool.js +3 -6
  37. package/dist/mcp-server/tools/definitions/get-federal-account-breakdown.tool.js.map +1 -1
  38. package/dist/mcp-server/tools/definitions/get-idv-awards.tool.d.ts.map +1 -1
  39. package/dist/mcp-server/tools/definitions/get-idv-awards.tool.js +14 -12
  40. package/dist/mcp-server/tools/definitions/get-idv-awards.tool.js.map +1 -1
  41. package/dist/mcp-server/tools/definitions/get-recipient.tool.d.ts +2 -8
  42. package/dist/mcp-server/tools/definitions/get-recipient.tool.d.ts.map +1 -1
  43. package/dist/mcp-server/tools/definitions/get-recipient.tool.js +28 -28
  44. package/dist/mcp-server/tools/definitions/get-recipient.tool.js.map +1 -1
  45. package/dist/mcp-server/tools/definitions/index.d.ts +146 -29
  46. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  47. package/dist/mcp-server/tools/definitions/locations.d.ts +45 -0
  48. package/dist/mcp-server/tools/definitions/locations.d.ts.map +1 -0
  49. package/dist/mcp-server/tools/definitions/locations.js +206 -0
  50. package/dist/mcp-server/tools/definitions/locations.js.map +1 -0
  51. package/dist/mcp-server/tools/definitions/pagination.d.ts +2 -0
  52. package/dist/mcp-server/tools/definitions/pagination.d.ts.map +1 -1
  53. package/dist/mcp-server/tools/definitions/pagination.js +9 -0
  54. package/dist/mcp-server/tools/definitions/pagination.js.map +1 -1
  55. package/dist/mcp-server/tools/definitions/search-awards.tool.d.ts +34 -8
  56. package/dist/mcp-server/tools/definitions/search-awards.tool.d.ts.map +1 -1
  57. package/dist/mcp-server/tools/definitions/search-awards.tool.js +123 -88
  58. package/dist/mcp-server/tools/definitions/search-awards.tool.js.map +1 -1
  59. package/dist/mcp-server/tools/definitions/search-recipients.tool.d.ts.map +1 -1
  60. package/dist/mcp-server/tools/definitions/search-recipients.tool.js +12 -7
  61. package/dist/mcp-server/tools/definitions/search-recipients.tool.js.map +1 -1
  62. package/dist/mcp-server/tools/definitions/spending-by-category.tool.d.ts +21 -2
  63. package/dist/mcp-server/tools/definitions/spending-by-category.tool.d.ts.map +1 -1
  64. package/dist/mcp-server/tools/definitions/spending-by-category.tool.js +77 -12
  65. package/dist/mcp-server/tools/definitions/spending-by-category.tool.js.map +1 -1
  66. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.d.ts +21 -2
  67. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.d.ts.map +1 -1
  68. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.js +93 -20
  69. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.js.map +1 -1
  70. package/dist/mcp-server/tools/definitions/spending-over-time.tool.d.ts +19 -1
  71. package/dist/mcp-server/tools/definitions/spending-over-time.tool.d.ts.map +1 -1
  72. package/dist/mcp-server/tools/definitions/spending-over-time.tool.js +60 -12
  73. package/dist/mcp-server/tools/definitions/spending-over-time.tool.js.map +1 -1
  74. package/dist/services/usaspending/types.d.ts +28 -16
  75. package/dist/services/usaspending/types.d.ts.map +1 -1
  76. package/dist/services/usaspending/usaspending-service.d.ts +47 -29
  77. package/dist/services/usaspending/usaspending-service.d.ts.map +1 -1
  78. package/dist/services/usaspending/usaspending-service.js +98 -55
  79. package/dist/services/usaspending/usaspending-service.js.map +1 -1
  80. package/package.json +10 -10
  81. package/server.json +3 -3
@@ -6,14 +6,16 @@
6
6
  import { tool, z } from '@cyanheads/mcp-ts-core';
7
7
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
8
8
  import { getUSASpendingService } from '../../../services/usaspending/usaspending-service.js';
9
+ /** Largest `limit` every autocomplete route accepts; 501 is rejected with HTTP 400. */
10
+ const UPSTREAM_LIMIT_MAX = 500;
9
11
  export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters', {
10
12
  title: 'Autocomplete Codes and Names',
11
- 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 names and IDs), 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.',
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.',
12
14
  annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
13
15
  input: z.object({
14
16
  type: z
15
17
  .enum(['naics', 'psc', 'cfda', 'awarding_agency', 'recipient'])
16
- .describe('Lookup table to search: naics (industry codes), psc (product/service codes), cfda (Assistance Listing program numbers, for usaspending_search_awards assistance_listings), awarding_agency (agency names), recipient (recipient names)'),
18
+ .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). Both 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.'),
17
19
  search_text: z
18
20
  .string()
19
21
  .min(1)
@@ -22,7 +24,7 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
22
24
  .number()
23
25
  .int()
24
26
  .min(1)
25
- .max(500)
27
+ .max(UPSTREAM_LIMIT_MAX)
26
28
  .default(10)
27
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.'),
28
30
  }),
@@ -35,12 +37,27 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
35
37
  code: z
36
38
  .string()
37
39
  .optional()
38
- .describe('Code value (NAICS code, PSC code, Assistance Listing/CFDA number, or agency code); use this in filter parameters — an Assistance Listing number goes in usaspending_search_awards assistance_listings'),
39
- name: z.string().optional().describe('Human-readable name or description'),
40
- id: z
40
+ .describe('Code value (NAICS code, PSC code, or Assistance Listing/CFDA number); use this in filter parameters — an Assistance Listing number goes in usaspending_search_awards assistance_listings. Agency rows carry toptier_code instead.'),
41
+ name: z
41
42
  .string()
42
43
  .optional()
43
- .describe('Numeric or string ID (for the awarding_agency type)'),
44
+ .describe("Human-readable name or description; for awarding_agency, the matched agency's own name, which for a sub-agency differs from toptier_name"),
45
+ abbreviation: z
46
+ .string()
47
+ .optional()
48
+ .describe("awarding_agency only: the matched agency's own abbreviation, when it has one"),
49
+ tier: z
50
+ .enum(['toptier', 'subtier'])
51
+ .optional()
52
+ .describe('awarding_agency only: toptier for a department-level agency, subtier for a component under one'),
53
+ toptier_name: z
54
+ .string()
55
+ .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
+ toptier_code: z
58
+ .string()
59
+ .optional()
60
+ .describe('awarding_agency only: the 3-digit top-tier agency code, accepted by usaspending_get_agency'),
44
61
  uei: z
45
62
  .string()
46
63
  .optional()
@@ -50,19 +67,27 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
50
67
  .optional()
51
68
  .describe('DUNS number (legacy) — recipient type only; populated when the search text matches a DUNS'),
52
69
  })
53
- .describe('Matched entry — code/name for code lookups, name plus optional UEI/DUNS for recipients'))
70
+ .describe('Matched entry — code/name for code lookups, name with tier and top-tier parent for agencies, name plus optional UEI/DUNS for recipients'))
54
71
  .describe('Matching codes and names'),
55
72
  total: z.number().describe('Number of results returned'),
56
73
  }),
57
74
  // Agent-facing context: echoed query parameters and result count. The autocomplete
58
- // endpoint returns no total, so a hit-the-cap signal discloses truncation.
75
+ // endpoints return no total, so the handler asks for one row past the limit and
76
+ // discloses truncation only when that row (or a recipient bucket overflow) came back.
59
77
  enrichment: {
60
78
  lookup_type: z.string().describe('Lookup table that was searched'),
61
79
  query: z.string().describe('Search text sent to the autocomplete API'),
62
80
  result_count: z.number().describe('Number of matching results returned'),
63
- truncated: z.boolean().optional().describe('True when results were capped at the limit.'),
64
- shown: z.number().optional().describe('Number of results returned.'),
65
- cap: z.number().optional().describe('The limit that was applied.'),
81
+ truncated: z
82
+ .boolean()
83
+ .optional()
84
+ .describe('True when more matches exist beyond the limit and were left out. Absent when every match was returned.'),
85
+ shown: z.number().optional().describe('Number of results returned, when truncated.'),
86
+ cap: z.number().optional().describe('The limit that was applied, when truncated.'),
87
+ notice: z
88
+ .string()
89
+ .optional()
90
+ .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.'),
66
91
  },
67
92
  errors: [
68
93
  {
@@ -95,22 +120,28 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
95
120
  });
96
121
  const svc = getUSASpendingService();
97
122
  let rawResults = [];
123
+ /**
124
+ * One row past `limit` tells a capped list from one that exactly fills the page. Every
125
+ * autocomplete route rejects `limit` above 500 with HTTP 400, so at 500 there is no
126
+ * room for the extra row and a full page can only say the ceiling was reached.
127
+ */
128
+ const requested = Math.min(input.limit + 1, UPSTREAM_LIMIT_MAX);
98
129
  if (input.type === 'naics') {
99
- const resp = await svc.autocompleteNaics(input.search_text, input.limit, ctx);
130
+ const resp = await svc.autocompleteNaics(input.search_text, requested, ctx);
100
131
  rawResults = (resp.results ?? []).map((r) => ({
101
132
  ...(r.naics ? { code: r.naics } : {}),
102
133
  ...(r.naics_description ? { name: r.naics_description } : {}),
103
134
  }));
104
135
  }
105
136
  else if (input.type === 'psc') {
106
- const resp = await svc.autocompletePsc(input.search_text, input.limit, ctx);
137
+ const resp = await svc.autocompletePsc(input.search_text, requested, ctx);
107
138
  rawResults = (resp.results ?? []).map((r) => ({
108
139
  ...(r.product_or_service_code ? { code: r.product_or_service_code } : {}),
109
140
  ...(r.psc_description ? { name: r.psc_description } : {}),
110
141
  }));
111
142
  }
112
143
  else if (input.type === 'cfda') {
113
- const resp = await svc.autocompleteCfda(input.search_text, input.limit, ctx);
144
+ const resp = await svc.autocompleteCfda(input.search_text, requested, ctx);
114
145
  rawResults = (resp.results ?? []).map((r) => ({
115
146
  ...(r.program_number ? { code: r.program_number } : {}),
116
147
  ...(r.program_title
@@ -121,24 +152,42 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
121
152
  }));
122
153
  }
123
154
  else if (input.type === 'awarding_agency') {
124
- const resp = await svc.autocompleteAwardingAgency(input.search_text, input.limit, ctx);
125
- rawResults = (resp.results ?? []).map((r) => ({
126
- ...(r.id != null ? { id: String(r.id) } : {}),
127
- ...(r.toptier_agency?.name ? { name: r.toptier_agency.name } : {}),
128
- }));
155
+ 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;
162
+ 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
+ : {}),
172
+ };
173
+ });
129
174
  }
130
175
  else {
131
176
  // recipient
132
- const resp = await svc.autocompleteRecipient(input.search_text, input.limit, ctx);
177
+ const resp = await svc.autocompleteRecipient(input.search_text, requested, ctx);
133
178
  rawResults = (resp.results ?? []).map((r) => ({
134
179
  ...(r.recipient_name ? { name: r.recipient_name } : {}),
135
180
  ...(r.uei ? { uei: r.uei } : {}),
136
181
  ...(r.duns ? { duns: r.duns } : {}),
137
182
  }));
138
183
  }
139
- // `autocomplete/recipient/` applies `limit` per match bucket (name, UEI, DUNS) and
140
- // unions them, so it can hand back up to 3x what was asked for. The other four
141
- // lookups already honor `limit`, so capping here is a no-op for them.
184
+ /**
185
+ * `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`.
189
+ */
190
+ const received = rawResults.length;
142
191
  rawResults = rawResults.slice(0, input.limit);
143
192
  if (rawResults.length === 0) {
144
193
  throw ctx.fail('no_match', `No ${input.type} results matched "${input.search_text}"`, {
@@ -152,20 +201,28 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
152
201
  query: input.search_text,
153
202
  result_count: rawResults.length,
154
203
  });
155
- if (rawResults.length >= input.limit) {
204
+ const narrow = input.limit < UPSTREAM_LIMIT_MAX
205
+ ? `Raise limit (max ${UPSTREAM_LIMIT_MAX}) or use a more specific search term.`
206
+ : 'Use a more specific search term.';
207
+ if (received > input.limit) {
156
208
  ctx.enrich.truncated({
157
209
  shown: rawResults.length,
158
210
  cap: input.limit,
159
- // The recipient cap is a head-slice over name-then-UEI-then-DUNS, and upstream
160
- // fills the name bucket to `limit` on its own whenever the corpus allows. So a
161
- // saturated recipient page holds name matches only, and raising `limit` raises
162
- // the name bucket with it — it never reaches the identifier buckets behind it.
163
- // Pointing that caller at `limit` would send them somewhere the rows are not.
211
+ /**
212
+ * The recipient cap is a head-slice over name-then-UEI-then-DUNS, and upstream
213
+ * fills the name bucket to the requested size on its own whenever the corpus
214
+ * allows. So a saturated recipient page holds name matches only, and raising
215
+ * `limit` raises the name bucket with it — it never reaches the identifier buckets
216
+ * behind it. Pointing that caller at `limit` alone would misdirect them.
217
+ */
164
218
  guidance: input.type === 'recipient'
165
- ? 'More name matches may exist — raise limit (max 500) or use a more specific search term. Matches on a UEI or DUNS are not reachable this way once name matches fill the page; to resolve one, pass the identifier itself as search_text.'
166
- : 'More matches may exist. Raise limit (max 500) or use a more specific search term.',
219
+ ? `More matches exist beyond limit. ${narrow} Matches on a UEI or DUNS are not reachable this way once name matches fill the page; to resolve one, pass the identifier itself as search_text.`
220
+ : `More matches exist beyond limit. ${narrow}`,
167
221
  });
168
222
  }
223
+ else if (requested === input.limit && received === input.limit) {
224
+ ctx.enrich.notice(`Returned the upstream maximum of ${UPSTREAM_LIMIT_MAX} matches, so more may exist. ${narrow}`);
225
+ }
169
226
  return {
170
227
  type: input.type,
171
228
  search_text: input.search_text,
@@ -179,10 +236,12 @@ export const autocompleteFiltersTool = tool('usaspending_autocomplete_filters',
179
236
  const parts = [];
180
237
  if (r.code)
181
238
  parts.push(`**Code:** ${r.code}`);
182
- if (r.id)
183
- parts.push(`**ID:** ${r.id}`);
184
239
  if (r.name)
185
- parts.push(`**Name:** ${r.name}`);
240
+ parts.push(`**Name:** ${r.name}${r.abbreviation ? ` (${r.abbreviation})` : ''}`);
241
+ if (r.tier)
242
+ parts.push(`**Tier:** ${r.tier}`);
243
+ if (r.toptier_name)
244
+ parts.push(`**Top-tier agency:** ${r.toptier_name}${r.toptier_code ? ` (toptier_code ${r.toptier_code})` : ''}`);
186
245
  if (r.uei)
187
246
  parts.push(`**UEI:** ${r.uei}`);
188
247
  if (r.duns)
@@ -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;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,kCAAkC,EAAE;IAC9E,KAAK,EAAE,8BAA8B;IACrC,WAAW,EACT,4dAA4d;IAC9d,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;aAC9D,QAAQ,CACP,wOAAwO,CACzO;QACH,WAAW,EAAE,CAAC;aACX,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,uFAAuF,CACxF;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,0fAA0f,CAC3f;KACJ,CAAC;IAEF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QAClD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAk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AAC,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;AAEjE,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,4jBAA4jB;IAC9jB,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;aAC9D,QAAQ,CACP,6bAA6b,CAC9b;QACH,WAAW,EAAE,CAAC;aACX,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,uFAAuF,CACxF;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,kBAAkB,CAAC;aACvB,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CACP,0fAA0f,CAC3f;KACJ,CAAC;IAEF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uB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BAAkB,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACrG,CAAC;YACJ,IAAI,CAAC,CAAC,GAAG;gBAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,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"}
@@ -20,11 +20,12 @@ 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";
26
27
  }>>;
27
- }, z.core.$strip>>;
28
+ }, z.core.$strict>>;
28
29
  limit: z.ZodDefault<z.ZodNumber>;
29
30
  page: z.ZodDefault<z.ZodNumber>;
30
31
  }, z.core.$strip>, z.ZodObject<{
@@ -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,15 +92,18 @@ 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>;
94
103
  readonly truncated: z.ZodOptional<z.ZodBoolean>;
95
104
  readonly shown: z.ZodOptional<z.ZodNumber>;
96
105
  readonly cap: z.ZodOptional<z.ZodNumber>;
106
+ readonly truncationCeiling: z.ZodOptional<z.ZodNumber>;
97
107
  readonly notice: z.ZodOptional<z.ZodString>;
98
108
  }>;
99
109
  //# sourceMappingURL=disaster-spending.tool.d.ts.map
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6d/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;AAuDjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+iB/B,CAAC"}