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"),
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the tool as a read operation ('Get') and specifies the return content, but it doesn't cover important aspects like error handling (e.g., what happens if the ID is invalid), authentication needs, rate limits, or whether the operation is idempotent. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and well-structured, consisting of two sentences that efficiently convey the tool's purpose and return value. The first sentence states the action and input, while the second details the output, with no redundant or unnecessary information. It's front-loaded and every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a simple read operation with one parameter) and the lack of annotations and output schema, the description is moderately complete. It covers the basic purpose and return content but misses behavioral details and doesn't fully compensate for the missing structured data. It's adequate for minimal understanding but has clear gaps for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one parameter ('folderId') with 0% description coverage, meaning the schema provides no semantic details. The description adds value by explaining that 'folderId' is used to identify 'a specific routine folder,' but it doesn't specify format constraints (e.g., integer range) or examples. Since schema coverage is low, the description partially compensates but doesn't fully document the parameter's meaning, resulting in a baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get complete details of a specific routine folder by ID.' It specifies the verb ('Get'), resource ('routine folder'), and scope ('by ID'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get-routine-folders' (which likely lists multiple folders), so it misses the top score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning 'by ID,' which suggests this tool is for retrieving details of a single, known folder. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'get-routine-folders' (for listing folders) or other 'get-' tools, nor does it mention prerequisites or exclusions. The usage is contextually implied but not fully articulated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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