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
| Name | Required | Description | Default |
|---|---|---|---|
| survey_abbreviation | Yes | Survey abbreviation, e.g. TU, CU, LA |
Implementation Reference
- src/client.ts:118-125 (handler)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); - src/tools/surveys.ts:57-74 (registration)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); } } );