Skip to main content
Glama

create_clip

Create an empty MIDI clip with a chosen loop length in a Session slot on a MIDI track, ready for adding notes and arranging.

Instructions

Create an empty MIDI clip of a given length in a Session slot.

The target must be a MIDI track. An audio slot takes a sample instead, which is a
different call: lom_call with path='song.tracks[N].clip_slots[M]',
method='create_audio_clip' and one absolute file path (catalog row
clip_slot.create_audio_clip).

Returns:
    Dictionary with the creation status, the clip path, and the read-back length.

Note:
    An occupied slot is refused rather than overwritten, so nothing is lost by
    aiming at the wrong slot. To replace a clip, delete_clip first.

    The clip arrives empty. Fill it with write_clip_notes, and copy it onto the
    Arrangement timeline with arrange once it holds something.

    Live gives a new Session clip a loop: ``looping`` reads back true with
    ``loop_start`` at 0 and ``loop_end`` at the length asked for. That is Live's
    own default for Session clips and this does not set it. Turn it off through
    ``lom_set`` on ``clip.looping`` where the part is to play once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName for the new clip. Empty leaves it unnamed.
slotYesClip slot index in track.clip_slots, counted from 0. A slot index is the scene the clip sits in, so slot 2 is the third scene down.
trackYesTrack index in song.tracks, counted from 0.
length_beatsNoLoop length of the new clip in beats, so 4.0 is one bar in 4/4 and 16.0 is four. Must be greater than 0.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.1
    • addedInput schema / properties / length_beats / description
      Added value: +"Loop length of the new clip in beats, so 4.0 is one bar in 4/4 and 16.0 is four. Must be greater than 0."
    • addedInput schema / properties / name / description
      Added value: +"Name for the new clip. Empty leaves it unnamed."
    • addedInput schema / properties / slot / description
      Added value: +"Clip slot index in track.clip_slots, counted from 0. A slot index is the scene the clip sits in, so slot 2 is the third scene down."
    • addedInput schema / properties / track / description
      Added value: +"Track index in song.tracks, counted from 0."
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With annotations all set to false, the description carries the behavioral burden and delivers: occupied slots refuse rather than overwrite, the clip is empty on arrival, and Live's default looping behavior is disclosed. This goes beyond the schema and prevents surprise side effects.

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?

The description is organized into short purpose, return, and note sections, with no filler. Each sentence carries operational information and is front-loaded with the core purpose.

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?

It covers prerequisites (MIDI track), creation behavior, conflict handling, follow-up actions, and the default loop side effect, plus the return shape. Nothing an agent needs to call it correctly is 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?

The schema already documents all four parameters at 100% coverage, so the baseline is 3. The description adds that track must be a MIDI track and connects length_beats to the read-back loop length, enriching parameter meaning 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?

States the exact operation: create an empty MIDI clip of a given length in a Session slot. The description also differentiates from the audio-slot counterpart by naming lom_call/create_audio_clip, so an agent can distinguish it from siblings.

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?

Explicitly says when not to use it (audio slots) and names the alternative call. It also provides the workflow chain: fill with write_clip_notes, arrange to timeline, and delete_clip before replacing an occupied slot.

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