Skip to main content
Glama

get-routine-folder

Retrieve detailed information about a specific routine folder by its ID using the Hevy MCP server. Access folder title, order position, and creation/update timestamps for efficient workout management.

Instructions

Get complete details of a specific routine folder by ID. Returns all folder information including title, index (order position), and creation/update timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderIdYes

Implementation Reference

  • Handler function that fetches the routine folder by ID using hevyClient.getRoutineFolder, checks if data exists, formats it with formatRoutineFolder, and returns a JSON response or empty response if not found.
    withErrorHandling(async ({ folderId }: { folderId: string }) => { if (!hevyClient) { throw new Error( "API client not initialized. Please provide HEVY_API_KEY.", ); } const data = await hevyClient.getRoutineFolder(folderId); if (!data) { return createEmptyResponse( `Routine folder with ID ${folderId} not found`, ); } const folder = formatRoutineFolder(data); return createJsonResponse(folder); }, "get-routine-folder"),
  • Zod input schema for the tool: requires a 'folderId' string parameter.
    { folderId: z.string().min(1), },
  • Registers the 'get-routine-folder' MCP tool with server.tool, including name, description, input schema, and wrapped handler.
    server.tool( "get-routine-folder", "Get complete details of a specific routine folder by its ID, including name, creation date, and associated routines.", { folderId: z.string().min(1), }, withErrorHandling(async ({ folderId }: { folderId: string }) => { if (!hevyClient) { throw new Error( "API client not initialized. Please provide HEVY_API_KEY.", ); } const data = await hevyClient.getRoutineFolder(folderId); if (!data) { return createEmptyResponse( `Routine folder with ID ${folderId} not found`, ); } const folder = formatRoutineFolder(data); return createJsonResponse(folder); }, "get-routine-folder"), );

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/chrisdoc/hevy-mcp'

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