Skip to main content
Glama

Text To Music

text_to_music

Generate music tracks from text prompts and lyrics, with control over tempo, key, time signature, and duration. Turn song ideas into audio by specifying style and vocal content.

Instructions

Generate music from text description and lyrics.

Creates music tracks from text prompts with customizable parameters including tempo, key, time signature, and optional style reference audio.

IMPORTANT: Check model specifications using get_available_models() before calling. Pay attention to model limits for duration, inference_steps, guidance_scale, and bpm.

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": {
      "caption": "<caption>",
      "model": "<model>",
      "lyrics": "<lyrics>",
      "duration": "<duration>"
    },
    "name": "text_to_music"
  }
}

Input Schema

NameRequiredDescriptionDefault
bpmNoBeats per minute (optional). Bounds per model ('bpm' in the model list)
seedNoRandom seed (-1 for random)
modelYesMusic generation model name (must support txt2music inference type)
lyricsYesSong lyrics (max 10000 chars). Use '[Instrumental]' for no vocals
captionYesText description of the music to generate. Length bounds per model ('caption' in the model list)
durationYesAudio duration in seconds. Bounds per model ('duration' in the model list)
keyscaleNoMusical key/scale, e.g. 'C major', 'F# minor' (optional)
webhook_urlNoHTTPS URL for deAPI to call when this job finishes. Notifies your own systems; the tool still returns the result here
audio_formatNoOutput format, e.g. 'mp3' or 'flac'. Per-model — see info.limits.output_formats; leave unset for the model's own default
timesignatureNoTime signature: 2, 3, 4, or 6 (optional)
guidance_scaleNoGuidance scale. Leave unset when the model fixes it (see 'guidance' in the model list)
vocal_languageNoVocal language code, e.g. 'en', 'es' (optional)
webhook_secretNo32-255 char key deAPI signs the callback with (HMAC-SHA256). Needs webhook_url. A secret given in chat stays in the transcript
inference_stepsNoNumber of inference steps. Leave unset when the model fixes it (see 'steps' in the model list)
reference_audioNoReference audio for style transfer (URL, data URI, or base64). Its length must be within the model's window ('ref_audio' in the model list, e.g. 5-60s)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.3

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses the per-model constraint behavior and the need to validate limits first, but says nothing about cost, asynchronous job execution, or expected generation latency, even though a check_job_status sibling and a webhook parameter imply a deferred job model.

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?

Short and front-loaded: the core action comes first, followed by the critical prerequisite. The opening two sentences partially restate each other ('generate music from text description and lyrics' vs. 'creates music tracks from text prompts'), which is the only real waste.

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 generation tool with an output schema, the definition covers the main risk (model-specific limits) and points to the tool that resolves it. Gaps remain around job lifecycle, pricing, and the distinction from text_to_audio, but return values need not be explained because an output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 15 parameters, including per-model bounds and the webhook secret semantics. The description adds only a high-level enumeration of the customizable fields (tempo, key, time signature, reference audio) and no syntax or defaulting details beyond the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: generate music tracks from a text description plus lyrics, with customizable tempo, key, time signature, and optional style reference audio. It does not, however, distinguish itself from the sibling text_to_audio (speech vs. music), which an agent must infer from the names alone.

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?

It states a concrete prerequisite and names the sibling that fulfills it: check model specifications with get_available_models() before calling, and pay attention to per-model limits for duration, inference_steps, guidance_scale, and bpm. There are no explicit when-not-to-use cases or routing guidance versus text_to_audio or text_to_music_price.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.