Skip to main content
Glama

Media Generator — Images, Videos & Audios

music_generator

Input: A text prompt describing the desired music and a music category ID and duration in seconds which needs to be in between 0 to 30 seconds which is optional and defaults to 15 seconds if not provided. Asking User to set the duration in seconds is optional.

Output: We will return the generated music URL to the user.

Functionality: This tool generates music based on a text prompt and selected music category ID. It follows these steps:

  1. Gets user_id from context and validates tokens.

  2. Generates music using the prompt and category ID.

  3. Retrieves the final music URL from the queue.

Args: prompt: Text description of the desired music music_category_id: The ID of the music category (integer)

Returns: The URL of the generated music file

INSTRUCTION FOR CLIENT MODEL:

  • Extract the required input parameters 'prompt' (type: string, describing the desired music) and 'music_category_id' (type: integer) from the user's prompt.

  • The music_category_id should be a valid integer ID from the available categories.

  • Ignore any extraneous information in the user's input.

  • Pass the extracted values to this tool as 'prompt' and 'music_category_id'.

  • RECOMMENDATION: Call get_music_categories() first to see available category IDs before choosing a music_category_id.

  • Example: For user input "Create a jazz song about summer rain with category ID 5", extract 'prompt' as 'about summer rain' and 'music_category_id' as 5.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>",
      "music_category_id": "<music_category_id>"
    },
    "name": "music_generator"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptYes
durationNo
music_category_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / description
      Removed value: -"Generic wrapper for non-object return types."
  2. First observed

TDQS

A3.7/5.0
Behavior3/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. It does disclose useful internals: it 'validates tokens' (implying auth) and 'retrieves the final music URL from the queue' (implying async latency). But it says nothing about failure modes, queue wait times, or rate limits, so it only partially meets the higher bar set by the missing annotations.

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

Conciseness3/5

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

The core purpose is front-loaded, but the description is bloated with redundancy: duration is described three times, and the 'Args'/'Returns' blocks duplicate the schema and the client-model instructions. The 'INSTRUCTION FOR CLIENT MODEL' section is largely restating extraction that the schema already conveys.

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

Completeness4/5

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

An output schema exists, so return-value explanation is not required (and is redundant here). The description supplies enough for an agent to call correctly: required inputs, the optional duration semantics, and the get_music_categories prerequisite. The main gap is the unexplained overlap with song_generator.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it largely does: it explains prompt as a text description of desired music, music_category_id as a valid integer category ID, and duration as optional, 0-30 seconds, defaulting to 15. Only the duration bound and default are covered; nothing extra is added for the required params beyond the schema types.

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 gives a specific verb+resource: 'generates music based on a text prompt and selected music category ID.' It is clear about what the tool produces (a music URL). However, it never distinguishes itself from the sibling 'song_generator', leaving an agent to infer the difference between music and song generation.

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

Usage Guidelines4/5

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

'RECOMMENDATION: Call get_music_categories() first to see available category IDs' explicitly routes the agent to a prerequisite sibling. It also clarifies duration is optional. It lacks when-not-to-use guidance or a comparison to song_generator, but the prerequisite routing is strong.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.