Skip to main content
Glama

Generate music

generate_music

Compose a song or instrumental. Default model: music/standard, which works from a prompt alone, or from style, title and lyrics (custom mode) and returns two variations. To build on a generated track, take audio_id and task_id from the tracks of its completed check_job result: music/standard-extend continues it, music/standard-region-edit replaces the lyrics of one section, music/standard-cover restyles it (or an uploaded song given as audio_url). Returns a job; check_job returns the permanent audio URLs and tracks once it is completed. Submitting charges credits, refunded automatically if the job fails; estimate_generation prices a request without charging.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "generate_music"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoMusic model ID. Default music/standard.
styleNoStyle tags for custom mode.
titleNoTrack title for custom mode.
extrasNoModel-specific parameters as listed by get_model_params. They are merged with the top-level fields.
lyricsNoCustom lyrics; section tags such as [verse] on their own lines.
promptNoGenre, mood, instruments, tempo, structure and vocal role.
task_idNotask_id from the same tracks entry (the job_id of that result).
audio_idNoA generated track to extend, cover or edit: audio_id from the tracks of a completed music result.
audio_urlNoUploaded source song for music/standard-cover.
force_newNoAn identical request submitted in the last 10 minutes returns that job without charging again; true generates it again.
skills_usedNoOptional workflow analytics: names of the skills (or skill/reference paths) followed for this call. Stored with generation jobs only. Never include private data, local paths or media URLs.
instrumentalNoNo vocals. Default false.
budget_projectNoOptional budget project this generation's cost counts toward, for tracking spend per client or job. Pass its slug; an id or the exact display name also works. Create one with create_budget_project and find slugs with list_budget_projects. An unknown project never stops the generation: it runs without one, and the result warns how to add it with assign_to_budget_project.
music_length_msNoApproximate length in milliseconds (converted to duration in seconds).
force_instrumentalNoAlias of instrumental.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: states that a job handle (not audio) is returned, that submissions charge credits and auto-refund on failure, and that an identical request within 10 minutes returns the existing job unless force_new is set. Annotations only mark it non-read-only, non-idempotent and open-world; the description supplies the cost and deduplication consequences an agent needs before calling.

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 purpose, then workflow, then billing — sensible ordering with no filler sentences. It is dense with model IDs and parenthetical clauses in a single block, which is slightly heavy for skimming but every clause carries 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?

For a 15-parameter, zero-required, no-output-schema generation tool, the description covers the return path (job → check_job → permanent URLs and tracks), the cost model, and the follow-up models. Parameter documentation is delegated to a fully-covered schema, so nothing critical 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 cross-parameter meaning: audio_id and task_id must come from the tracks of a completed check_job result, and audio_url is the uploaded source for cover. It does not clarify extras merging or the instrumental/force_instrumental alias, both of which the schema alone carries.

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?

Opens with a specific verb and resource ("Compose a song or instrumental") and immediately scopes the default model's two modes (prompt-only vs. custom with style/title/lyrics). The model-variant enumeration (standard, standard-extend, standard-region-edit, standard-cover) makes it clearly distinguishable from siblings like generate_sound_effect and generate_speech.

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 concrete routing: use estimate_generation to price without charging, check_job to retrieve URLs, and which model ID to pick for extending, editing a section's lyrics, or restyling. It stops short of explicitly excluding/contrasting the adjacent siblings (sound effect, speech), so an agent must infer that boundary itself.

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.