Skip to main content
Glama

search_muscles

Find muscle IDs by searching muscle names to identify target muscles before locating exercises that work them.

Instructions

Search for muscles by name. Returns matching muscle IDs and names. Use this to discover muscle IDs before calling find_exercises.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (e.g. 'chest', 'bicep', 'quad')

Implementation Reference

  • src/tools.ts:165-183 (registration)
    The 'search_muscles' tool is defined and registered using server.tool in src/tools.ts. It takes a 'query' input and invokes client.searchMuscles(query).
    server.tool(
      "search_muscles",
      "Search for muscles by name. Returns matching muscle IDs and names. " +
        "Use this to discover muscle IDs before calling find_exercises.",
      {
        query: z
          .string()
          .min(2)
          .describe("Search query (e.g. 'chest', 'bicep', 'quad')"),
      },
      async ({ query }) => {
        try {
          const result = await client.searchMuscles(query);
          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 searchMuscles method that performs the network request/logic.
    async searchMuscles(query: string): Promise<unknown> {
      return this.request(`/api/v1/search/muscles?q=${encodeURIComponent(query)}`);
    }

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