Skip to main content
Glama

Generate music

generate_music

Generate music from a prompt, for 10, 20, 30 or 60 seconds: the track comes back that long. Make one original track for the whole edit unless the person gave you music or asked for an existing track, trending music or phonk. For those requests, first search_stock with kind music and import_stock a matching track. The stock library is also the fallback when a generation fails or the person asks for a library track. forceInstrumental true excludes singing. Use generate_sfx for sound effects. The music does not play its hits at seconds a prompt asks for: describe its shape (a quiet stretch, then one big drop, then the full sound) and give hero instead. It answers at once with a Job ID and the media is made in the background: start every generation you need, keep working, then call wait_for_jobs with all their Job IDs to get each Asset ID for patch_film. With its Asset ID come its beat and hits, measured from the track: the tempo, the beat times, the downbeats (bar starts), the big hits (where the music slams in), the drops, the loudness of each second, the sections (intro, build, drop, breakdown, outro), the drum hits between beats and the fills (quick runs of hits into the next bar). Cut on these measured times. With hero, it also says where the strongest drop or big hit is and the clip that lands it on that second. Uses about 0.0023 credits a second: 60 seconds use 1 credits. A credit refusal says how many credits are left: retry only with a duration that fits.

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": {
      "prompt": "<prompt>",
      "durationSeconds": "<durationSeconds>",
      "forceInstrumental": "<forceInstrumental>",
      "hero": "<hero>",
      "projectId": "<projectId>"
    },
    "name": "generate_music"
  }
}

Input Schema

NameRequiredDescriptionDefault
heroYesThe film second of the edit's hero moment, the reveal the music must hit, or null. The answer says which offset slides the track's strongest drop or big hit onto that second.
promptYesUp to 2000 characters.
projectIdYesThe project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs.
durationSecondsYes
forceInstrumentalYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / hero
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The film second of the edit's hero moment, the reveal the music must hit, or null. The answer says which offset slides the track's strongest drop or big hit onto that second."
      +}
    • changedInput schema / required
      Previous value: -[
      -  "prompt",
      -  "durationSeconds",
      -  "forceInstrumental",
      -  "projectId"
      -]New value: +[
      +  "prompt",
      +  "durationSeconds",
      +  "forceInstrumental",
      +  "hero",
      +  "projectId"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare mutation, non-idempotence, and open-world behavior; the description goes well beyond them by disclosing the asynchronous job model (Job ID returned immediately, media rendered in background, wait_for_jobs to resolve Asset IDs), the measured beat/hit payload returned with each asset, and cost at roughly 0.0023 credits per second with credit-refusal handling. Only gap is that no true return-format detail is given for the immediate response beyond the Job ID.

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-loads the core action and durations in the first clause, then layers routing, async behavior, and cost in descending priority. It is dense and long-winded in places ('The stock library is also the fallback...' repeats the routing idea), but nearly every sentence carries operational information.

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?

With no output schema, the description carries the return-value burden and does so: Job ID immediately, Asset ID via wait_for_jobs, plus tempo, beat times, downbeats, hits, drops, per-second loudness, sections, ghost hits and fills. Async timing, cost, and failure modes are all covered, so nothing needed to call 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 60%, and the description compensates on the two weakest points: forceInstrumental is explained ('true excludes singing') and hero is framed functionally (describe the track's shape, hand the hero second so the strongest drop lands there). projectId is left entirely to the schema, which already documents it adequately.

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 music from a prompt), pins the allowed durations, and distinguishes itself from generate_sfx and from stock-sourcing tools in the same breath. An agent can tell exactly what this tool produces without opening the schema.

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?

Gives explicit when-to-use branches: generate original music for the whole edit unless the person supplied music or asked for existing/trending/phonk, in which case search_stock with kind music plus import_stock. It also names the fallback when generation fails, points sound effects to generate_sfx, and prescribes the start-then-wait_for_jobs workflow.

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.