Skip to main content
Glama

text_to_music

Generate music from a text prompt. Save the audio file locally with full commercial licensing for social media, brand content, and advertising.

Instructions

Generate music from a text prompt and save the resulting audio file(s) to a local directory. Generated tracks are fully licensed (music licensed via Shutterstock) and cleared for commercial use on social, brand content, and advertising.

⚠️ COST WARNING: This tool makes an API call to Sonilo which may incur charges. Only use when explicitly requested by the user.

Args: prompt (str): Description of the music to generate (1–1000 chars). duration (int): Length in seconds (1–360). output_directory (str, optional): Absolute path, or relative to SONILO_MCP_BASE_PATH. Defaults to SONILO_MCP_BASE_PATH (~/Desktop unless overridden).

Returns: One TextContent per generated audio stream, each containing the absolute path of the saved .m4a file (AAC in MP4 container).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
durationYes
output_directoryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description fully carries the burden. It discloses API call cost, local file saving, licensing for commercial use, and return format. This provides substantial behavioral insight for an agent.

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?

The description is concise yet informative, starting with the core action and then covering parameters and warnings. The cost warning is a separate line with emoji for visibility. No superfluous text.

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?

Given the tool's complexity, the description covers the basic workflow, inputs, outputs, and important context (cost, licensing). It lacks error handling details but is sufficient for an agent to use the tool correctly.

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 0%, but description adds detailed semantics: prompt character limit (1-1000), duration range (1-360 seconds), and output_directory defaults and path behavior. This greatly enriches the bare schema.

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 clearly states 'Generate music from a text prompt', specifying the action and resource. However, it does not explicitly differentiate from sibling tools like text_to_sfx, though the licensing and 'music' keyword imply distinct purpose.

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 includes a cost warning and instructs 'Only use when explicitly requested by the user', which gives usage context. However, it lacks explicit guidance on when not to use this tool or when to prefer alternatives like text_to_sfx.

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/sonilo-ai/sonilo-mcp'

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