Skip to main content
Glama

generate_music

Create background music from a text prompt and get a WAV file path. Use for videos, games, or transitions; note output has a clear start and end, not seamless loops.

Instructions

生成一段背景音乐(Stable Audio), 返回 WAV 的本机路径。

参数: prompt: 音乐描述(风格/乐器/情绪, 英文效果最佳) seed: 随机种子(可选) duration: 秒数, 上限 120 num_inference_steps: 推理步数(默认 100, 越多越慢)

注意: 出来的是一段有头有尾的音乐, 没有做无缝循环点。要循环播放的 BGM 请自己在编辑器里找循环点, 或把它当作一次性过场音乐。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
promptYes
durationNo
num_inference_stepsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
pathNo
errorNo
clampedNo
durationNo
warningsNo
truncatedNo
error_codeNo
requested_durationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.5

TDQS

A4.2/5.0
Behavior4/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 disclosure burden. It usefully reports that the tool returns a local WAV path, that the output is not seamlessly loopable, that duration is capped at 120 seconds, and that higher inference steps are slower. It does not cover permissions, rate limits, or failure modes, but the core behavioral constraints an agent needs are present.

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 description is front-loaded with the purpose, then presents parameters in a compact list, and finishes with an important output caveat. Every part earns its place given the lack of schema descriptions, and there is no wasteful repetition.

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?

Although an output schema exists, the description still helpfully notes the returned WAV path. With no annotations and 0% schema parameter coverage, the definition compensates by documenting all parameters and the key output limitation. It is complete enough for an agent to select and invoke the tool correctly.

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%, so the description must explain all four parameters. It does so clearly: prompt is a music description with English working best, seed is optional random, duration is seconds with a 120 upper bound, and num_inference_steps defaults to 100 with more steps being slower. This adds meaning beyond the bare schema types and defaults.

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 states a specific verb and resource: '生成一段背景音乐(Stable Audio), 返回 WAV 的本机路径'. It clearly distinguishes itself from generating speech or sound effects by specifying background music, though it does not explicitly name sibling alternatives such as gen_sfx or 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 Guidelines3/5

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

The description gives an important usage caveat: the output has a beginning and end with no seamless loop point, so for looping BGM the user must find a loop point or treat it as one-shot transition music. However, it does not explicitly state when to use this tool versus generate_speech, gen_sfx, or other audio-generation siblings.

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