get_routine_folder
Retrieve a routine folder by its unique folder ID. Access organized workout routines for efficient training management.
Instructions
Fetch a single routine folder by id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/hevy_mcp/tools/folders.py:20-24 (handler)The handler function for `get_routine_folder`. Fetches a single routine folder by its ID via GET /routine_folders/{folder_id}.
@mcp.tool() @tool_guard async def get_routine_folder(folder_id: int) -> dict[str, Any]: """Fetch a single routine folder by id.""" return {"data": await client.get(f"/routine_folders/{folder_id}")} - src/hevy_mcp/tools/__init__.py:6-12 (registration)Registration entry point. `register_all` calls `folders.register(mcp, ctx)`, which registers `get_routine_folder` as an MCP tool (inside folders.py).
def register_all(mcp, ctx) -> None: workouts.register(mcp, ctx) routines.register(mcp, ctx) folders.register(mcp, ctx) templates.register(mcp, ctx) webhooks.register(mcp, ctx) analytics.register(mcp, ctx) - src/hevy_mcp/tools/folders.py:10-24 (registration)The `register` function in folders.py that uses @mcp.tool() decorator to register `get_routine_folder` as an MCP tool.
def register(mcp, ctx) -> None: client = ctx.client @mcp.tool() @tool_guard async def list_routine_folders(page: int = 1, page_size: int = 10) -> dict[str, Any]: """List the user's routine folders (e.g. 'Push/Pull/Legs', 'Hypertrophy Block').""" return {"data": await client.get("/routine_folders", params={"page": page, "pageSize": page_size})} @mcp.tool() @tool_guard async def get_routine_folder(folder_id: int) -> dict[str, Any]: """Fetch a single routine folder by id.""" return {"data": await client.get(f"/routine_folders/{folder_id}")}