Skip to main content
Glama

Generate sound effect

text_to_sfx

Generates 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

NameRequiredDescriptionDefault
promptYes
durationNo
audio_formatNo
output_directoryNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.28.0
    • addedInput schema / properties / duration / anyOf
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / duration / default
      Added value: +null
    • removedInput schema / properties / duration / type
      Removed value: -"integer"
    • changedInput schema / required
      Previous value: -[
      -  "prompt",
      -  "duration"
      -]New value: +[
      +  "prompt"
      +]
  2. First observedv0.4.0

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: asynchronous backend execution, that the call blocks until completion, a cost warning about Sonilo API charges, disk-write behavior with default base path, and that timeout errors carry a task_id recoverable later. None of this is derivable from readOnlyHint/openWorldHint/idempotentHint alone.

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?

Purpose and the cost warning are front-loaded, and the Args/Returns blocks are scannable. Slightly verbose given the Args section largely duplicates what a filled-in schema would carry, but with 0% schema coverage that duplication is justified.

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?

For a cost-incurring, disk-writing async tool, the description covers invocation, side effects, timeout recovery, and return value. Nothing an agent needs before calling it is missing, and the returns note complements the output schema rather than replacing it.

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 carries the full burden and does: prompt length bound (1–2000), duration range (0.5–180) and the meaning of omitting it, the allowed audio_format values with the aac→.m4a default quirk, and output_directory resolution against SONILO_MCP_BASE_PATH. This is materially more than the bare schema types.

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?

States a specific verb+resource ("Generate a sound effect from a text prompt") plus a side effect (saves the audio file to a local directory). This clearly distinguishes it from audio-producing siblings like text_to_music, video_to_sfx, and video_to_sound, whose input modality differs.

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?

Explicitly gates usage with "Only use when explicitly requested by the user" and explains the timeout recovery path via get_sfx_task. It doesn't name the sibling alternatives (e.g. video_to_sfx for video input), so the agent must infer modality routing, but the when-to-use condition is clear.

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