Skip to main content
Glama
vuvuvu

StreamerSongList MCP Server

by vuvuvu

getSongs

Fetch a streamer's complete song list with pagination support to manage and display music requests during live broadcasts.

Instructions

Fetch the complete song list for a streamer with pagination support

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
streamerNameNoThe name of the streamer whose song list to fetch
limitNoMaximum number of songs to return (default: 100)
offsetNoNumber of songs to skip for pagination (default: 0)

Implementation Reference

  • The core handler logic for the 'getSongs' tool. It extracts parameters (streamerName, limit, offset), calls the API endpoint `/streamers/{streamerName}/songs?limit={limit}&offset={offset}`, and returns the JSON response as text content.
    case "getSongs": { const streamerName = getEffectiveStreamer((args as any)?.streamerName); const limit = (args as any)?.limit || 100; const offset = (args as any)?.offset || 0; const data = await makeApiRequest(`/streamers/${encodeURIComponent(streamerName)}/songs?limit=${limit}&offset=${offset}`); return { content: [ { type: "text", text: JSON.stringify(data, null, 2), }, ], }; }
  • src/index.ts:95-118 (registration)
    Tool registration entry in the tools array used for ListToolsRequestSchema, including name, description, and input schema definition.
    { name: "getSongs", description: "Fetch the complete song list for a streamer with pagination support", inputSchema: { type: "object", properties: { streamerName: { type: "string", description: "The name of the streamer whose song list to fetch", }, limit: { type: "number", description: "Maximum number of songs to return (default: 100)", default: 100, }, offset: { type: "number", description: "Number of songs to skip for pagination (default: 0)", default: 0, }, }, required: [], }, },
  • JSON schema for 'getSongs' tool inputs, defining optional parameters for streamerName, limit, and offset.
    inputSchema: { type: "object", properties: { streamerName: { type: "string", description: "The name of the streamer whose song list to fetch", }, limit: { type: "number", description: "Maximum number of songs to return (default: 100)", default: 100, }, offset: { type: "number", description: "Number of songs to skip for pagination (default: 0)", default: 0, }, }, required: [], },
  • Helper function used by getSongs (and other tools) to make authenticated API requests to the StreamerSongList service.
    async function makeApiRequest(endpoint: string) { const url = `${apiBase}${endpoint}`; const response = await fetch(url); if (!response.ok) { throw new Error(`API request failed: ${response.status} ${response.statusText}`); } return response.json(); }
  • Helper function to resolve streamerName parameter, falling back to config default.
    function getEffectiveStreamer(requestedStreamer?: string): string { if (requestedStreamer) return requestedStreamer; if (defaultStreamer) return defaultStreamer; throw new Error("No streamer specified and no default streamer configured"); }

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