Skip to main content
Glama

generate_sound_effect

Create custom sound effects from text descriptions using AI audio generation. Specify duration and receive audio files for multimedia projects.

Instructions

Generate sound effects from a text description

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesDescription of the sound effect to generate
durationNoDuration of the sound effect in seconds
webhook_urlNoURL for callback upon completion

Implementation Reference

  • The handler function that executes the generate_sound_effect tool. It validates the prompt, sends a POST request to the /soundgenerator endpoint with prompt, optional duration and webhook_url, and returns a status message with task details.
    private async handleGenerateSoundEffect(args: any) {
      if (!args.prompt) {
        throw new McpError(ErrorCode.InvalidParams, "prompt is required");
      }
    
      const response = await this.axiosInstance.post("/soundgenerator", {
        prompt: args.prompt,
        duration: args.duration,
        webhook_url: args.webhook_url,
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Sound effect generation started!\n\n${JSON.stringify(response.data, null, 2)}\n\nUse get_conversion_by_id with the task_id to check the status.`,
          },
        ],
      };
    }
  • src/index.ts:646-649 (registration)
    The request handler for listing tools, which returns the TOOLS array containing the generate_sound_effect tool definition.
    ListToolsRequestSchema,
    async () => ({
      tools: TOOLS,
    })
  • The tool definition in the TOOLS constant, including name, description, and input schema specifying required 'prompt' and optional 'duration' and 'webhook_url'.
      name: "generate_sound_effect",
      description: "Generate sound effects from a text description",
      inputSchema: {
        type: "object" as const,
        properties: {
          prompt: {
            type: "string",
            description: "Description of the sound effect to generate",
          },
          duration: {
            type: "number",
            description: "Duration of the sound effect in seconds",
          },
          webhook_url: {
            type: "string",
            description: "URL for callback upon completion",
          },
        },
        required: ["prompt"],
      },
    },
  • src/index.ts:673-674 (registration)
    The switch case in the CallToolRequestSchema handler that routes calls to generate_sound_effect to its handler function.
    case "generate_sound_effect":
      return await this.handleGenerateSoundEffect(args);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions generation but doesn't describe what happens after generation (e.g., how the sound effect is delivered, whether it's saved or streamed), potential limitations, or any side effects. For a generation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence with zero wasted words. It's appropriately sized for a straightforward tool and gets directly to the point without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a generation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what format the generated sound effect is in, how it's returned, whether there are quality or duration limits, or what happens with the webhook_url. The combination of missing behavioral context and output information creates significant gaps.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. The baseline of 3 is appropriate when the schema does all the parameter documentation work.

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 the verb 'generate' and the resource 'sound effects', specifying that it's from a text description. It distinguishes from siblings like 'generate_music' or 'text_to_speech' by focusing specifically on sound effects, but doesn't explicitly contrast with all alternatives.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'generate_music' or 'text_to_speech', nor does it mention prerequisites, constraints, or typical use cases. It simply states what the tool does without contextual usage information.

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/pasie15/mcp-server-musicgpt'

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