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
| Name | Required | Description | Default |
|---|---|---|---|
| folderId | Yes |
Implementation Reference
- src/tools/folders.ts:69-85 (handler)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"),
- src/tools/folders.ts:66-68 (schema)Zod input schema for the tool: requires a 'folderId' string parameter.{ folderId: z.string().min(1), },
- src/tools/folders.ts:63-86 (registration)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"), );