Skip to main content
Glama

create-routine-folder

Generate a new routine folder in your Hevy account, placing it at index 0 and incrementing existing folder indexes. Returns folder details including the assigned ID for immediate use.

Instructions

Create a new routine folder in your Hevy account. The folder will be created at index 0, and all other folders will have their indexes incremented. Returns the complete folder details upon successful creation including the newly assigned folder ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes

Implementation Reference

  • The handler function for the 'create-routine-folder' tool. It checks if hevyClient is available, calls hevyClient.createRoutineFolder with the folder title set to the input 'name', handles errors, formats the result using formatRoutineFolder, and returns a JSON response.
    withErrorHandling(async ({ name }: { name: string }) => {
    	if (!hevyClient) {
    		throw new Error(
    			"API client not initialized. Please provide HEVY_API_KEY.",
    		);
    	}
    	const data = await hevyClient.createRoutineFolder({
    		routine_folder: {
    			title: name,
    		},
    	});
    
    	if (!data) {
    		return createEmptyResponse(
    			"Failed to create routine folder: Server returned no data",
    		);
    	}
    
    	const folder = formatRoutineFolder(data);
    	return createJsonResponse(folder, {
    		pretty: true,
    		indent: 2,
    	});
    }, "create-routine-folder"),
  • Input schema for the 'create-routine-folder' tool, defining a required 'name' parameter as a non-empty string using Zod.
    {
    	name: z.string().min(1),
    },
  • Registration of the 'create-routine-folder' tool on the MCP server, including name, description, input schema, and handler wrapped in error handling.
    server.tool(
    	"create-routine-folder",
    	"Create a new routine folder in your Hevy account. Requires a name for the folder. Returns the full folder details including the new folder ID.",
    	{
    		name: z.string().min(1),
    	},
    	withErrorHandling(async ({ name }: { name: string }) => {
    		if (!hevyClient) {
    			throw new Error(
    				"API client not initialized. Please provide HEVY_API_KEY.",
    			);
    		}
    		const data = await hevyClient.createRoutineFolder({
    			routine_folder: {
    				title: name,
    			},
    		});
    
    		if (!data) {
    			return createEmptyResponse(
    				"Failed to create routine folder: Server returned no data",
    			);
    		}
    
    		const folder = formatRoutineFolder(data);
    		return createJsonResponse(folder, {
    			pretty: true,
    			indent: 2,
    		});
    	}, "create-routine-folder"),
    );
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the mutation effect ('Create a new routine folder'), the side effect on other folders ('all other folders will have their indexes incremented'), and the return value ('Returns the complete folder details... including the newly assigned folder ID'), covering key behavioral traits beyond basic functionality.

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 appropriately sized and front-loaded, with the first sentence stating the core purpose. Each subsequent sentence adds valuable information (index behavior, return details) without redundancy, making it efficient and well-structured.

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

Completeness4/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 mutation with side effects), no annotations, and no output schema, the description does a good job by explaining the creation action, index impact, and return format. However, it lacks details on error conditions or authentication needs, leaving some gaps in completeness for a mutation tool.

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 0% description coverage, so the description must compensate. It does not mention the 'title' parameter at all, leaving its purpose and constraints undocumented. However, with only one parameter, the baseline is higher, but the description fails to add any semantic information about the parameter, resulting in a minimal viable score.

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

Purpose5/5

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

The description clearly states the specific action ('Create a new routine folder') and resource ('in your Hevy account'), distinguishing it from sibling tools like 'create-routine' or 'create-workout' that create different entities. It precisely identifies what the tool does without being tautological.

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 for creating routine folders but does not explicitly state when to use this tool versus alternatives like 'create-routine' or 'get-routine-folders'. It mentions the folder will be created at index 0 with other folders incremented, which provides some context but lacks explicit guidance on prerequisites or exclusions.

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