Skip to main content
Glama

add_midi_clip

Add an empty MIDI clip to an LMMS instrument track at a chosen beat, then populate it with notes using set_notes in a single undo step.

Instructions

Add an empty MIDI clip to an instrument track, then add notes with set_notes. One undo step.

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>",
      "start": "<start>"
    },
    "name": "add_midi_clip"
  }
}

Input Schema

NameRequiredDescriptionDefault
startYesBeats from the song start, for example 16 for bar 5 in 4/4.
trackYesA track handle or path, for example tracks/"Bass" or tracks/0.
lengthNoOptional length in beats, for example 8. Omit to grow by whole bars to fit.

Output Schema

NameRequiredDescriptionDefault
kindYes
nameYes
pathYes
indexYes
mutedYes
startYes
handleYes
lengthYes
note_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-destructive, closed-world mutation, so the safety profile is covered. The description adds a genuinely useful piece of context not in the annotations: "One undo step," telling the agent the mutation is atomic and cheaply reversible. However, it says nothing about failure modes or validation behavior when the target is not an instrument track, so the addition is thin beyond that one clause.

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?

Two short sentences, front-loaded with the action and resource, followed by the workflow pointer and the undo contract. No filler and nothing that restates the tool name.

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 simple creation tool with a full schema and an output schema, the description covers purpose, next step, and undo granularity, which is what an agent needs to invoke it correctly. Minor gaps are the lack of a prerequisite note about the target track type and the absence of any note on error behavior; the output schema removes any need to describe return values.

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% and the schema already documents start (beats, bar example), track (handle/path formats), and length (omit to grow by whole bars). The description adds no meaning beyond the schema — notably it does not mention the length semantics itself. Baseline 3 applies when the schema carries parameter meaning.

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?

States a specific verb and resource ("Add an empty MIDI clip to an instrument track") with the key qualifier that the clip is empty, which distinguishes it from set_notes that populates it. An agent can tell immediately what this tool produces and which sibling continues the workflow.

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

Usage Guidelines4/5

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

Gives explicit sequencing guidance — use this first, then "add notes with set_notes" — which is the main routing decision for clip creation. It stops short of stating prerequisites (e.g., that the target must already be an instrument track created via add_instrument_track) or what happens if the track is not an instrument track.

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