Skip to main content
Glama

generate_music

Generate music tracks from text prompts and retrieve audio via job ID after background processing.

Instructions

Generate music — a theme, background track, song, or instrumental bed.

Returns immediately with a job_id; the audio is produced in the background. Poll it with check_jobs([job_id]) to get the file path when it's ready. Fire several calls to mass-produce variants without waiting.

Args: prompt: What to make, in plain language ("uplifting orchestral intro, soaring strings" / "warm lo-fi study loop"). For a sung song, this is the theme/style and Mureka writes the lyrics; pass lyrics to supply your own. Give either this OR composition_plan (Eleven Music), not both. duration: Target length in seconds, if you care (else the model decides). instrumental: True for no vocals (BGM/underscore); False allows sung vocals. reference: Optional path (local audio file) or URL to a reference track to steer style (Mureka only — we upload it and match its vibe; Eleven Music has no such input). lyrics: Mureka song only — supply exact lyrics (incl. [Verse]/[Chorus] tags) instead of letting Mureka write them from the prompt. When set, prompt is treated as an optional style descriptor ("r&b, slow, male vocal"). engine: Provider override. Soft-defaults to Mureka; pass "elevenlabs" to use Eleven Music instead (honours prompt, duration, instrumental; ignores reference/count). format: Output format. Mureka defaults to flac (lossless, highest quality, ~half the size of wav) and also offers "wav" (lossless, uncompressed) and "mp3" (smaller) — all free from the same generation. ElevenLabs: "mp3"/"wav". count: How many tracks to generate this call, 1–3 (Mureka only). composition_plan: Eleven Music only — a structured multi-section plan (intro/verse/ chorus with per-section prompts and durations) instead of a free-text prompt. Mutually exclusive with prompt; auto-routes the job to ElevenLabs. store_for_inpainting: Eleven Music only — persist the generated song so later calls can condition on / inpaint sections of it. Surfaces a song_id in the job result (via check_jobs) to reference it later. respect_sections_durations: Eleven Music + composition_plan only — enforce each section's requested duration strictly.

Returns: {"job_id": ..., "status": "queued", "engine": ...} or {"error": ...}. When a job finishes, check_jobs also returns song_id if store_for_inpainting was set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
engineNo
formatNo
lyricsNo
promptNo
durationNo
referenceNo
instrumentalNo
composition_planNo
store_for_inpaintingNo
respect_sections_durationsNo
Behavior5/5

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

With no annotations provided, the description carries the full burden. It discloses the async job behavior, engine-specific parameter handling, output format defaults, and side effects like store_for_inpainting persisting songs. This goes well beyond a simple 'generates music' claim.

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 long but every sentence earns its place. It front-loads the async behavior, then systematically documents each parameter with concise, high-signal details and a short Returns section. No filler or redundancy.

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

Completeness5/5

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

Given 11 parameters, two engines, no annotations, and no output schema, the description is remarkably complete. It covers return values, job polling, defaults, engine differences, mutual exclusions, and relevant downstream effects, leaving little ambiguity for an agent.

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

Parameters5/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 does admirably. Every parameter gets a plain-language explanation, type/format hints, examples, and engine-specific constraints (e.g., reference is Mureka-only, count is 1–3). This significantly enriches the bare schema.

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?

The description opens with a clear verb and resource: 'Generate music — a theme, background track, song, or instrumental bed.' This specific enumeration distinguishes it from sibling tools like generate_sfx, generate_speech, and generate_dialogue, making the tool's purpose immediately clear.

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?

The description explains the asynchronous workflow ('Returns immediately with a job_id... Poll it with check_jobs') and provides engine-selection guidance (Mureka vs ElevenLabs), mutual exclusions (prompt OR composition_plan), and parameter applicability per engine. It effectively tells the agent when and how to use this tool.

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/DuragonYama/ofaudio-mcp'

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