Skip to main content
Glama

get_multiple_series

Retrieve U.S. labor statistics time series data for up to 50 economic indicators from the Bureau of Labor Statistics API. Specify date ranges and optional data enhancements for comprehensive economic analysis.

Instructions

Retrieve data for one or more BLS time series. Registered users can include up to 50 series IDs. Optionally specify start/end years (up to 20-year range), and enable catalog, calculations, annual averages, or aspects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
series_idsYesArray of BLS series IDs
start_yearNoStart year in YYYY format
end_yearNoEnd year in YYYY format
catalogNoInclude catalog data (requires registration key)
calculationsNoInclude calculations such as net and percent changes (requires registration key)
annual_averageNoInclude annual average data (requires registration key)
aspectsNoInclude aspect data (requires registration key)

Implementation Reference

  • The handler implementation for get_multiple_series, which calls client.getSeriesData and wraps the response or errors.
      async ({ series_ids, start_year, end_year, catalog, calculations, annual_average, aspects }) => {
        try {
          const data = await client.getSeriesData({
            seriesid: series_ids,
            startyear: start_year,
            endyear: end_year,
            catalog,
            calculations,
            annualaverage: annual_average,
            aspects,
          });
          return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          return wrapError(error);
        }
      }
    );
  • Zod schema validation for input parameters of get_multiple_series.
    {
      series_ids: z
        .array(
          z.string().regex(SERIES_ID_PATTERN, "Each series ID must be uppercase with no special characters except _, -, #")
        )
        .min(1)
        .max(50)
        .describe("Array of BLS series IDs"),
      start_year: z
        .string()
        .regex(/^\d{4}$/, "Must be a 4-digit year")
        .optional()
        .describe("Start year in YYYY format"),
      end_year: z
        .string()
        .regex(/^\d{4}$/, "Must be a 4-digit year")
        .optional()
        .describe("End year in YYYY format"),
      catalog: z
        .boolean()
        .optional()
        .describe("Include catalog data (requires registration key)"),
      calculations: z
        .boolean()
        .optional()
        .describe("Include calculations such as net and percent changes (requires registration key)"),
      annual_average: z
        .boolean()
        .optional()
        .describe("Include annual average data (requires registration key)"),
      aspects: z
        .boolean()
        .optional()
        .describe("Include aspect data (requires registration key)"),
    },
  • MCP tool registration for get_multiple_series.
    server.tool(
      "get_multiple_series",
      "Retrieve data for one or more BLS time series. " +
        "Registered users can include up to 50 series IDs. " +
        "Optionally specify start/end years (up to 20-year range), " +
        "and enable catalog, calculations, annual averages, or aspects.",

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/larasrinath/bls_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server