Skip to main content
Glama

search_exercises

Find exercise IDs by searching for specific workout movements to analyze muscle activation or discover alternatives.

Instructions

Search for exercises by name. Returns matching exercise IDs and names. Use this to discover exercise IDs before calling get_muscles_worked or get_alternatives.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (e.g. 'bench press', 'squat')

Implementation Reference

  • Registration and handler definition for the search_exercises tool.
    server.tool(
      "search_exercises",
      "Search for exercises by name. Returns matching exercise IDs and names. " +
        "Use this to discover exercise IDs before calling get_muscles_worked or get_alternatives.",
      {
        query: z
          .string()
          .min(2)
          .describe("Search query (e.g. 'bench press', 'squat')"),
      },
      async ({ query }) => {
        try {
          const result = await client.searchExercises(query);
          return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
        } catch (err) {
          return { content: [{ type: "text", text: formatError(err) }], isError: true };
        }
      },
    );
  • The actual API request implementation for searching exercises.
    async searchExercises(query: string): Promise<unknown> {
      return this.request(`/api/v1/search/exercises?q=${encodeURIComponent(query)}`);
    }
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses return content ('matching exercise IDs and names') which compensates for the missing output schema. However, lacks other behavioral traits: no mention of result limits, pagination, case sensitivity, or exact vs fuzzy matching behavior.

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?

Three sentences with zero waste: 1) purpose, 2) return value, 3) workflow guidance. Each earns its place; no redundancy with structured fields. Appropriately front-loaded.

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?

For a single-parameter search tool with simple string input, the description adequately covers the discovery workflow and return format. Could be improved by noting result limits or error behaviors, but sufficient given the low complexity and high schema coverage.

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?

Schema coverage is 100% (query parameter has description with examples). The description does not add parameter-specific semantics (e.g., syntax rules, formatting), but the schema is self-documenting, warranting the baseline score of 3.

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

Purpose4/5

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

Clear verb ('Search'), resource ('exercises'), and scope ('by name'). Mentions return values (IDs and names) to clarify output. However, does not distinguish from sibling 'find_exercises', which appears to serve a similar discovery function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the workflow position: 'Use this to discover exercise IDs before calling get_muscles_worked or get_alternatives.' This establishes prerequisites and relationships with specific sibling tools, providing clear when-to-use guidance.

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

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