Skip to main content
Glama

generate_music

Generate instrumental background music from a text description. Describe mood, genre, tempo, and instruments to create a custom soundtrack for narration or video.

Instructions

Generate background music / a soundtrack from a text description: instrumental (no vocals) by default — ideal to play under narration. Returns request_id and cost in credits immediately; music takes ~1–3 min, so poll with wait_generation until COMPLETED, then output.audio.url is the mp3. Pass the resulting request_id as audio_request_id in compose_video to score a multi-scene video, or use the mp3 on its own. Describe mood/genre/tempo/instruments in the prompt (English works best).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputNoAdvanced model-specific parameters (see get_model input_schema). Merged with the fields above.
modelNoModel slug from list_models (a text-to-music model). Omit to use the default music model.
promptYesDescription of the music: mood, genre, tempo, instruments, e.g. "warm lo-fi hip-hop, mellow Rhodes piano, soft vinyl crackle, 80 bpm". English works best. Keep it within the model limit (typically ≤500 characters).
instrumentalNotrue (default) = instrumental, no vocals — best as a soundtrack under narration. false = allow vocals / a full song.
wait_secondsNoHow long to wait inline for completion before returning a request_id (music usually needs polling with wait_generation).
idempotency_keyNoOptional stable key to safely retry without creating (and paying for) a duplicate generation. Reuse the same key when retrying the same request.
Behavior5/5

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

With annotations already indicating a write operation, description adds crucial async behavior: returns request_id immediately, polling needed, generation time 1-3 min, and output URL. Also mentions cost in credits, and describes destructiveHint via idempotency key.

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?

Efficient and well-structured: purpose first, then async behavior, then usage integration, then parameter tips. No redundant sentences, all information earns its place.

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?

Despite no output schema, description fully explains the return (request_id, cost) and how to retrieve final audio. Covers lifecycle, companion tools, parameter usage, and constraints. Complete for the tool's complexity.

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?

100% schema coverage, but description adds valuable context: prompt tips (mood/genre/tempo/instruments, English best), instrumental default explanation, wait_seconds behavior, and idempotency_key for safe retries. Goes beyond schema to improve usability.

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?

Clearly states it generates background music/soundtrack from text description, distinguishes from siblings by specifying instrumental default and use as soundtrack under narration. Also explains the output and integration with other tools.

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?

Provides clear context: ideal for background music, instrumental, can be used with compose_video or standalone, and recommends polling. Does not explicitly contrast with generate_audio for speech/sound effects, but the musical focus is evident.

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/clipia-ai/clipia-mcp'

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