Skip to main content
Glama

Trim / split audio

var2_trim_audio

Cut or SPLIT AUDIO (a song / track / recording) by time — the only tool for that. Triggers: "cut seconds X to Y out of my song", "split this track into pieces", "keep only 0:12–0:40", "first 45 seconds", "shorten to 60s for pruna-avatar / heygen-avatar-iv". Modes: one range (start/end); explicit segments in ONE call (segments=[{start_seconds,end_seconds,id?},…]); SMART lyrics split (lyrics_timestamps + target/min/max_segment_seconds — never cuts mid-word, prefers line/chorus ends). Returns NEW asset(s) (url + placeholder_id); original untouched. audio_url: storage URL, var2 share link, or placeholder_id. Making new/longer music (extend, replace a section) → var2_create_audio; voice-overs → var2_create_dialog.

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": {
      "audio_url": "<audio_url>"
    },
    "name": "var2_trim_audio"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoOptional title for the asset library (single-cut mode).
segmentsNoBatch split: several cuts from the same track in ONE call, e.g. [{start_seconds:0,end_seconds:8},{start_seconds:8,end_seconds:16}]. Each returns its own asset.
audio_urlYesThe track to cut from — storage URL, var2 share link (www.var2.ai/music/<id>), or placeholder_id (auto-resolved).
end_secondsNoSingle cut: end, in seconds. Pass this OR duration_seconds.
start_secondsNoSingle cut: start, in seconds. Default 0.
duration_secondsNoSingle cut: length, in seconds. Pass this OR end_seconds.
lyrics_timestampsNoSmart split: word-level timestamps [{word,start,end,break?}] (break ∈ line|bar|chorus on a line's LAST word). The server picks cuts that NEVER land mid-word and prefer line/chorus ends, sized by target/min/max_segment_seconds. Returns scene_1..N assets.
max_segment_secondsNoHARD ceiling in every mode — never exceeded. Smart split cuts INSIDE the limit (mid-verse at a word end if a verse overshoots); explicit/single ranges that overshoot are rejected. Default 60 for lyrics mode (pruna-avatar / heygen-avatar-iv audio cap).
min_segment_secondsNoSmart split: hard minimum. Default 4.
target_segment_secondsNoSmart split: preferred segment length. Default 8.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=true, and the description is consistent with them, adding useful context that the original is untouched and new assets are produced. It also discloses enforcement behavior (max_segment_seconds is a hard ceiling; overshooting explicit ranges are rejected; smart split never cuts mid-word), which is genuinely beyond the annotations. However, it says nothing about async job handling, latency, or error surfacing for a non-read-only generation tool.

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 purpose statement and exclusivity claim are front-loaded, then triggers, then modes, then return value, then alternatives — a sound order. The quoted trigger list is slightly dense, but nearly every clause carries routing or constraint information.

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 10-parameter tool with no output schema, the description covers return shape (new asset url + placeholder_id, scene_1..N), mode selection, hard limits, defaults, and exclusionary alternatives. Nothing material an agent needs to invoke it correctly appears to be missing.

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 schema already documents each parameter, but the description adds mode-selection meaning: which params belong to single-cut vs. explicit-segments vs. smart-lyrics mode, that audio_url accepts a placeholder_id, and the defaults (60s for lyrics mode, min 4, target 8). That is meaningfully more than a restatement of 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?

"Cut or SPLIT AUDIO ... by time" gives a specific verb plus resource, and the phrase "the only tool for that" plus named siblings (var2_create_audio, var2_create_dialog) make it unambiguous against alternatives. An agent can route to it without opening the 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?

It supplies concrete trigger utterances ("cut seconds X to Y", "first 45 seconds", "shorten to 60s for pruna-avatar"), enumerates the three modes and when each applies, and explicitly redirects non-matching intents (extend/replace section, voice-overs) to specific sibling tools.

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