Skip to main content
Glama

get_alternatives

Find alternative exercises based on muscle overlap scores to replace or supplement workouts while targeting similar muscle groups.

Instructions

Find alternative exercises ranked by muscle overlap score. Use search_exercises first if you don't know the exercise ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exerciseYesExercise ID or name
limitNoMax results (default: 10)

Implementation Reference

  • The implementation of getAlternatives in the MusclesWorkedClient that makes the API request.
    async getAlternatives(exercise: string, limit?: number): Promise<unknown> {
      const params = limit !== undefined ? `?limit=${limit}` : "";
      return this.request(
        `/api/v1/exercises/${encodeURIComponent(exercise)}/alternatives${params}`,
      );
    }
  • src/tools.ts:121-143 (registration)
    Registration of the get_alternatives MCP tool.
    server.tool(
      "get_alternatives",
      "Find alternative exercises ranked by muscle overlap score. " +
        "Use search_exercises first if you don't know the exercise ID.",
      {
        exercise: z.string().describe("Exercise ID or name"),
        limit: z
          .number()
          .int()
          .min(1)
          .max(50)
          .optional()
          .describe("Max results (default: 10)"),
      },
      async ({ exercise, limit }) => {
        try {
          const result = await client.getAlternatives(exercise, limit);
          return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
        } catch (err) {
          return { content: [{ type: "text", text: formatError(err) }], isError: true };
        }
      },
    );

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