Skip to main content
Glama

Generate music

generate_music

Generates music from a description, with optional custom lyrics or instrumental-only output. Costs 1 credit per requested second; returns a project id for wait_for_audio_project. Before choosing settings, read get_account_info and the current parameter constraints. A listed model, resolution, duration or count is not necessarily available together or on this account. Preserve explicit requirements and all supplied inputs; explain a genuine block instead of submitting an incompatible request. Account balance alone does not prove a request is affordable.

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": {
      "duration": "<duration>",
      "style": "<style>"
    },
    "name": "generate_music"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoOptional project name for identifying this output. Omit to use the API's default project name.AI Music Generator
styleYesSong description, vocal or instrumental choice, and optional custom lyrics.
durationYesRequested track duration in seconds, from 15 to 300. Determines credits charged.

Output Schema

NameRequiredDescriptionDefault
idYesUnique ID of the audio. Use it with the [Get audio Project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch status and downloads.
credits_chargedYesThe amount of credits deducted from your account to generate the audio. We charge credits right when the request is made. If an error occurred while generating the audio, credits will be refunded and this field will be updated to include the refund.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / name / description
      Previous value: -"Give your audio a custom name for easy identification."New value: +"Optional project name for identifying this output. Omit to use the API's default project name."
    • addedInput schema / properties / style / description
      Added value: +"Song description, vocal or instrumental choice, and optional custom lyrics."
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false), the description adds real value: the 1-credit-per-second cost model, the returned project id, and the account-dependent availability constraint. It stops short of stating whether failed or partial jobs still consume credits, which is the one behavioral gap left.

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 opening sentence is well front-loaded, but the trailing sentences are generic policy boilerplate ('Preserve explicit requirements and all supplied inputs; explain a genuine block...') and reference a 'model, resolution or count' that do not exist as parameters here. That padding dilutes an otherwise lean definition.

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?

With an output schema present, return values need no explanation, and the description covers cost, prerequisites, and the follow-up tool. The only blemish is the mention of non-existent settings (model, resolution, count), which could momentarily confuse an agent inspecting the actual schema.

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 coverage is 100%, so the schema already documents name, style, lyrics, instrumental, and duration. The description's only added semantics are the credit cost per second, which the duration field already states. Baseline 3 is appropriate since the schema does the heavy lifting.

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

Purpose5/5

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

States a specific verb and resource ('Generates music from a description') plus the two output variants (custom lyrics or instrumental-only), which cleanly distinguishes it from the image, video, and voice siblings. An agent can identify this as the music-generation tool without ambiguity.

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

Usage Guidelines5/5

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

Explicitly routes the agent: 'read get_account_info' before choosing settings and 'returns a project id for wait_for_audio_project' as the follow-up. It also warns that listed options may not be available together or on this account, giving concrete when-to-use prerequisites.

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.