@cyanheads/usaspending-mcp-server 0.2.9 → 0.3.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 (90) hide show
  1. package/CLAUDE.md +55 -29
  2. package/Dockerfile +1 -1
  3. package/README.md +34 -8
  4. package/changelog/0.2.x/0.2.9.md +0 -2
  5. package/changelog/0.3.x/0.3.0.md +18 -0
  6. package/changelog/0.3.x/0.3.1.md +30 -0
  7. package/dist/mcp-server/tools/definitions/autocomplete.tool.d.ts +8 -2
  8. package/dist/mcp-server/tools/definitions/autocomplete.tool.d.ts.map +1 -1
  9. package/dist/mcp-server/tools/definitions/autocomplete.tool.js +7 -0
  10. package/dist/mcp-server/tools/definitions/autocomplete.tool.js.map +1 -1
  11. package/dist/mcp-server/tools/definitions/disaster-spending.tool.d.ts +10 -4
  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 +7 -0
  14. package/dist/mcp-server/tools/definitions/disaster-spending.tool.js.map +1 -1
  15. package/dist/mcp-server/tools/definitions/get-agency.tool.d.ts +6 -0
  16. package/dist/mcp-server/tools/definitions/get-agency.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/get-agency.tool.js +7 -0
  18. package/dist/mcp-server/tools/definitions/get-agency.tool.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/get-award-federal-accounts.tool.d.ts +48 -0
  20. package/dist/mcp-server/tools/definitions/get-award-federal-accounts.tool.d.ts.map +1 -0
  21. package/dist/mcp-server/tools/definitions/get-award-federal-accounts.tool.js +184 -0
  22. package/dist/mcp-server/tools/definitions/get-award-federal-accounts.tool.js.map +1 -0
  23. package/dist/mcp-server/tools/definitions/get-award-subawards.tool.d.ts +8 -7
  24. package/dist/mcp-server/tools/definitions/get-award-subawards.tool.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/get-award-subawards.tool.js +12 -6
  26. package/dist/mcp-server/tools/definitions/get-award-subawards.tool.js.map +1 -1
  27. package/dist/mcp-server/tools/definitions/get-award-transactions.tool.d.ts +6 -5
  28. package/dist/mcp-server/tools/definitions/get-award-transactions.tool.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/get-award-transactions.tool.js +13 -6
  30. package/dist/mcp-server/tools/definitions/get-award-transactions.tool.js.map +1 -1
  31. package/dist/mcp-server/tools/definitions/get-award.tool.d.ts +6 -0
  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 +7 -0
  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 +51 -0
  36. package/dist/mcp-server/tools/definitions/get-federal-account-breakdown.tool.d.ts.map +1 -0
  37. package/dist/mcp-server/tools/definitions/get-federal-account-breakdown.tool.js +171 -0
  38. package/dist/mcp-server/tools/definitions/get-federal-account-breakdown.tool.js.map +1 -0
  39. package/dist/mcp-server/tools/definitions/get-federal-account.tool.d.ts +13 -0
  40. package/dist/mcp-server/tools/definitions/get-federal-account.tool.d.ts.map +1 -1
  41. package/dist/mcp-server/tools/definitions/get-federal-account.tool.js +62 -2
  42. package/dist/mcp-server/tools/definitions/get-federal-account.tool.js.map +1 -1
  43. package/dist/mcp-server/tools/definitions/get-idv-awards.tool.d.ts +6 -0
  44. package/dist/mcp-server/tools/definitions/get-idv-awards.tool.d.ts.map +1 -1
  45. package/dist/mcp-server/tools/definitions/get-idv-awards.tool.js +7 -0
  46. package/dist/mcp-server/tools/definitions/get-idv-awards.tool.js.map +1 -1
  47. package/dist/mcp-server/tools/definitions/get-recipient.tool.d.ts +7 -1
  48. package/dist/mcp-server/tools/definitions/get-recipient.tool.d.ts.map +1 -1
  49. package/dist/mcp-server/tools/definitions/get-recipient.tool.js +7 -0
  50. package/dist/mcp-server/tools/definitions/get-recipient.tool.js.map +1 -1
  51. package/dist/mcp-server/tools/definitions/index.d.ts +205 -28
  52. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  53. package/dist/mcp-server/tools/definitions/index.js +6 -0
  54. package/dist/mcp-server/tools/definitions/index.js.map +1 -1
  55. package/dist/mcp-server/tools/definitions/list-agencies.tool.d.ts +8 -2
  56. package/dist/mcp-server/tools/definitions/list-agencies.tool.d.ts.map +1 -1
  57. package/dist/mcp-server/tools/definitions/list-agencies.tool.js +7 -0
  58. package/dist/mcp-server/tools/definitions/list-agencies.tool.js.map +1 -1
  59. package/dist/mcp-server/tools/definitions/search-awards.tool.d.ts +6 -0
  60. package/dist/mcp-server/tools/definitions/search-awards.tool.d.ts.map +1 -1
  61. package/dist/mcp-server/tools/definitions/search-awards.tool.js +7 -0
  62. package/dist/mcp-server/tools/definitions/search-awards.tool.js.map +1 -1
  63. package/dist/mcp-server/tools/definitions/search-federal-accounts.tool.d.ts +6 -0
  64. package/dist/mcp-server/tools/definitions/search-federal-accounts.tool.d.ts.map +1 -1
  65. package/dist/mcp-server/tools/definitions/search-federal-accounts.tool.js +7 -0
  66. package/dist/mcp-server/tools/definitions/search-federal-accounts.tool.js.map +1 -1
  67. package/dist/mcp-server/tools/definitions/search-recipients.tool.d.ts +7 -1
  68. package/dist/mcp-server/tools/definitions/search-recipients.tool.d.ts.map +1 -1
  69. package/dist/mcp-server/tools/definitions/search-recipients.tool.js +7 -0
  70. package/dist/mcp-server/tools/definitions/search-recipients.tool.js.map +1 -1
  71. package/dist/mcp-server/tools/definitions/spending-by-category.tool.d.ts +10 -4
  72. package/dist/mcp-server/tools/definitions/spending-by-category.tool.d.ts.map +1 -1
  73. package/dist/mcp-server/tools/definitions/spending-by-category.tool.js +7 -0
  74. package/dist/mcp-server/tools/definitions/spending-by-category.tool.js.map +1 -1
  75. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.d.ts +7 -1
  76. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.d.ts.map +1 -1
  77. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.js +7 -0
  78. package/dist/mcp-server/tools/definitions/spending-by-geography.tool.js.map +1 -1
  79. package/dist/mcp-server/tools/definitions/spending-over-time.tool.d.ts +7 -1
  80. package/dist/mcp-server/tools/definitions/spending-over-time.tool.d.ts.map +1 -1
  81. package/dist/mcp-server/tools/definitions/spending-over-time.tool.js +7 -0
  82. package/dist/mcp-server/tools/definitions/spending-over-time.tool.js.map +1 -1
  83. package/dist/services/usaspending/types.d.ts +71 -1
  84. package/dist/services/usaspending/types.d.ts.map +1 -1
  85. package/dist/services/usaspending/usaspending-service.d.ts +40 -2
  86. package/dist/services/usaspending/usaspending-service.d.ts.map +1 -1
  87. package/dist/services/usaspending/usaspending-service.js +44 -6
  88. package/dist/services/usaspending/usaspending-service.js.map +1 -1
  89. package/package.json +6 -5
  90. package/server.json +3 -3
package/CLAUDE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** usaspending-mcp-server
4
- **Version:** 0.2.9
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.14`
4
+ **Version:** 0.3.1
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.0`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
8
8
  **Zod:** ^4.4.3
@@ -35,7 +35,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
35
35
  - **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
36
36
  - **Use `ctx.log`** for request-scoped logging. No `console` calls.
37
37
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
38
- - **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
38
+ - **Check `ctx.elicit`** for presence before calling.
39
39
  - **Secrets in env vars only** — never hardcoded.
40
40
  - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
41
41
 
@@ -139,6 +139,25 @@ export function getServerConfig() {
139
139
 
140
140
  `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
141
141
 
142
+ For env booleans use `z.stringbool()`, never `z.coerce.boolean()` — `Boolean("false")` is `true`, so a coerced flag can't be disabled through the environment. `z.stringbool()` parses `true/false/1/0/yes/no/on/off` and rejects anything else, so `=false` actually disables.
143
+
144
+ ### Server identity and instructions
145
+
146
+ `createApp()` accepts optional identity fields forwarded to the SDK's `initialize` response and the server manifest (`/.well-known/mcp.json`):
147
+
148
+ ```ts
149
+ await createApp({
150
+ name: 'usaspending-mcp-server',
151
+ title: 'usaspending-mcp-server', // human-readable display name
152
+ websiteUrl: 'https://github.com/owner/repo', // canonical homepage URL
153
+ description: 'One-line description.', // wins over MCP_SERVER_DESCRIPTION
154
+ icons: [{ src: 'https://example.com/icon.png', sizes: ['48x48'], mimeType: 'image/png' }],
155
+ instructions: 'Use shortcut alpha for the most common case.', // session-level context
156
+ });
157
+ ```
158
+
159
+ `instructions` is optional server-level orientation, sent on every `initialize` as session-level context. Use it for deployment guidance (connection aliases, regional notes, scope hints) instead of repeating the same context across tool descriptions. Client adoption is uneven, but there's no downside when set.
160
+
142
161
  ---
143
162
 
144
163
  ## Context
@@ -148,13 +167,14 @@ Handlers receive a unified `ctx` object. Key properties:
148
167
  | Property | Description |
149
168
  |:---------|:------------|
150
169
  | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
151
- | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
152
- | `ctx.elicit` | Ask user for structured input. **Check for presence first:** `if (ctx.elicit) { ... }` |
153
- | `ctx.sample` | Request LLM completion from the client. **Check for presence first:** `if (ctx.sample) { ... }` |
170
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
171
+ | `ctx.elicit` | Ask user for structured input — form call `(message, schema)` or `.url(message, url)` for an external link. **Check for presence first:** `if (ctx.elicit) { ... }` |
172
+ | `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
173
+ | `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
154
174
  | `ctx.signal` | `AbortSignal` for cancellation. |
155
175
  | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
156
176
  | `ctx.requestId` | Unique request ID. |
157
- | `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
177
+ | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
158
178
 
159
179
  ---
160
180
 
@@ -162,9 +182,11 @@ Handlers receive a unified `ctx` object. Key properties:
162
182
 
163
183
  Handlers throw — the framework catches, classifies, and formats.
164
184
 
165
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
185
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
166
186
 
167
187
  ```ts
188
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
189
+
168
190
  errors: [
169
191
  { reason: 'no_match', code: JsonRpcErrorCode.NotFound,
170
192
  when: 'No item matched the query',
@@ -172,7 +194,7 @@ errors: [
172
194
  ],
173
195
  async handler(input, ctx) {
174
196
  const item = await db.find(input.id);
175
- if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
197
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`, ctx.recoveryFor('no_match'));
176
198
  return item;
177
199
  }
178
200
  ```
@@ -235,7 +257,7 @@ src/
235
257
 
236
258
  ## Skills
237
259
 
238
- Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
260
+ Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry.
239
261
 
240
262
  **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
241
263
 
@@ -255,7 +277,6 @@ Available skills:
255
277
  | `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
256
278
  | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
257
279
  | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
258
- | `devcheck` | Lint, format, typecheck, audit |
259
280
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
260
281
  | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
261
282
  | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
@@ -263,12 +284,14 @@ Available skills:
263
284
  | `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
264
285
  | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
265
286
  | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
287
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
266
288
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
267
289
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
268
290
  | `api-config` | AppConfig, parseConfig, env vars |
269
291
  | `api-context` | Context interface, logger, state, progress |
270
292
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
271
293
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
294
+ | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
272
295
  | `api-services` | LLM, Speech, Graph services |
273
296
  | `api-testing` | createMockContext, test patterns |
274
297
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
@@ -283,30 +306,33 @@ When you complete a skill's checklist, check the boxes and add a completion time
283
306
 
284
307
  ## Commands
285
308
 
286
- **Runtime:** Scripts use `tsx` — both `npm run <cmd>` and `bun run <cmd>` work. `bun` is slightly faster for script invocation but not required.
309
+ **Runtime:** Scripts use Bun's native TypeScript execution — `bun run <cmd>` is the standard invocation. `npm run <cmd>` also works (npm delegates to bun).
287
310
 
288
311
  | Command | Purpose |
289
312
  |:--------|:--------|
290
- | `npm run build` | Compile TypeScript |
291
- | `npm run rebuild` | Clean + build |
292
- | `npm run clean` | Remove build artifacts |
293
- | `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
313
+ | `bun run build` | Compile TypeScript |
314
+ | `bun run rebuild` | Clean + build |
315
+ | `bun run clean` | Remove build artifacts |
316
+ | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
294
317
  | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
295
- | `npm run tree` | Generate directory structure doc |
296
- | `npm run format` | Auto-fix formatting (safe fixes only) |
297
- | `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
298
- | `npm test` | Run tests |
299
- | `npm run start:stdio` | Production mode (stdio) |
300
- | `npm run start:http` | Production mode (HTTP) |
301
- | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
302
- | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
303
- | `npm run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
318
+ | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
319
+ | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
320
+ | `bun run list-skills` | Print the skill registry |
321
+ | `bun run tree` | Generate directory structure doc |
322
+ | `bun run format` | Auto-fix formatting (safe fixes only) |
323
+ | `bun run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
324
+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |
325
+ | `bun run start:stdio` | Production mode (stdio) |
326
+ | `bun run start:http` | Production mode (HTTP) |
327
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
328
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
329
+ | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
304
330
 
305
331
  ---
306
332
 
307
333
  ## Bundling
308
334
 
309
- `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
335
+ `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
310
336
 
311
337
  **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
312
338
 
@@ -316,7 +342,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
316
342
 
317
343
  ## Changelog
318
344
 
319
- Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `npm run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaffolding. `CHANGELOG.md` is a **navigation index** (header + link + summary per version), regenerated by `npm run changelog:build` — devcheck hard-fails on drift; never hand-edit it.
345
+ Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `npm run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaffolding. `CHANGELOG.md` is a **navigation index** (header + link + summary per version), regenerated by `npm run changelog:build` — devcheck hard-fails on drift; never hand-edit it. The build also hard-fails on an entry whose body carries a line consisting of nothing but an angle-bracket tag — leaked control markup, which is otherwise invisible to every gate and ships in the npm tarball and GitHub release body. Inline angle brackets in prose (`post<T>()`, `["<code>"]`) are unaffected.
320
346
 
321
347
  Each per-version file opens with YAML frontmatter:
322
348
 
@@ -324,14 +350,14 @@ Each per-version file opens with YAML frontmatter:
324
350
  ---
325
351
  summary: "One-line headline, ≤350 chars" # required — powers the rollup index
326
352
  breaking: false # optional — true flags breaking changes
327
- security: false # optional — true flags security fixes
353
+ security: false # optional — true ONLY for a source-code security fix, never a dependency CVE bump
328
354
  ---
329
355
 
330
356
  # 0.1.0 — YYYY-MM-DD
331
357
  ...
332
358
  ```
333
359
 
334
- `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
360
+ `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section — set it only for a security fix in this server's *own source code*, never for a routine dependency or transitive CVE bump (record those under `## Dependencies`). When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
335
361
 
336
362
  `agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
337
363
 
package/Dockerfile CHANGED
@@ -60,7 +60,7 @@ RUN --mount=type=cache,target=/root/.bun/install/cache \
60
60
  ARG OTEL_ENABLED=true
61
61
  RUN --mount=type=cache,target=/root/.bun/install/cache \
62
62
  if [ "$OTEL_ENABLED" = "true" ]; then \
63
- bun add @hono/otel \
63
+ bun add --omit=dev --ignore-scripts @hono/otel \
64
64
  @opentelemetry/instrumentation-http \
65
65
  @opentelemetry/exporter-metrics-otlp-http \
66
66
  @opentelemetry/exporter-trace-otlp-http \
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  <div align="center">
2
2
  <h1>@cyanheads/usaspending-mcp-server</h1>
3
3
  <p><b>Access US federal award, recipient, agency, and spending analytics data from USAspending.gov via MCP. STDIO or Streamable HTTP.</b>
4
- <div>16 Tools</div>
4
+ <div>18 Tools</div>
5
5
  </p>
6
6
  </div>
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.2.9-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-^1.29.0-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-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.14-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.3.1-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-^1.29.0-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.3.14-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -29,7 +29,7 @@
29
29
 
30
30
  ## Tools
31
31
 
32
- 16 tools covering the full USAspending.gov API surface — award discovery and detail, recipient and agency profiles, spending analytics (by geography, category, and time), disaster/emergency spending, and federal account data:
32
+ 18 tools covering the full USAspending.gov API surface — award discovery and detail, recipient and agency profiles, spending analytics (by geography, category, and time), disaster/emergency spending, and federal account data:
33
33
 
34
34
  | Tool | Description |
35
35
  |:---|:---|
@@ -38,6 +38,7 @@
38
38
  | `usaspending_get_idv_awards` | List child contracts and task/delivery orders placed under an IDV award. Each row includes a `generated_unique_award_id` for chaining into `usaspending_get_award`. |
39
39
  | `usaspending_get_award_transactions` | List individual transactions (modifications, amendments) on an award. Reveals spending history and obligation changes over time. |
40
40
  | `usaspending_get_award_subawards` | List subaward contracts or grants under a prime award. Reveals the sub-contractor or sub-grantee layer — who actually does the work. |
41
+ | `usaspending_get_award_federal_accounts` | List the Treasury federal accounts that funded an award, with the amount obligated from each. Returns `federal_account` for chaining into `usaspending_get_federal_account`. |
41
42
  | `usaspending_search_recipients` | Search for organizations receiving federal funds by name, UEI, or DUNS. Returns recipient hash IDs, UEI/DUNS, total award amounts, and hierarchy level. Paginated — page through with `page`; `page_metadata.total` reports the full match count. |
42
43
  | `usaspending_get_recipient` | Fetch a recipient's profile: address, business types, parent organization, alternate names, and total award amounts by type. |
43
44
  | `usaspending_get_agency` | Fetch an agency's fiscal year overview: mission, budget authority, obligation totals, sub-agency count, and DEF codes. Accepts a 3-digit `toptier_code` or an `agency_slug` from award search results. |
@@ -45,7 +46,8 @@
45
46
  | `usaspending_spending_by_category` | Aggregate spending grouped by NAICS code, PSC code, awarding agency, funding agency, CFDA program, or recipient. Returns top items with amounts for trend and breakdown analysis. |
46
47
  | `usaspending_spending_over_time` | Fetch aggregated spending by fiscal year, fiscal quarter, or fiscal month. Filter by award type, agency, recipient, or keyword to trace trends in a specific area. |
47
48
  | `usaspending_disaster_spending` | Fetch disaster and emergency supplemental spending (COVID-19, hurricanes, etc.) broken down by agency, CFDA program, recipient, or geography. Filter by DEF codes to isolate a specific appropriation. |
48
- | `usaspending_get_federal_account` | Fetch a federal account's budget data: total obligations, outlays, program activities, and object class breakdown. Account codes come from `usaspending_search_federal_accounts`. |
49
+ | `usaspending_get_federal_account` | Fetch a federal account's budget data: total obligations, outlays, budgetary resources, and the per-Treasury-Account-Symbol component breakdown. Account codes come from `usaspending_search_federal_accounts`. |
50
+ | `usaspending_get_federal_account_breakdown` | Break a federal account's obligations down by program activity (what the money funds) or object class (what it buys). Paginated with a total count. |
49
51
  | `usaspending_search_federal_accounts` | List and keyword-search federal accounts by agency identifier or title keyword. Returns account numbers for chaining into `usaspending_get_federal_account`. |
50
52
  | `usaspending_list_agencies` | List all top-tier federal agencies with toptier codes, budget authority amounts, and obligation totals. Entry point for agency navigation. |
51
53
  | `usaspending_autocomplete` | Look up valid code values for filter fields: NAICS, PSC, CFDA, recipient names, or agency names. Use before filtering to discover the right code from a description. |
@@ -107,6 +109,18 @@ List subawards under a prime contract or grant.
107
109
 
108
110
  ---
109
111
 
112
+ ### `usaspending_get_award_federal_accounts`
113
+
114
+ List the Treasury federal accounts that funded an award — the award → appropriation link.
115
+
116
+ - `award_id` must be a `generated_unique_award_id` — from `usaspending_search_awards` (`generated_internal_id` field) or `usaspending_get_award`
117
+ - Each row returns `federal_account` (AGENCY-MAIN format, e.g. `080-0120`) for chaining into `usaspending_get_federal_account`, plus the amount obligated from that account and the funding agency behind it
118
+ - Distinct from `usaspending_get_award` `account_obligations_by_defc`, which breaks funding down by Disaster/Emergency Funding code rather than by account
119
+ - Pagination via `limit` (max 100) and `page`; `count` in `page_metadata` is the total across pages
120
+ - An `award_id` that does not exist returns an empty list rather than an error — the upstream reports no not-found signal for this endpoint
121
+
122
+ ---
123
+
110
124
  ### `usaspending_search_recipients`
111
125
 
112
126
  Search for organizations receiving federal funds by name, UEI, or DUNS.
@@ -183,10 +197,22 @@ Fetch disaster and emergency supplemental spending consolidated from nine+ API e
183
197
 
184
198
  Fetch budget data for a federal account identified by its account code.
185
199
 
186
- - Returns account title, federal account code, budget function, and managing agency
187
- - Includes fiscal year snapshot with total obligations and outlays
188
- - Program activity and object class breakdown shows how funds are categorized
189
- - Account codes come from `account_number` in `usaspending_search_federal_accounts` results
200
+ - Returns account title, federal account code, agency identifier, parent agency, and bureau
201
+ - Includes the fiscal year snapshot: total obligations, gross outlays, and budgetary resources
202
+ - `children` breaks the account into its Treasury Account Symbol (TAS) components, each with its own obligated, outlay, and budgetary-resource amounts — one entry per availability period, bounded and returned in full
203
+ - Account codes come from `account_number` in `usaspending_search_federal_accounts` results, or `federal_account` in `usaspending_get_award_federal_accounts` results
204
+ - For obligations broken down by program activity or object class, use `usaspending_get_federal_account_breakdown`
205
+
206
+ ---
207
+
208
+ ### `usaspending_get_federal_account_breakdown`
209
+
210
+ Break a federal account's obligations down by program activity or object class.
211
+
212
+ - `dimension` enum selects the axis: `program_activity` (what the money funds) or `object_class` (what it buys — personnel, supplies, contracts)
213
+ - Each row returns the code, name, and obligated amount; `program_activity` rows also carry `type` — `PAC/PAN` (legacy program activity code/name) or `PARK` (Program Activity Reporting Key), both of which can appear for the same account
214
+ - Pagination via `limit` (max 100) and `page`; `total` in `page_metadata` is the true row count across pages
215
+ - An account code that does not exist returns an empty list rather than an error — unlike `usaspending_get_federal_account`, these routes report no not-found signal
190
216
 
191
217
  ---
192
218
 
@@ -26,5 +26,3 @@ Five fixes across the error surface and the tool descriptions: upstream misses a
26
26
  ## Fixed
27
27
 
28
28
  - **Upstream 4xx misses no longer bypass the declared not-found contracts** on `usaspending_get_award`, `usaspending_get_recipient`, `usaspending_get_agency`, and `usaspending_get_federal_account` — `fetchWithTimeout` threw before each handler's existence check could run, so a miss surfaced as an unclassified fetch error with no `data.reason` and no recovery hint. A private `getEntity<T>()` helper now resolves `undefined` on the statuses that mean "no such entity" at these four endpoints (400 and 404, verified live per endpoint), letting each handler's `ctx.fail()` fire. The shared `get<T>()` primitive is untouched, so `listAgencies`, `getAgencySubAgencies`, `getAgencyBudgetaryResources`, and `getDisasterOverview` still surface their 4xx as real errors instead of empty successes; non-miss statuses — including the 422 the agency endpoint raises for an out-of-range `fiscal_year` — still propagate. ([#27](https://github.com/cyanheads/usaspending-mcp-server/issues/27))
29
- </content>
30
- </invoke>
@@ -0,0 +1,18 @@
1
+ ---
2
+ summary: "Federal account drill-down: usaspending_get_award_federal_accounts links an award to the accounts that funded it, usaspending_get_federal_account_breakdown adds the program-activity and object-class axes, and usaspending_get_federal_account now maps its per-Treasury-Account-Symbol children."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.3.0 — 2026-07-17
8
+
9
+ Three federal-account gaps close together: the award → appropriation chain gains its missing link, the program-activity and object-class breakdowns the README advertised now exist behind a tool, and the account response's own component detail is no longer discarded.
10
+
11
+ ## Added
12
+
13
+ - **`usaspending_get_award_federal_accounts`** — lists the Treasury federal accounts that funded an award (`POST /awards/accounts/`), with the amount obligated from each and the funding agency behind it. Each row's `federal_account` (`AGENCY-MAIN`, e.g. `080-0120`) chains into `usaspending_get_federal_account` as `account_code` — the award → appropriation link `usaspending_get_award`'s `account_obligations_by_defc` (DEF codes, not accounts) left open. Paginated via `page`/`limit` (max 100), with `page_metadata.count` the total across pages. A nonexistent `award_id` returns an empty list with a notice rather than an error: the endpoint answers a miss with HTTP 200 and zero rows, so no not-found contract can fire. ([#28](https://github.com/cyanheads/usaspending-mcp-server/issues/28))
14
+ - **`usaspending_get_federal_account_breakdown`** — breaks an account's obligations down along a `dimension`: `program_activity` (what the funds support) or `object_class` (what they buy), over `POST /federal_accounts/{code}/program_activities/total` and `.../object_classes/total`. Rows carry `code`, `name`, `obligations`, and — for `program_activity` only — `type`, either `PAC/PAN` (legacy program activity code/name pair) or `PARK` (Program Activity Reporting Key). Paginated via `page`/`limit` (max 100), with an honest `page_metadata.total`. An account code with no rows on the requested axis returns empty with a notice pointing at the other dimension. ([#31](https://github.com/cyanheads/usaspending-mcp-server/issues/31))
15
+
16
+ ## Fixed
17
+
18
+ - **`usaspending_get_federal_account` maps `children`** — the per-Treasury-Account-Symbol component breakdown was arriving in the response the tool already fetched and being discarded before it reached callers. Each row carries `name`, `code` (the full TAS, e.g. `080-2020/2021-0120-000` — the availability-period-scoped component, not an `account_code` this tool accepts), `obligated_amount`, `gross_outlay_amount`, and `budgetary_resources_amount`, rendered in `content[]` at parity with `structuredContent` and omitted entirely when upstream returns none. `RawFederalAccount.children` drops its `unknown[]` placeholder for the real `RawFederalAccountChild[]` row type. ([#41](https://github.com/cyanheads/usaspending-mcp-server/issues/41))
@@ -0,0 +1,30 @@
1
+ ---
2
+ summary: "@cyanheads/mcp-ts-core ^0.10.14 → ^0.11.0 (TypeScript 7, fetch-timeout Timeout reclassification, canonical error-data fields); every tool gains an api_timeout error contract entry; the two unreachable award_not_found contracts are removed; the changelog build now rejects leaked control markup in an entry body."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.3.1 — 2026-07-27
8
+
9
+ ## Added
10
+
11
+ - **`api_timeout`** error contract entry on all 18 tools — `@cyanheads/mcp-ts-core` 0.10.17 restored `Timeout` (-32004) classification for fetch timeouts, previously misclassified as `ServiceUnavailable`. The tool definitions now declare the contract the handlers already throw into, each with a recovery hint scoped to what that endpoint can narrow (a smaller `limit`, a shorter `time_period`, fewer filters).
12
+ - **`scripts/build-changelog.ts` rejects leaked control markup** in a per-version entry body — a whole line matching a bare angle-bracket tag (e.g. `</content>`, `<invoke name="...">`) hard-fails the rollup build, naming the file and line. Frontmatter was already validated; the body was not, and `changelog/0.2.x/0.2.9.md` shipped two such lines into the published npm tarball and GitHub release before this guard existed. New `tests/scripts/build-changelog.test.ts` covers the rejection and confirms inline angle brackets (`` post<T>() ``, `["<code>"]`) and standalone renderable HTML (`<details>`) stay accepted. ([#42](https://github.com/cyanheads/usaspending-mcp-server/issues/42))
13
+
14
+ ## Fixed
15
+
16
+ - **`usaspending_get_award_transactions` and `usaspending_get_award_subawards` drop their unreachable `award_not_found` contract** — both endpoints answer an unknown `award_id` with HTTP 200 and zero rows, which the handlers already disclose via an enrichment notice; the declared reason advertised a failure mode no input could produce. ([#49](https://github.com/cyanheads/usaspending-mcp-server/issues/49))
17
+ - **`USASpendingService` reads the framework's canonical `error.data.status`** field instead of the legacy `statusCode` alias, and threads `expectedStatuses` through `fetchWithTimeout` for the entity-lookup and agency sub-resource calls, so a routine upstream miss logs at `debug` instead of `error`.
18
+
19
+ ## Changed
20
+
21
+ - **`@cyanheads/mcp-ts-core`** `^0.10.14` → `^0.11.0`, spanning 0.10.15–0.11.0: TypeScript 7, `withRetry` honoring `Retry-After`, configurable logger rate limiting, and `.mcpb` bundles stripped of platform-specific native bindings — plus the template, script, and skill sync that came with it (`CLAUDE.md`, `scripts/devcheck.ts`, `scripts/check-dependency-specifiers.ts`, `scripts/clean-mcpb.ts`, `scripts/lint-packaging.ts`, and the `api-canvas`, `api-config`, `api-utils`, `field-test`, `git-wrapup`, `orchestrations`, `tool-defs-analysis` skills).
22
+ - **`.gitignore`** anchors `data/` to `/data/` — the unanchored pattern also matched `src/data/` and other nested `data/` directories.
23
+ - **`Dockerfile`** adds `--omit=dev --ignore-scripts` to the OTEL `bun add` in the production stage, so it no longer re-resolves the dev toolchain back into the final image.
24
+ - **`devcheck.config.json`** drops `typescript` from the `outdated` allowlist now that the server tracks the 7.x line.
25
+
26
+ ## Dependencies
27
+
28
+ - `@cyanheads/mcp-ts-core` `^0.10.14` → `^0.11.0`
29
+ - `typescript` `^6.0.3` → `^7.0.2`
30
+ - `@biomejs/biome` `^2.5.0` → `^2.5.5`
@@ -7,10 +7,10 @@ import { z } from '@cyanheads/mcp-ts-core';
7
7
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
8
8
  export declare const autocompleteTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
9
9
  type: z.ZodEnum<{
10
+ awarding_agency: "awarding_agency";
11
+ cfda: "cfda";
10
12
  naics: "naics";
11
13
  psc: "psc";
12
- cfda: "cfda";
13
- awarding_agency: "awarding_agency";
14
14
  recipient: "recipient";
15
15
  }>;
16
16
  search_text: z.ZodString;
@@ -37,6 +37,12 @@ export declare const autocompleteTool: import("@cyanheads/mcp-ts-core").ToolDefi
37
37
  readonly when: "USAspending.gov API is unreachable or returns an error.";
38
38
  readonly retryable: true;
39
39
  readonly recovery: "The API may be temporarily down. Retry the request after a few seconds.";
40
+ }, {
41
+ readonly reason: "api_timeout";
42
+ readonly code: JsonRpcErrorCode.Timeout;
43
+ readonly when: "USAspending.gov did not respond before the request deadline elapsed.";
44
+ readonly retryable: true;
45
+ readonly recovery: "Retry with a longer search_text and a smaller limit to shrink the match set.";
40
46
  }], {
41
47
  readonly lookup_type: z.ZodString;
42
48
  readonly query: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/autocomplete.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuL3B,CAAC"}
1
+ {"version":3,"file":"autocomplete.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/autocomplete.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8L3B,CAAC"}
@@ -78,6 +78,13 @@ export const autocompleteTool = tool('usaspending_autocomplete', {
78
78
  retryable: true,
79
79
  recovery: 'The API may be temporarily down. Retry the request after a few seconds.',
80
80
  },
81
+ {
82
+ reason: 'api_timeout',
83
+ code: JsonRpcErrorCode.Timeout,
84
+ when: 'USAspending.gov did not respond before the request deadline elapsed.',
85
+ retryable: true,
86
+ recovery: 'Retry with a longer search_text and a smaller limit to shrink the match set.',
87
+ },
81
88
  ],
82
89
  async handler(input, ctx) {
83
90
  ctx.log.info('usaspending_autocomplete', { type: input.type, search_text: input.search_text });
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/autocomplete.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,gBAAgB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IAC/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CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -7,11 +7,11 @@ import { z } from '@cyanheads/mcp-ts-core';
7
7
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
8
8
  export declare const disasterSpendingTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
9
9
  dimension: z.ZodEnum<{
10
- cfda: "cfda";
11
- recipient: "recipient";
12
- overview: "overview";
13
10
  agency: "agency";
11
+ cfda: "cfda";
14
12
  geography: "geography";
13
+ overview: "overview";
14
+ recipient: "recipient";
15
15
  }>;
16
16
  spending_type: z.ZodDefault<z.ZodEnum<{
17
17
  award: "award";
@@ -21,8 +21,8 @@ export declare const disasterSpendingTool: import("@cyanheads/mcp-ts-core").Tool
21
21
  def_codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
22
  award_type_codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
23
  geo_layer: z.ZodOptional<z.ZodEnum<{
24
- state: "state";
25
24
  county: "county";
25
+ state: "state";
26
26
  }>>;
27
27
  }, z.core.$strip>>;
28
28
  limit: z.ZodDefault<z.ZodNumber>;
@@ -71,6 +71,12 @@ export declare const disasterSpendingTool: import("@cyanheads/mcp-ts-core").Tool
71
71
  readonly when: "USAspending.gov API is unreachable or returns an error.";
72
72
  readonly retryable: true;
73
73
  readonly recovery: "The API may be temporarily down. Retry the request after a few seconds.";
74
+ }, {
75
+ readonly reason: "api_timeout";
76
+ readonly code: JsonRpcErrorCode.Timeout;
77
+ readonly when: "USAspending.gov did not respond before the request deadline elapsed.";
78
+ readonly retryable: true;
79
+ readonly recovery: "Narrow the query — fewer DEF codes in filters, or a smaller limit — then retry.";
74
80
  }], {
75
81
  readonly applied_dimension: z.ZodString;
76
82
  readonly totalCount: z.ZodOptional<z.ZodNumber>;
@@ -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;AAKlF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgY/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,EAAmB,MAAM,+BAA+B,CAAC;AAKlF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuY/B,CAAC"}
@@ -134,6 +134,13 @@ export const disasterSpendingTool = tool('usaspending_disaster_spending', {
134
134
  retryable: true,
135
135
  recovery: 'The API may be temporarily down. Retry the request after a few seconds.',
136
136
  },
137
+ {
138
+ reason: 'api_timeout',
139
+ code: JsonRpcErrorCode.Timeout,
140
+ when: 'USAspending.gov did not respond before the request deadline elapsed.',
141
+ retryable: true,
142
+ recovery: 'Narrow the query — fewer DEF codes in filters, or a smaller limit — then retry.',
143
+ },
137
144
  ],
138
145
  async handler(input, ctx) {
139
146
  ctx.log.info('usaspending_disaster_spending', {
@@ -1 +1 @@
1
- {"version":3,"file":"disaster-spending.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/disaster-spending.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,+BAA+B,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CAAC,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;gBAC3F,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;gBAC3E,KAAK,CAAC,IAAI,CACR,KAAK,KAAK,MAAM,EAAE,MAAM,IAAI,MAAM,KAAK,MAAM,KAAK,MAAM,MAAM,MAAM,GAAG,MAAM,UAAU,MAAM,SAAS,MAAM,KAAK,MAAM,MAAM,IAAI,CAClI,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"disaster-spending.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/disaster-spending.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAElF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,+BAA+B,EAAE;IACxE,KAAK,EAAE,iCAAiC;IACxC,WAAW,EACT,qgBAAqgB;IACvgB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE;IAE9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC;aACT,IAAI,CAAC,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CACR,KAAK,KAAK,MAAM,EAAE,MAAM,IAAI,MAAM,KAAK,MAAM,KAAK,MAAM,MAAM,MAAM,GAAG,MAAM,UAAU,MAAM,SAAS,MAAM,KAAK,MAAM,MAAM,IAAI,CAClI,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -54,6 +54,12 @@ export declare const getAgencyTool: import("@cyanheads/mcp-ts-core").ToolDefinit
54
54
  readonly when: "USAspending.gov API is unreachable or returns an error.";
55
55
  readonly retryable: true;
56
56
  readonly recovery: "The API may be temporarily down. Retry the request after a few seconds.";
57
+ }, {
58
+ readonly reason: "api_timeout";
59
+ readonly code: JsonRpcErrorCode.Timeout;
60
+ readonly when: "USAspending.gov did not respond before the request deadline elapsed.";
61
+ readonly retryable: true;
62
+ readonly recovery: "Retry the request; the sub-agency page is the slow part, so request one page.";
57
63
  }], {
58
64
  readonly sub_agency_page: z.ZodNumber;
59
65
  readonly has_more_sub_agencies: z.ZodBoolean;
@@ -1 +1 @@
1
- {"version":3,"file":"get-agency.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-agency.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAQjE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsUxB,CAAC"}
1
+ {"version":3,"file":"get-agency.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-agency.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAQjE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6UxB,CAAC"}