Skip to main content
Glama

Generate a track

generate_track

Generate a royalty-free track from a prompt, a playlist, or an image.

Provide exactly one of prompt, playlist_index, or an image. Call get_capabilities first — the allowed bitrates, formats, modes and the maximum duration are per-license, and this consumes quota.

A brief that says what NOT to have ("no drums", "nothing percussive", "no vocals") is exclude_stems / exclude_instruments, and "straight into the drop" is start_from_part — both are honoured by the generator itself, so prefer them over generating and editing afterwards.

This waits for the render and returns a downloadable URL. Prefer playlist_index with one of the instant durations when the brief allows it: that path can return in a single round trip instead of rendering.

The audio expires — download it as soon as this returns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bpmNoOnly valid with playlist_index.
keyNoMusical key, e.g. 'C' or 'Am'. Only with playlist_index.
modeNotrack (default), loop for seamless looping, jingle or mix — the last two only with playlist_index.
formatNomp3 or wav, if the license allows.
promptNoText description of the music, in English. Needs the 'ttm' feature. Cannot be combined with bpm or key.
bitrateNo
durationYesLength in seconds, at least 5. Durations of 5, 6, 8, 10, 15, 20, 30, 40, 60, 180, 240, 300 can be served instantly from the pre-rendered store when generating from a playlist_index without bpm/key; any other value always costs a full render. The upper bound is per-license — see get_capabilities.
image_urlNoPublic http(s) URL of an image to score. Needs the 'itm' feature. PNG/JPEG/WEBP/BMP, between 50 KB and 10 MB.
intensityNo
image_base64NoImage bytes as base64, as an alternative to image_url.
wait_secondsNoHow long to wait before handing back a track id.
exclude_stemsNoStems the track is generated WITHOUT, the negative brief: DRUMS (drums, percs, hats, claps), BASS, LEADS (mids, leads, pads), VOCALS, FX. 'No drums' is this, not an edit afterwards - the track is built without them from the first bar. Only with playlist_index.
playlist_indexNoChannel from list_playlists, e.g. '6.4.0'. Cheapest and fastest option — only this input can be served from the instant store, and only it accepts bpm and key.
start_from_partNoOpen the track on this part instead of its intro: DROP ('straight into the drop', 'no intro', 'skip the build-up'), BREAK or MAIN. Only with playlist_index; loops and jingles have no intro to skip.
exclude_instrumentsNoSingle parts to leave out: DRUMS, PERCS, HATS, CLAPS, BASS, MIDS, LEADS, FX, VOCALS, PADS, RISER, IMPACT. Finer than exclude_stems - 'no hi-hats' is HATS, 'no vocals' is VOCALS. Only with playlist_index.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bpmNo
keyNo
urlNoDownload link once done.
modeNo
formatNo
promptNo
statusYesdone, failed or pending.
bitrateNo
durationNo
track_idNo
importantNo
expires_atNoAfter this the audio is deleted and the URL stops working.
session_idNo
edited_fromNoThe track this one was derived from. Edits and variations never modify the original — they mint a new track, and this is the link back.
playlist_indexNo
how_it_was_servedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only cover read-only/destructive/idempotent/open-world flags; the description adds substantive behavior: it consumes quota, it blocks while rendering and returns a downloadable URL, and the audio expires so it must be downloaded promptly. It also discloses the exclusive-input constraint, which annotations do not convey. Slight gap: it does not say what happens when the wait times out (that a bare track id comes back instead of a URL), which is the one behavior an agent most needs.

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

Conciseness4/5

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

Front-loaded with the one-line purpose, then tight paragraphs each carrying a distinct operational rule. Slightly sprawling at five paragraphs, but every sentence adds either a constraint or a routing heuristic rather than restating the schema.

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?

For a 15-parameter, quota-consuming, generative tool with per-license limits and an output schema, this covers constraints, prerequisite (get_capabilities), input exclusivity and artifact expiry. Return-value details are legitimately left to the output schema. Only the wait_seconds timeout behavior is left unexplained.

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 coverage is already 87%, so the baseline is 3, but the description adds genuine conceptual mapping: negative briefs ('no drums', 'nothing percussive') map to exclude_stems/exclude_instruments and 'straight into the drop' maps to start_from_part. That is exactly the translation help an agent needs to pick the right field from natural-language input.

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 ('Generate a royalty-free track') plus the three distinct input modalities (prompt, playlist, image). This clearly separates it from siblings like edit_track, regenerate_similar and generate_track_instant, which do different things with different inputs.

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?

Gives real routing rules: exactly one of prompt/playlist_index/image, call get_capabilities first for per-license limits, and prefer the playlist_index + instant-duration path when the brief allows. Also advises preferring exclude_stems/start_from_part over generate-then-edit. It never names generate_track_instant or wait_for_track as alternatives, so the sibling-level routing is only implied.

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.

Resources