Skip to main content
Glama
vuvuvu

StreamerSongList MCP Server

by vuvuvu

searchSongs

Search a streamer's song list for songs matching a title or artist query. Returns up to 20 results.

Instructions

Search within a streamer's song list by title or artist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
streamerNameNoThe name of the streamer whose songs to search
queryYesSearch query to match against song titles and artists
limitNoMaximum number of results to return (default: 20)

Implementation Reference

  • src/index.ts:119-141 (registration)
    Tool registration/schema definition for searchSongs in the TypeScript implementation. Defines name='searchSongs', description, and inputSchema with streamerName (string), query (string, required), and limit (number, default 20).
    {
      name: "searchSongs",
      description: "Search within a streamer's song list by title or artist",
      inputSchema: {
        type: "object",
        properties: {
          streamerName: {
            type: "string",
            description: "The name of the streamer whose songs to search",
          },
          query: {
            type: "string",
            description: "Search query to match against song titles and artists",
          },
          limit: {
            type: "number",
            description: "Maximum number of results to return (default: 20)",
            default: 20,
          },
        },
        required: ["query"],
      },
    },
  • Handler implementation for searchSongs in the TypeScript version. Extracts streamerName, query, and limit from args, calls the API with a search query parameter, and returns the filtered results.
    case "searchSongs": {
      const streamerName = getEffectiveStreamer((args as any)?.streamerName);
      const query = (args as any)?.query;
      const limit = (args as any)?.limit || 20;
      const data = await makeApiRequest(`/streamers/${encodeURIComponent(streamerName)}/songs?search=${encodeURIComponent(query)}&limit=${limit}`);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • src/server.js:214-236 (registration)
    Tool registration/schema definition for searchSongs in the JavaScript implementation. Same schema definition with name, description, and inputSchema (streamerName optional string, query required string, limit number default 20).
    {
      name: "searchSongs",
      description: "Search within a streamer's song list by title or artist",
      inputSchema: {
        type: "object",
        properties: {
          streamerName: {
            type: "string",
            description: "The name of the streamer whose songs to search",
          },
          query: {
            type: "string",
            description: "Search query to match against song titles and artists",
          },
          limit: {
            type: "number",
            description: "Maximum number of results to return (default: 20)",
            default: 20,
          },
        },
        required: ["query"],
      },
    },
  • Handler implementation for searchSongs in the JavaScript version. Fetches up to 1000 songs, filters locally by matching query against song title or artist (case-insensitive), slices to limit, and returns results.
    case "searchSongs": {
      const { streamerName = defaultStreamer, query, limit = 20 } = args;
    
      if (!streamerName) {
        throw new Error(
          "streamerName is required. Provide a streamerName or set the DEFAULT_STREAMER environment variable."
        );
      }
    
      if (!query) {
        throw new Error("query is required for song search");
      }
    
      try {
        // First get all songs, then filter locally
        const response = await fetch(`${API_BASE}/streamers/${encodeURIComponent(streamerName)}/songs?limit=1000`);
    
        if (!response.ok) {
          return {
            content: [{
              type: "text",
              text: `Error fetching songs for search: ${response.status} ${response.statusText}`
            }]
          };
        }
    
        const songsData = await response.json();
        const allSongs = songsData.items || songsData; // Handle different response formats
        const searchQuery = query.toLowerCase();
    
        // Filter songs by title or artist
        const filteredSongs = allSongs.filter(song => {
          const title = (song.title || '').toLowerCase();
          const artist = (song.artist || '').toLowerCase();
          return title.includes(searchQuery) || artist.includes(searchQuery);
        }).slice(0, limit);
    
        return {
          content: [{
            type: "text",
            text: `Found ${filteredSongs.length} songs matching "${query}":\n${JSON.stringify(filteredSongs, null, 2)}`
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`
          }]
        };
      }
    }
Behavior2/5

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

No annotations provided, so description bears full responsibility. It only states basic action; missing behavioral traits like case sensitivity, partial match behavior, what happens on no results, or return format.

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?

Single sentence with 10 words, no redundancy. Efficiently conveyed purpose without extraneous content.

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 no output schema and low complexity, description could have stated expected return format or example usage. It lacks enough context for an agent to fully understand invocation consequences.

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%, so parameters are already documented. Description adds 'by title or artist' which reiterates schema description for query. No additional semantic value beyond what schema provides.

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

Purpose5/5

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

Description clearly states verb 'Search', resource 'streamer's song list', and criteria 'by title or artist'. It distinguishes from sibling tools like getSongs by implying filtering, so purpose is specific and differentiated.

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?

No guidance on when to use this tool vs alternatives. For example, it doesn't clarify that getSongs might be better for listing all songs, or that searchSongs is for targeted lookups.

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/vuvuvu/streamersonglist-mcp'

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