Skip to main content
Glama
vuvuvu

StreamerSongList MCP Server

by vuvuvu

searchSongs

Search and filter songs by title, artist, or genre with customizable limits and pagination to manage song requests effectively on streaming platforms.

Instructions

Search the song database with various filters and criteria

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
artistNoFilter by specific artist name
genreNoFilter by music genre
limitNoMaximum number of songs to return (default: 50)
offsetNoNumber of songs to skip for pagination (default: 0)
queryNoSearch query for song title or artist

Implementation Reference

  • Handler function for the 'searchSongs' tool. Fetches search results from the StreamerSongList API using a search query parameter on the songs endpoint.
    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), }, ], }; }
  • Input schema and metadata for the 'searchSongs' tool, defining parameters like streamerName, query (required), and limit.
    { 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"], }, },
  • Alternative handler for 'searchSongs' in the standalone server.js implementation. Fetches a large song list and performs client-side filtering by title or artist.
    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'}` }] }; } }
  • Input schema and metadata for the 'searchSongs' tool in server.js, matching the TypeScript version.
    { 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"], }, },

Other Tools

Related 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