Skip to main content
Glama

generate_music

Turn a style prompt into a music track with optional lyrics, tempo, key, and duration; returns a local WAV file ready for use.

Instructions

Generate a music track from a style prompt; returns a local WAV path.

Args: prompt_style: Style description, e.g. "lo-fi hip hop, mellow piano". model: Music model id. Defaults to MLX_SERVE_MUSIC_MODEL. lyrics: Optional lyrics for vocal tracks. instrumental: True for no vocals (default true for text2music). duration_seconds: Target length 10..600 (default 60). bpm: Tempo, e.g. 120. keyscale: Musical key, e.g. "C major" / "E minor". timesignature: Time signature, e.g. "4/4". vocal_language: Vocal language code for sung lyrics, e.g. "en", "zh". task: "text2music" (default) | "cover" | "complete". src_audio_path: Local WAV (10-600 s) source for cover/complete tasks; its length becomes the output length. cover_strength: 0..1 how strongly to follow the cover source (default 1). seed: Optional seed for reproducibility. steps: Optional sampling steps (music3 backend only).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bpmNo
seedNo
taskNo
modelNo
stepsNo
lyricsNo
keyscaleNo
instrumentalNo
prompt_styleYes
timesignatureNo
cover_strengthNo
src_audio_pathNo
vocal_languageNo
duration_secondsNo
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the local-WAV side effect, the environment-variable model default, the output-length behavior for cover/complete tasks, the cover_strength range, and the backend-only caveat for steps.

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

Conciseness5/5

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

The high-level summary is front-loaded, followed by a compact Args block. Each line maps to a parameter and adds unique information; there is no filler or repetition of the schema.

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?

Given the complexity (14 params, no annotations, no output schema), the description is complete enough to call the tool correctly: required prompt_style, optional parameters, task variants, constraints, and return type are all specified. Only minor operational details such as completion time or file cleanup are absent, and they are not essential for selection or invocation.

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

Parameters5/5

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

Schema description coverage is 0%, and the description compensates fully: every one of the 14 parameters receives meaning, defaults, ranges, examples, or accepted values (e.g. duration_seconds 10..600, task enum, vocal_language examples). The schema alone would be nearly useless without this.

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?

The first sentence states a specific action ('Generate'), a resource ('a music track'), the input ('a style prompt'), and the output ('a local WAV path'). This clearly separates it from sibling generation tools such as generate_image, generate_video, and generate_3d.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Use is implied by the music-generation focus and the task parameter values, but the description never explicitly says when to prefer generate_music over siblings like text_to_speech or generate_video. It provides strong internal task guidance (text2music vs cover vs complete), but no when-not-to-use statement.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Congenital/mlx-serve-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server