Skip to main content
Glama

Generate a track

generate_music

Generates ONE version of a track for an event of the Music tab (spends credits: refused until the user approved the cost in the conversation, see approve_spending). Without prompt/duration/loop, uses the event's. The prompt goes to the music model exactly as written (nothing is rewritten or added behind it), so write it in English as comma-separated tags: genre, mood, instruments, tempo, production (e.g. "medieval folk, lute, warm, 90 bpm, intimate"). A genre, voice or vocal_level you pass is written into the prompt as words (genre first, voice last). Parts, bpm, key_scale and time_signature are optional structure. Instrumental by default; with lyrics, pass them with [Verse]/[Chorus] tags, or ask the user to write them on the site. The duration must fit the user's plan: duration_sec says this account's limit, never ask for more. A track takes minutes: the tool waits up to 10 minutes and, if still generating, tells you to check later; with wait=false it only queues and returns a jobId for job_status (use it for several tracks: queue them all, the account generates one at a time). Before the FIRST track, the user must accept the rights notice on the site (the tool says so). Returns the new version (with the music page url), like generate_sounds. The game only plays chosen versions: if the event has none yet, the new one becomes chosen (auto_choose=false turns this off).

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

Input Schema

NameRequiredDescriptionDefault
bpmNoCompose ("Andamento"): tempo in beats per minute (60 to 180 sound best).
loopNotrue = the end is blended into the start, for a track the game repeats. Saved on the event.
modeNodescribe = only the prompt; compose = you also set the tempo, key and meter. Omitted: compose when bpm, key_scale, time_signature, genres or sung lyrics are sent, otherwise the track keeps its current mode.
waitNotrue = waits for the track (up to 10 min). false = only puts it in the queue and answers at once with the jobId: for several tracks, queue them all with wait=false (the account generates one at a time, the rest wait their turn) and check them with job_status.
voiceNoSung tracks: who sings (gender), how deep (timbre) and up to 2 singing styles, written at the end of the prompt. Omitted: the model picks.
genresNoMusical style (the site's "Estilo musical"): ONE genre as a one-item list. Its words are written at the start of the prompt (empty = only your prompt).
lyricsNoThe lyrics, one line per row, parts marked with [Verse], [Chorus], [Bridge]... Only with instrumental=false.
promptNoHow it sounds, sent to the model as is: English tags (genre, mood, instruments, tempo, production).
qualityNodraft (fast and cheap, to test the idea), good, high (the approved default), max (large model; may be unavailable). The price per minute follows the level.
event_idYesAn event in the Music tab (root folder of kind "music", its subfolders or entities).
languageNoLanguage of the lyrics.
key_scaleNoCompose ("Tom"): the key, e.g. "A minor".
auto_chooseNotrue (default): if the event has no chosen version yet, the new one becomes chosen, so the game plays it. false leaves the choice to the user.
vocal_levelNoSung tracks: the voice behind the band (back), even (balanced, default, adds nothing) or up front (front); written at the end of the prompt.
duration_secNoWhole seconds, 10 to 240 (4 min). The user's plan may allow less: the server refuses a longer track.
instrumentalNofalse = sung, with the lyrics below.
time_signatureNoCompose ("Compasso"): beats per bar (2, 3 = waltz, 4 = most music, 6 = compound like 6/8).

Output Schema

NameRequiredDescriptionDefault
urlYes
createdYes
creditsYes
refundedYes
studioUrlYes
generationIdsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / auto_choose / description
      Added value: +"true (default): if the event has no chosen version yet, the new one becomes chosen, so the game plays it. false leaves the choice to the user."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With annotations only marking this as a non-read-only, non-destructive write, the description adds substantial context: credits are spent and refused without user approval, a track takes minutes with a 10-minute wait cap, queued jobs generate one at a time, and the first track requires accepting a rights notice. It also discloses the auto-choose side effect on the event, which annotations do not cover.

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 core action and the cost gate, then progressively details prompt formatting, waiting semantics, and prerequisites. It is dense and long, but nearly every clause carries operational information; minor tightening (e.g. the parenthetical price/quality remarks) would help.

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?

For a 17-parameter tool with nested voice objects and an output schema, the description covers the workflow end to end: defaults inherited from the event, prompt construction, waiting behavior, cost approval, prerequisites, and the return value shape. Nothing an agent needs to invoke it correctly is missing.

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 100%, so the baseline is 3, but the description adds real meaning beyond it: the prompt is passed verbatim in English comma-separated tags with a concrete example, genre/voice/vocal_level are injected as words in a defined order (genre first, voice last), and duration_sec is framed as the account's plan limit. Lyrics tagging with [Verse]/[Chorus] is also explained.

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?

"Generates ONE version of a track for an event of the Music tab" gives a specific verb, a countable resource (one version), and a scoping constraint. The contrast with generate_sounds and create_tracks is implicit but clear enough via "the Music tab" and "like generate_sounds".

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: spending requires approval via approve_spending, wait=false plus job_status for multiple tracks, auto_choose=false to leave choice to the user, and the rights notice prerequisite before the first track. These are concrete when/when-not rules rather than hints.

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