Generate sound effect
text_to_sfxGenerates a sound effect from a text prompt and saves the resulting audio file to a local directory, returning the saved file path.
Instructions
Generate a sound effect from a text prompt and save the audio file to a local directory. Generation is asynchronous on the backend; this tool waits for completion (typically well under the timeout) and returns the saved file path.
⚠️ 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 sound effect (1–2000 chars). duration (float, optional): Length in seconds (0.5–180). Omit it for Sonilo's own default length. audio_format (str, optional): One of wav, mp3, aac, flac. Defaults to aac (.m4a file). output_directory (str, optional): Absolute path, or relative to SONILO_MCP_BASE_PATH. Defaults to SONILO_MCP_BASE_PATH (~/Desktop unless overridden).
Returns: TextContent with the absolute path of the saved audio file. If the call times out, the error message includes the task_id — recover the result later with get_sfx_task.
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": {
"prompt": "<prompt>"
},
"name": "text_to_sfx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| duration | No | ||
| audio_format | No | ||
| output_directory | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |