Skip to main content
Glama

generate_sound_effect

Create custom sound effects from text descriptions for use in music production, videos, or 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 main handler function that executes the generate_sound_effect tool by making a POST request to the MusicGPT API's /soundgenerator endpoint with the provided prompt, duration, and webhook_url. Returns a response 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.`, }, ], }; }
  • Tool schema definition including name, description, and input schema for generate_sound_effect, used for tool listing and validation.
    { 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)
    Switch case registration that dispatches calls to the generate_sound_effect tool to its handler function.
    case "generate_sound_effect": return await this.handleGenerateSoundEffect(args);
  • src/index.ts:648-649 (registration)
    Registration of all tools including generate_sound_effect via the TOOLS array returned in ListToolsRequestSchema handler.
    tools: 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