Skip to main content
Glama

cut_audio

Trim audio files to specific durations by defining start and end times in seconds. Process audio from URLs and receive completion notifications via webhook callbacks.

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

  • The handler function that implements the core logic for the 'cut_audio' tool. It validates inputs, makes a POST request to the '/audio_cutter' API endpoint, and returns a status message with task details.
    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.`,
          },
        ],
      };
    }
  • The input schema and metadata definition for the 'cut_audio' tool, used for validation and tool 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)
    The dispatch case in the MCP tool execution handler that registers and routes calls to the 'cut_audio' handler function.
    case "cut_audio":
      return await this.handleCutAudio(args);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'cut or trim' implies a destructive/mutative operation, the description doesn't specify whether this modifies the original file, creates a new file, what format the output takes, whether it's synchronous or asynchronous (though the webhook_url parameter suggests async), or any rate limits/permission requirements.

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 extremely concise - a single sentence that directly states the tool's function. Every word earns its place with no redundancy or unnecessary elaboration. It's appropriately sized for a straightforward audio processing tool.

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

Completeness3/5

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

For a mutative audio processing tool with no annotations and no output schema, the description is minimally adequate. It states what the tool does but leaves significant gaps: no information about output format, whether the operation is destructive to the original, error conditions, or how results are delivered (especially relevant given the webhook_url parameter).

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 all parameters are documented in the schema. The description doesn't add any parameter-specific information beyond what's already in the schema descriptions. The baseline score of 3 is appropriate when the schema does the heavy lifting for parameter documentation.

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 tool's purpose with a specific verb ('cut or trim') and resource ('audio'), and specifies the operation target ('to a specific duration'). However, it doesn't explicitly distinguish this tool from similar sibling tools like 'extract_audio' or 'remix_audio', which might also involve audio manipulation.

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. With multiple audio manipulation tools available (like 'extract_audio', 'remix_audio', 'change_audio_speed'), there's no indication of when cutting/trimming is appropriate versus other operations, nor any prerequisites or constraints mentioned.

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