econ_stats
Access economic indicators dataset statistics including total series, categories, date ranges, and source information from FRED/BLS data sources.
Instructions
Get statistics about the economic indicators dataset: total series, categories covered, date range, and data source information. Free endpoint.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/econ.ts:268-298 (handler)The 'econ_stats' tool is registered and implemented within the 'registerEconTools' function in 'src/tools/econ.ts'. It uses the 'apiGet' helper to fetch data from the '/api/v1/econ/stats' endpoint.
server.registerTool( "econ_stats", { title: "Economic Dataset Statistics", description: "Get statistics about the economic indicators dataset: total series, " + "categories covered, date range, and data source information. Free endpoint.", inputSchema: {}, }, async () => { const res = await apiGet<EconStatsResponse>("/api/v1/econ/stats"); if (!res.ok) { return { content: [ { type: "text" as const, text: `API error (${res.status}): ${JSON.stringify(res.data)}`, }, ], isError: true, }; } return { content: [ { type: "text" as const, text: JSON.stringify(res.data, null, 2) }, ], }; }, ); - src/tools/econ.ts:22-27 (schema)The 'EconStatsResponse' interface defines the expected structure of the data returned by the 'econ_stats' tool.
interface EconStatsResponse { dataset: string; source: string; update_frequency: string; stats: Record<string, unknown>; }