Skip to main content
Glama

media_trim_audio

Trim Audio — Trim an audio file to a specified start and end time using FFmpeg. [category: media]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoEnd time e.g. '00:01:30'. Omit to trim to the end of the file; when set it must be after start.
fileYesAudio to trim. Output keeps this file's container/codec (stream copy); a file name with no extension is read by the file's type, and treated as .mp3 when the type names no sound format.
startNoStart time e.g. '00:00:10'. Defaults to the beginning.0

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / start / x-ui
      Added value: +{
      +  "pair_joint": "to",
      +  "pair_label": "Part to keep",
      +  "pair_with": "end"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / file / description
      Previous value: -"Audio to trim. Output keeps this file's container/codec (stream copy); a filename with no extension is treated as .mp3."New value: +"Audio to trim. Output keeps this file's container/codec (stream copy); a file name with no extension is read by the file's type, and treated as .mp3 when the type names no sound format."
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, covering the mutation and non-destructive nature. The description adds useful behavioral details: it mentions 'stream copy' meaning the output keeps the container/codec, and explains the fallback for files without a recognized extension (treated as .mp3). This goes beyond annotations, though it does not describe the exact return value or whether a new file is created, but those are not critical.

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 that front-loads the action and includes the key technical detail (FFmpeg). It avoids unnecessary words and the category tag is unobtrusive. No filler or redundancy.

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

Completeness4/5

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

For a tool with three parameters, full schema descriptions, and no output schema, the description covers the core action and even adds a behavioral note about stream copying. The only noticeable gap is the lack of explicit usage guidance regarding when to choose this tool over its media siblings, which is a minor omission. Overall, the agent has enough context to call it correctly.

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 three parameters (file, start, end) have detailed descriptions in the schema itself. The tool description does not add any parameter-specific details beyond what the schema provides, so it adds no extra value in this dimension. The baseline of 3 is appropriate since the schema carries the semantic weight.

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?

The description states a specific verb ('Trim'), a resource ('an audio file'), and the exact operation (trim to specified start and end times) while naming the underlying tool (FFmpeg). This clearly distinguishes it from siblings like media_trim_video or media_extract_audio, which have different targets. The action is unambiguous.

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

Usage Guidelines3/5

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

The description implies the tool is for trimming audio files, which is enough to infer its primary use, but it does not explicitly mention when not to use it or point to alternatives. For example, it does not say 'for video trimming, use media_trim_video' or warn against using this for extraction. Given the large number of sibling tools, explicit differentiation would be valuable.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources