Skip to main content
Glama

generate_lyrics

Create song lyrics for any theme or genre. Provide a prompt to generate customized lyrics for music 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 that implements the core logic for the 'generate_lyrics' tool. It validates the prompt input, makes a GET request to the MusicGPT API's /lyrics_generator endpoint, and returns the generated lyrics as a formatted JSON response.
    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 tool schema definition for 'generate_lyrics', including name, description, and inputSchema used for MCP tool listing (via ListToolsRequestHandler) and input validation.
    {
      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 switch case registration that maps incoming tool calls for 'generate_lyrics' to the handleGenerateLyrics handler function in the CallToolRequestHandler.
    case "generate_lyrics":
      return await this.handleGenerateLyrics(args);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates lyrics but doesn't cover aspects like output format (e.g., text, length, structure), quality expectations, potential rate limits, or any authentication needs. This leaves significant gaps for an AI agent to understand how to invoke it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly. Every part of the sentence contributes to understanding the purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (generative, with no output schema) and lack of annotations, the description is insufficient. It doesn't explain what the output looks like (e.g., plain text, structured lyrics), potential limitations, or how it integrates with sibling tools. For a creative generation tool, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters ('prompt' and 'genre') well-documented in the schema. The description adds minimal value beyond the schema by mentioning 'theme or prompt' and implying genre relevance, but doesn't provide additional context like examples or constraints. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('generate') and resource ('song lyrics'), and specifies it's based on a theme or prompt. It doesn't explicitly differentiate from sibling tools like 'generate_music' or 'text_to_speech', but the focus on lyrics is reasonably distinct. The description avoids tautology by not just restating the tool name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'generate_music' or 'text_to_speech', nor does it mention any prerequisites or exclusions. It implies usage for generating lyrics from a prompt, but offers no context for choosing among sibling tools that involve audio or music generation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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