get_muscles_worked
Identify primary, secondary, and stabilizer muscles targeted by specific exercises to optimize workout planning and muscle coverage analysis.
Instructions
Get the primary, secondary, and stabilizer muscles worked by an exercise. Use search_exercises first if you don't know the exercise ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exercise | Yes | Exercise ID or name (e.g. 'barbell_bench_press') |
Implementation Reference
- src/tools.ts:34-46 (handler)The MCP tool definition and handler for 'get_muscles_worked'. It uses the provided MusclesWorkedClient to fetch data and handles potential errors using the formatError helper.
server.tool( "get_muscles_worked", "Get the primary, secondary, and stabilizer muscles worked by an exercise. " + "Use search_exercises first if you don't know the exercise ID.", { exercise: z.string().describe("Exercise ID or name (e.g. 'barbell_bench_press')") }, async ({ exercise }) => { try { const result = await client.getMusclesWorked(exercise); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (err) { return { content: [{ type: "text", text: formatError(err) }], isError: true }; } },