Skip to main content
Glama
vuvuvu

StreamerSongList MCP Server

by vuvuvu

getSongDetails

Retrieve detailed information about a specific song using its unique ID, enabling access to song data within streaming platforms' request systems.

Instructions

Get detailed information about a specific song by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
streamerNameNoThe name of the streamer who owns the song
songIdYesThe ID of the song to fetch details for

Implementation Reference

  • The handler function for the 'getSongDetails' tool. It retrieves the streamer name (using default if not provided), extracts the songId from arguments, makes an API request to fetch the specific song details, and returns the JSON-formatted response.
    case "getSongDetails": { const streamerName = getEffectiveStreamer((args as any)?.streamerName); const songId = (args as any)?.songId; const data = await makeApiRequest(`/streamers/${encodeURIComponent(streamerName)}/songs/${songId}`); return { content: [ { type: "text", text: JSON.stringify(data, null, 2), }, ], }; }
  • The input schema and metadata definition for the 'getSongDetails' tool, including name, description, and properties for streamerName and songId.
    name: "getSongDetails", description: "Get detailed information about a specific song by ID", inputSchema: { type: "object", properties: { streamerName: { type: "string", description: "The name of the streamer who owns the song", }, songId: { type: "number", description: "The ID of the song to fetch details for", }, }, required: ["songId"], }, },
  • The handler function for the 'getSongDetails' tool in the server.js implementation. It fetches the full song list for the streamer and filters locally to find the song by ID, returning its details or error messages.
    case "getSongDetails": { const { streamerName = defaultStreamer, songId } = args; if (!streamerName) { throw new Error( "streamerName is required. Provide a streamerName or set the DEFAULT_STREAMER environment variable." ); } if (!songId) { throw new Error("songId is required"); } try { // Get all songs and find the specific one const response = await fetch(`${API_BASE}/streamers/${encodeURIComponent(streamerName)}/songs`); if (!response.ok) { return { content: [{ type: "text", text: `Error fetching songs: ${response.status} ${response.statusText}` }] }; } const songsData = await response.json(); const allSongs = songsData.items || songsData; // Handle different response formats const song = allSongs.find(s => s.id === songId); if (!song) { return { content: [{ type: "text", text: `Song with ID ${songId} not found for streamer ${streamerName}` }] }; } return { content: [{ type: "text", text: JSON.stringify(song, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }] }; } }
  • The input schema and metadata definition for the 'getSongDetails' tool in server.js.
    name: "getSongDetails", description: "Get detailed information about a specific song by ID", inputSchema: { type: "object", properties: { streamerName: { type: "string", description: "The name of the streamer who owns the song", }, songId: { type: "number", description: "The ID of the song to fetch details for", }, }, required: ["songId"], }, },

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