Skip to main content
Glama

add_clip

Adds a MIDI clip to a track at a chosen bar, using notes or melody notation, with length and loop repeats for composing songs.

Instructions

A MIDI clip on a track at bar, bars long (default: as long as its notes). notes: [{"pitch": "C4", "start": 0, "length": 1, "velocity": 100}] or ["C4", 0, 1, 100] (start/length in beats from the clip start). melody: text notation (see add_melody). loop_bars repeats the first N bars to fill the clip.

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": {
      "track": "<track>"
    },
    "name": "add_clip"
  }
}

Input Schema

NameRequiredDescriptionDefault
barNo
barsNo
nameNo
notesNo
trackYes
melodyNo
projectNo
loop_barsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose real behavior: bar defaults to 1, bars defaults to the note span, and loop_bars repeats the first N bars to fill the clip. It says nothing about whether an existing clip is replaced, what happens if the track does not exist, or what is returned, so the mutation semantics remain undisclosed.

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

Conciseness3/5

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

The content is dense and largely waste-free, with the note-format example earning its space, but the structure is a run of fragments with no lead sentence anchoring what the tool does. It lacks front-loading of the core action, so an agent must reconstruct intent from the parameter glosses.

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

Completeness2/5

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

For an 8-parameter mutation tool with no annotations and no output schema, the definition is thin: track is the sole required parameter and is entirely unelaborated (name? id? index?), and behaviors like overwrite, validation, and return value are absent. The caller can construct notes but cannot confidently target a track.

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 coverage is 0% across 8 parameters, so the description must compensate, and it does for five of them: bar, bars, notes with a concrete example shape and beat-based start/length, melody with a cross-reference, and loop_bars with an explicit default. The required track parameter, plus name and project, are never explained, leaving the most important input undefined.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description is a noun phrase ('A MIDI clip on a track at bar, bars long') that implies clip creation at a position, so the resource and placement are clear, but no verb states the action outright. It reads as abridged parameter documentation rather than a purpose statement, and it never explicitly contrasts with add_notes or add_arpeggio, which also add musical content.

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?

There is no when-to-use guidance: nothing says when to reach for add_clip versus add_notes, add_arpeggio, or add_melody. The only routing hint is a bare 'see add_melody' pointer for notation syntax, which is a format reference rather than an alternative-selection rule.

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