Skip to main content
Glama

generate_lyrics

Create song lyrics from themes or prompts with genre customization for music composition and creative writing projects.

Instructions

Generate song lyrics based on a theme or prompt

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesTheme or prompt for lyrics generation
genreNoMusic genre for the lyrics

Implementation Reference

  • The handler function for 'generate_lyrics' tool. Validates input prompt, makes a GET request to the /lyrics_generator API endpoint with prompt and optional genre parameters, and returns the API response as formatted text content.
    private async handleGenerateLyrics(args: any) { if (!args.prompt) { throw new McpError(ErrorCode.InvalidParams, "prompt is required"); } const response = await this.axiosInstance.get("/lyrics_generator", { params: { prompt: args.prompt, genre: args.genre, }, }); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
  • The input schema definition for the 'generate_lyrics' tool, defining required 'prompt' and optional 'genre' parameters. This is part of the TOOLS array used for tool listing.
    name: "generate_lyrics", description: "Generate song lyrics based on a theme or prompt", inputSchema: { type: "object" as const, properties: { prompt: { type: "string", description: "Theme or prompt for lyrics generation", }, genre: { type: "string", description: "Music genre for the lyrics", }, }, required: ["prompt"], }, },
  • src/index.ts:719-720 (registration)
    The dispatch case in the CallToolRequestSchema handler that routes execution of 'generate_lyrics' to the handleGenerateLyrics method.
    case "generate_lyrics": return await this.handleGenerateLyrics(args);

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/pasie15/mcp-server-musicgpt'

If you have feedback or need assistance with the MCP directory API, please join our Discord server