Skip to main content
Glama
vuvuvu

StreamerSongList MCP Server

by vuvuvu

getQueue

Retrieve and view current song queues for streamers with pagination support to manage and monitor song requests efficiently.

Instructions

View current song queues with pagination support

Input Schema

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

Implementation Reference

  • Handler implementation for the 'getQueue' tool. Extracts parameters (streamerName, limit, offset), fetches the queue data from the StreamerSongList API, and returns the JSON response as text content.
    case "getQueue": { const streamerName = getEffectiveStreamer((args as any)?.streamerName); const limit = (args as any)?.limit || 50; const offset = (args as any)?.offset || 0; const data = await makeApiRequest(`/streamers/${encodeURIComponent(streamerName)}/queue?limit=${limit}&offset=${offset}`); return { content: [ { type: "text", text: JSON.stringify(data, null, 2), }, ], }; }
  • Tool schema definition for 'getQueue', including input schema with properties for streamerName, limit, and offset.
    { name: "getQueue", description: "View current song queues with pagination support", inputSchema: { type: "object", properties: { streamerName: { type: "string", description: "The name of the streamer whose queue to fetch", }, limit: { type: "number", description: "Maximum number of songs to return (default: 50)", default: 50, }, offset: { type: "number", description: "Number of songs to skip for pagination (default: 0)", default: 0, }, }, required: [], }, },
  • Handler implementation for the 'getQueue' tool in the JavaScript runtime version. Validates streamerName, fetches queue with pagination from API, handles errors, returns JSON.
    case "getQueue": { const { streamerName = defaultStreamer, limit = 50, offset = 0 } = args; if (!streamerName) { throw new Error( "streamerName is required. Provide a streamerName or set the DEFAULT_STREAMER environment variable." ); } try { const response = await fetch(`${API_BASE}/streamers/${encodeURIComponent(streamerName)}/queue?limit=${limit}&offset=${offset}`); if (!response.ok) { return { content: [{ type: "text", text: `Error fetching queue: ${response.status} ${response.statusText}` }] }; } const queueData = await response.json(); return { content: [{ type: "text", text: JSON.stringify(queueData, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }] }; } }
  • Tool schema definition for 'getQueue' in JS version, matching the TS input schema.
    { name: "getQueue", description: "View current song queues with pagination support", inputSchema: { type: "object", properties: { streamerName: { type: "string", description: "The name of the streamer whose queue to fetch", }, limit: { type: "number", description: "Maximum number of songs to return (default: 50)", default: 50, }, offset: { type: "number", description: "Number of songs to skip for pagination (default: 0)", default: 0, }, }, required: [], }, },
  • Helper function used by getQueue handler to determine the effective streamer name, falling back to config.
    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