Skip to main content
Glama

analyze_workout

Analyze workout routines to identify muscle coverage, detect imbalances, and find gaps in exercise selection for balanced training.

Instructions

Analyze a workout for muscle coverage, gaps, and imbalances. Pass a list of exercise names or IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exercisesYesList of exercise IDs or names

Implementation Reference

  • Registration of the 'analyze_workout' tool and its handler in src/tools.ts.
    server.tool(
      "analyze_workout",
      "Analyze a workout for muscle coverage, gaps, and imbalances. " +
        "Pass a list of exercise names or IDs.",
      {
        exercises: z
          .array(z.string())
          .min(1)
          .describe("List of exercise IDs or names"),
      },
      async ({ exercises }) => {
        try {
          const result = await client.analyzeWorkout(exercises);
          return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
        } catch (err) {
          return { content: [{ type: "text", text: formatError(err) }], isError: true };
        }
      },
    );
  • The actual implementation of the analyzeWorkout method that calls the API, used by the MCP tool.
    async analyzeWorkout(exercises: string[]): Promise<unknown> {
      return this.request("/api/v1/workouts/analyze", {
        method: "POST",
        body: JSON.stringify({ exercises }),
      });
    }

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/csjoblom/musclesworked-mcp'

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