Skip to main content
Glama

insert_groove

Render a drum DSL to MIDI and insert it onto a REAPER track in one call, applying humanized timing and velocity. Preview with dry_run before mutating the project.

Instructions

Render a drum DSL to MIDI and insert it on a track in ONE call — the engine (skills/drum-apparatus/) humanizes velocity, fatigue and timing at placement. Give the DSL EITHER inline as dsl_text OR as a file with dsl_path, never both. MUTATES the project (undo-block wrapped, one Ctrl/Cmd+Z reverts); supports dry_run. Refuses in ~0 s when the bridge heartbeat is dead, before generating anything. The rendered .mid is KEPT under rendered-midi/ — REAPER imports MIDI by reference on this build, so a deleted render leaves an empty take. Kit map: the DSL's own @map wins, then this map argument, then drum-config.json, then GM Standard. Track: named track, else drum-config.json's default, else REAPER's selected track. A bad DSL comes back as DSL_ERROR with the engine's own message — fix the DSL from it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mapNoDrum-kit map name (see reaperd.py list-maps). The DSL's @map wins over this.
seedNoRNG seed for the humanizer; same seed + same DSL = same MIDI.
trackNoExact track name (case-insensitive).
dry_runNoPreview: return what would run without changing the project.
dsl_pathNoAbsolute path to a .dsl file. Mutually exclusive with dsl_text.
dsl_textNoThe groove DSL inline. Mutually exclusive with dsl_path.
positionNoWhere to insert: a position object like {"type":"bar","bar":33} (see insert_midi_file) or a plain number of seconds. Default: the edit cursor.
track_containsNoCase-insensitive substring; errors if it matches more than one track.
target_track_guidNoStable REAPER track GUID; preferred when available.
use_selected_trackNoTarget the currently selected track instead of naming one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and delivers: MUTATES the project but is undo-block wrapped (one Ctrl/Cmd+Z reverts), dry_run is available, failure is fast and pre-generation when the bridge is dead, and the rendered .mid is kept under rendered-midi/ because REAPER imports MIDI by reference (deleting it yields an empty take). Error behavior (DSL_ERROR carrying the engine's message) is also disclosed.

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?

Front-loaded with the core action and the mutate/undo caveat immediately after. Sentences are dense and largely earn their place, though the parenthetical asides and the long precedence chains make it heavier to parse than necessary for a 10-parameter tool.

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 mutation tool with no annotations and no output schema, the description covers mutation semantics, undo, dry_run, refusal conditions, deterministic seeding, target resolution, and error 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?

Schema coverage is 100%, so the baseline is 3, but the description adds precedence semantics the schema does not fully carry: kit-map resolution order (DSL @map > map arg > drum-config.json > GM Standard) and track resolution order (named track > drum-config default > REAPER selected track). Mutual exclusivity of dsl_text/dsl_path and seed determinism are also restated, so the net add is real but partially duplicative.

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 chain and resource: 'Render a drum DSL to MIDI and insert it on a track in ONE call.' It is clearly distinguishable from siblings like insert_midi_file (which consumes an existing .mid) and insert_midi_events, because it names the DSL as the input format and the render step explicitly.

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 concrete routing rules: DSL either inline via dsl_text or via dsl_path, 'never both', and points at insert_midi_file for the position object shape. It also states when the tool refuses (dead bridge heartbeat) and supports dry_run for preview. It stops short of explicitly naming the alternative tool to use when the agent already has MIDI, so it is not a full when-not/alternatives treatment.

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