Skip to main content
Glama

clips_write_midi

Idempotent

Write MIDI notes into a MIDI track's session clip slot, creating the clip when empty; choose replace or merge mode and set loop length in beats.

Instructions

Write notes into a session clip slot of a MIDI track, creating the clip if the slot is empty. mode 'replace' (default) leaves exactly these notes, 'merge' adds them. length_beats sets the loop (default: the notes rounded up to whole bars). Times are in beats from the clip start (1 beat = a quarter note; in 4/4 a bar is 4 beats). The clip loops; launch it with clips.launch. Undoable.

Input Schema

NameRequiredDescriptionDefault
modeNoReplace or merge the clip's notes.
slotYes0-based clip slot (scene row) on the track.
notesYesNotes to write.
trackYesTrack id (UUID string from tracks.list, stable) or 0-based index (shifts when tracks are added or moved).
length_beatsNoLoop length in beats.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent, non-destructive, but the description adds real behavior: the slot is created if empty, 'replace' leaves exactly these notes (i.e. prior notes are discarded), the clip loops, and the operation is undoable. That last point is the key mitigation for replace-mode overwriting. The mild tension between replace-mode deletion and destructiveHint=false is disclosed rather than hidden, so no contradiction.

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?

Four short sentences, front-loaded with the action and the slot-creation condition, then mode semantics, then length defaults, then units, then the launch pointer. Every sentence carries information the agent needs and none repeat the schema verbatim.

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 5-parameter mutation with no output schema, the description covers creation behavior, overwrite semantics, defaults, units, undoability, and the natural next call. The one gap is what the tool returns (e.g. whether it hands back the new clip reference), which an agent would want before chaining into clips.launch.

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; the description earns above that by explaining defaults and units the schema does not: length_beats defaults to the notes rounded up to whole bars, and times are in beats with '1 beat = a quarter note; in 4/4 a bar is 4 beats'. It also restates the replace/merge semantics of mode with more precision than the schema's one-liner.

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

Purpose4/5

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

The description opens with a specific verb+resource+location: 'Write notes into a session clip slot of a MIDI track', and adds the create-if-empty condition. It implicitly separates itself from arrangement_* and clips_get_notes by naming the session clip slot, but never explicitly contrasts with close siblings like clips_write_drums or clips_transform, so it stops short of a 5.

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

Usage Guidelines3/5

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

It gives useful operating guidance — 'replace' is the default, 'merge' adds, length_beats defaults to whole bars, and 'launch it with clips.launch' as the follow-up. What it lacks is any when-to-use-this-vs-alternative routing: nothing tells the agent why to pick this over clips_write_progression, clips_generate_melody, or clips_transform.

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

Deploy Server

Other Tools