get_single_series
Retrieve U.S. labor statistics data for a specific time series from the Bureau of Labor Statistics for the past three years by providing a valid series ID.
Instructions
Retrieve data for a single BLS time series for the past three years. Provide a valid BLS series ID (uppercase letters, numbers, underscores, dashes, hashes only).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| series_id | Yes | BLS series ID, e.g. LAUCN040010000000005 |
Implementation Reference
- src/tools/series.ts:34-41 (handler)The handler function for the get_single_series tool, which calls the client's getSingleSeries method.
async ({ series_id }) => { try { const data = await client.getSingleSeries(series_id); return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; } catch (error) { return wrapError(error); } } - src/tools/series.ts:24-42 (registration)Tool registration for get_single_series using server.tool.
server.tool( "get_single_series", "Retrieve data for a single BLS time series for the past three years. " + "Provide a valid BLS series ID (uppercase letters, numbers, underscores, dashes, hashes only).", { series_id: z .string() .regex(SERIES_ID_PATTERN, "Series ID must be uppercase with no special characters except _, -, #") .describe("BLS series ID, e.g. LAUCN040010000000005"), }, async ({ series_id }) => { try { const data = await client.getSingleSeries(series_id); return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; } catch (error) { return wrapError(error); } } );