Skip to main content
Glama

Trim audio

trim_audio

Save a single MP3 or M4A clip between start and end times without re-encoding, preserving original audio quality; the input file remains unchanged.

Instructions

Save a new MP3 or M4A with only the part between a start and end time, cut without re-encoding so quality is unchanged. Use this for one clip; for several parts use split_audio. Returns the saved path and the kept range; the input is not changed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file": "<file>",
      "start": "<start>"
    },
    "name": "trim_audio"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoEnd time. Defaults to the end of the track.
fileYesPath to the file (absolute, or relative to the working directory).
startYesStart time, like "0:30" or 30.
outputNoWhere to save the result. Defaults to a new file next to the input.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations declare the mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), but the description adds genuinely new behavior: the cut is non-re-encoding so quality is unchanged, and "the input is not changed." That reassures the agent on the key risk of a non-idempotent write. It does not cover overwrite behavior when the output already exists, which keeps it short of a 5.

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?

Three sentences, each doing distinct work: what it produces, when to prefer the sibling, and what comes back and what is preserved. Front-loaded with the outcome, zero filler.

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

Completeness5/5

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

No output schema exists, and the description compensates by stating the return value ("the saved path and the kept range") as well as the non-destructive guarantee. For a four-parameter, single-purpose trim tool this is sufficient for correct invocation.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond it: the output container is constrained to MP3 or M4A, and the start/end pair defines a kept range rather than a splice point. Time syntax and per-parameter defaults are already in the schema, so no compensation is needed there.

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?

"Save a new MP3 or M4A with only the part between a start and end time" gives a specific verb (save/trim a clip) and resource (audio file), plus the distinguishing trait that the cut is done without re-encoding. The final sentence names the sibling split_audio as the multi-part alternative, so an agent can distinguish this tool from its neighbors without opening either schema.

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

Usage Guidelines5/5

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

Explicit routing guidance: "Use this for one clip; for several parts use split_audio." It states both the condition for using this tool and the named alternative for the other case, leaving nothing to inference.

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