Skip to main content
Glama

cut_audio

Trim audio files to specific durations by specifying start and end times. This tool processes audio from URLs and can notify via webhook upon completion.

Instructions

Cut or trim audio to a specific duration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_urlYesURL of the audio file to cut
start_timeYesStart time in seconds
end_timeYesEnd time in seconds
webhook_urlNoURL for callback upon completion

Implementation Reference

  • Executes the cut_audio tool: validates parameters, sends POST to /audio_cutter API endpoint, returns task details and status check instructions.
    private async handleCutAudio(args: any) { if (!args.audio_url || args.start_time === undefined || args.end_time === undefined) { throw new McpError(ErrorCode.InvalidParams, "audio_url, start_time, and end_time are required"); } const response = await this.axiosInstance.post("/audio_cutter", { audio_url: args.audio_url, start_time: args.start_time, end_time: args.end_time, webhook_url: args.webhook_url, }); return { content: [ { type: "text", text: `Audio cutting started!\n\n${JSON.stringify(response.data, null, 2)}\n\nUse get_conversion_by_id with the task_id to check the status.`, }, ], }; }
  • Defines the tool specification for 'cut_audio' including name, description, and input schema used for validation and listing.
    { name: "cut_audio", description: "Cut or trim audio to a specific duration", inputSchema: { type: "object" as const, properties: { audio_url: { type: "string", description: "URL of the audio file to cut", }, start_time: { type: "number", description: "Start time in seconds", }, end_time: { type: "number", description: "End time in seconds", }, webhook_url: { type: "string", description: "URL for callback upon completion", }, }, required: ["audio_url", "start_time", "end_time"], }, },
  • src/index.ts:697-698 (registration)
    Registers the dispatch for 'cut_audio' tool calls in the main CallToolRequestSchema switch statement, routing to the handler.
    case "cut_audio": return await this.handleCutAudio(args);

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