Skip to main content
Glama
vuvuvu

StreamerSongList MCP Server

by vuvuvu

getStreamerByName

Retrieve detailed information about a specific streamer from the StreamerSongList MCP Server to manage song requests and interact with streaming platforms.

Instructions

Fetch detailed information about a specific streamer

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
streamerNameNoThe name of the streamer

Implementation Reference

  • Handler implementation for the getStreamerByName tool. Resolves the streamer name using getEffectiveStreamer helper and fetches detailed streamer information from the API endpoint `/streamers/{streamerName}`.
    case "getStreamerByName": {
      const streamerName = getEffectiveStreamer((args as any)?.streamerName);
      const data = await makeApiRequest(`/streamers/${encodeURIComponent(streamerName)}`);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • Tool schema definition including name, description, and inputSchema for validating streamerName parameter.
    {
      name: "getStreamerByName",
      description: "Fetch detailed information about a specific streamer",
      inputSchema: {
        type: "object",
        properties: {
          streamerName: {
            type: "string",
            description: "The name of the streamer",
          },
        },
        required: [],
      },
    },
  • src/index.ts:163-165 (registration)
    Registration of the ListToolsRequestHandler which exposes the tools array containing getStreamerByName.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools,
    }));
  • Helper function to resolve the effective streamer name, 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");
    }
  • Helper function to make API requests to the StreamerSongList base URL.
    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();
    }

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