Skip to main content
Glama
TaylorChen

Multi-MCPs

by TaylorChen

search_tracks

Find music tracks on Spotify by entering search terms. This tool helps users discover songs, artists, or albums through the Multi-MCPs server's integrated services.

Instructions

Search tracks on Spotify

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo

Implementation Reference

  • The handler function for the 'search_tracks' MCP tool. It validates the input arguments, checks configuration, and calls the SpotifyClient's searchTracks method to perform the search.
    async search_tracks(args: Record<string, unknown>) {
      if (!cfg.spotifyClientId || !cfg.spotifyClientSecret) throw new Error("SPOTIFY_CLIENT_ID/SECRET are not configured");
      const query = String(args.query || "");
      if (!query) throw new Error("query is required");
      const limit = args.limit ? Number(args.limit) : undefined;
      return client.searchTracks(query, limit);
    },
  • Registration of the 'search_tracks' tool in the tools array of the ToolRegistration object returned by registerSpotify().
    {
      name: "search_tracks",
      description: "Search tracks on Spotify",
      inputSchema: {
        type: "object",
        properties: { query: { type: "string" }, limit: { type: "number" } },
        required: ["query"],
      },
    },
  • Input schema defining the expected parameters for the 'search_tracks' tool: query (required string) and optional limit (number).
    inputSchema: {
      type: "object",
      properties: { query: { type: "string" }, limit: { type: "number" } },
      required: ["query"],
  • Helper method on SpotifyClient class that makes the actual Spotify API request to search for tracks.
    async searchTracks(query: string, limit?: number) {
      return this.request("/search", {
        headers: await this.authHeaders(),
        query: { q: query, type: "track", limit: limit ?? 10 },
      });
    }
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the action without any details on permissions, rate limits, response format, or error handling. For a search tool with no annotation coverage, this is a significant gap, offering no transparency beyond the basic purpose.

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?

The description is a single, efficient sentence with zero waste, making it highly concise and front-loaded. It directly states the tool's purpose without unnecessary elaboration, which is appropriate for a simple search function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (search with parameters), lack of annotations, no output schema, and low schema coverage, the description is incomplete. It does not cover behavioral aspects, parameter details, or return values, making it inadequate for effective agent use beyond the most basic understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and 2 parameters, the description adds no meaning beyond the schema. It does not explain what 'query' should contain (e.g., track name, artist) or how 'limit' affects results (e.g., default value, range). The description fails to compensate for the lack of schema documentation.

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

Purpose3/5

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

The description states the action ('search') and resource ('tracks on Spotify'), which is clear but basic. It does not differentiate from sibling tools like 'search_news' or 'search_photos', which follow a similar pattern, making it vague in comparison. However, it avoids tautology by not merely restating the name.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, such as 'get_track_info' for specific track details or other search tools for different resources. There is no mention of context, exclusions, or prerequisites, leaving usage entirely implicit.

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/TaylorChen/muti-mcps'

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