Skip to main content
Glama

get_survey

Retrieve metadata for Bureau of Labor Statistics surveys using survey abbreviations to access employment, CPI, and wage data specifications.

Instructions

Retrieve metadata for a single BLS survey by its abbreviation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
survey_abbreviationYesSurvey abbreviation, e.g. TU, CU, LA

Implementation Reference

  • The actual implementation of the getSurvey logic which fetches data from the API.
    async getSurvey(surveyAbbreviation: string): Promise<unknown> {
      try {
        const response = await this.http.get(
          `/surveys/${surveyAbbreviation}`
        );
        return response.data;
      } catch (error) {
        this.handleError(error);
  • The MCP tool registration and handler wrapper for get_survey.
    server.tool(
      "get_survey",
      "Retrieve metadata for a single BLS survey by its abbreviation.",
      {
        survey_abbreviation: z
          .string()
          .regex(/^[A-Z]{2}$/, "Survey abbreviation must be exactly 2 uppercase letters")
          .describe("Survey abbreviation, e.g. TU, CU, LA"),
      },
      async ({ survey_abbreviation }) => {
        try {
          const data = await client.getSurvey(survey_abbreviation);
          return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          return wrapError(error);
        }
      }
    );

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