Skip to main content
Glama

Trim the song

trim_music
Destructive

Chooses which part of the song plays: startSeconds and endSeconds in SONG time (read_music_structure lists the sections in song time), at least 0.5 seconds apart and with at least two downbeats between them; either one alone moves only that edge and keeps the other where it is. For 'end on the last chorus', endAtSection takes a section label such as chorus, with an optional occurrence (1 = first; default the last one): the song then ends where that section ends, keeping its current start. Suits 'start the music at the chorus', 'shorten the song' and 'end on the last chorus'. Only the person's own uploaded or generated tracks can be trimmed, as in the Music panel; a library track plays from its start, so its drop can't be moved onto a cut either (a generated track can be). Uses no credit; undoable. Cuts re-sync to the trimmed song.

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": {
      "listingId": "<listingId>"
    },
    "name": "trim_music"
  }
}

Input Schema

NameRequiredDescriptionDefault
listingIdYesListing id from list_listings.
endSecondsNoWhere the song ends, in song seconds. Left out: the end stays where it is.
occurrenceNoWhich of that section, 1 = first. Default: the last one.
endAtSectionNoEnd where this section ends (a label from read_music_structure).
startSecondsNoWhere the song starts, in song seconds. Left out: the start stays where it is.

Output Schema

NameRequiredDescriptionDefault
statusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that the operation uses no credit, is undoable, and that cuts re-sync to the trimmed song. It also explains a non-obvious behavioral restriction: library tracks play from their start and cannot be trimmed, while generated tracks can be. These details add real context without contradicting the destructive or non-idempotent annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and then moves through parameters, use cases, and restrictions in a logical order. It is dense and long, but most sentences carry useful operational detail rather than repeating the schema or annotations.

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?

For a 5-parameter mutation tool with annotations and an output schema, the description supplies the missing behavior an agent needs: track eligibility, no-credit cost, undoability, downbeat spacing, section-ending semantics, and the fact that cuts re-sync. Return values are covered by the output schema, so no further explanation is required.

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 substantial meaning beyond the schema: startSeconds and endSeconds are in song time, must be at least 0.5 seconds apart and have at least two downbeats between them, and setting only one edge keeps the other fixed. It also clarifies that endAtSection uses a label from read_music_structure and that occurrence defaults to the last occurrence. The only minor gap is that listingId is not discussed beyond the schema.

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 and resource: it chooses which part of the song plays by setting start/end points or ending at a named section. It clearly distinguishes trimming from adjacent music tools such as set_music, set_music_volume, and read_music_structure by focusing on moving the playback boundaries.

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?

It names concrete use cases such as 'start the music at the chorus', 'shorten the song', and 'end on the last chorus', and explains how startSeconds/endSeconds interact when only one edge is supplied. It also gives explicit exclusions and prerequisites, including that only the person's own uploaded or generated tracks can be trimmed and that library tracks cannot have their drop moved onto a cut.

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