Economic Data Changes
econ_changesRetrieve recent updates to economic indicators from FRED, BLS, and BEA by specifying a timestamp. Track changes to datasets with a pay-per-query model.
Instructions
Get recent changes to economic data since a given timestamp. Cost: $0.005 per query. Source: FRED, BLS, BEA.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | Yes | ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z) | |
| limit | No | Maximum results (default 50) |
Implementation Reference
- src/tools/econ.ts:215-264 (registration)The 'registerEconTools' function is called from src/index.ts, and within it, server.registerTool('econ_changes', ...) registers the tool. The handler, schema, and registration are all in one block.
// ── Change feed ─────────────────────────────────────────────────────── server.registerTool( "econ_changes", { title: "Economic Data Changes", description: "Get recent changes to economic data since a given timestamp. " + "Cost: $0.005 per query. Source: FRED, BLS, BEA.", inputSchema: { since: z .string() .describe("ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z)"), limit: z .number() .int() .min(1) .max(100) .optional() .describe("Maximum results (default 50)"), }, }, async ({ since, limit }) => { const res = await apiGet<EconQueryResponse>("/api/v1/econ/changes", { since, limit: limit ?? 50, }); if (!res.ok) { return { content: [ { type: "text" as const, text: `API error (${res.status}): ${JSON.stringify(res.data)}`, }, ], isError: true, }; } const { count, data } = res.data; const warn = stalenessWarning(res); const summary = `${warn}Found ${count} economic data change(s) since ${since}.`; const json = JSON.stringify(data, null, 2); return { content: [{ type: "text" as const, text: `${summary}\n\n${json}` }], }; }, ); - src/tools/econ.ts:219-236 (schema)Input schema definition for the econ_changes tool, defining 'since' (required ISO 8601 string) and 'limit' (optional int, 1-100, default 50) parameters.
{ title: "Economic Data Changes", description: "Get recent changes to economic data since a given timestamp. " + "Cost: $0.005 per query. Source: FRED, BLS, BEA.", inputSchema: { since: z .string() .describe("ISO 8601 timestamp to get changes since (e.g. 2026-03-01T00:00:00Z)"), limit: z .number() .int() .min(1) .max(100) .optional() .describe("Maximum results (default 50)"), }, }, - src/tools/econ.ts:237-263 (handler)The async handler function for econ_changes. It calls apiGet to "/api/v1/econ/changes" with 'since' and 'limit' params, handles errors, and returns the data as text content.
async ({ since, limit }) => { const res = await apiGet<EconQueryResponse>("/api/v1/econ/changes", { since, limit: limit ?? 50, }); if (!res.ok) { return { content: [ { type: "text" as const, text: `API error (${res.status}): ${JSON.stringify(res.data)}`, }, ], isError: true, }; } const { count, data } = res.data; const warn = stalenessWarning(res); const summary = `${warn}Found ${count} economic data change(s) since ${since}.`; const json = JSON.stringify(data, null, 2); return { content: [{ type: "text" as const, text: `${summary}\n\n${json}` }], }; }, - src/index.ts:57-57 (registration)Registration call: registerEconTools(server) is invoked in the createMcpServer() function, registering all econ tools including econ_changes on the MCP server.
registerEconTools(server);