Skip to main content
Glama

edit_midi_notes

Modify existing MIDI notes in REAPER to quantize, transpose, humanize, set velocities, or develop motifs while filters preserve unselected notes.

Instructions

Edits existing MIDI notes: quantize (with swing), humanize, transpose, snap to a scale, set or ramp velocities, strum chords, make legato, and develop motifs (diatonic transposition, inversion, retrograde, augmentation, harmony lines, sequences, negative harmony). Filters pick which notes; the rest stay as they are. One undo step.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoOnly notes starting before this QN position
keyNoScale root, e.g. A, F#, Bb
axisNoinvert: the pitch to mirror around (default: the first note)
gridNoQuantize grid in QN: 1 = quarters, 0.5 = 8ths, 0.25 = 16ths, 1/3 = 8th triplets
belowNoadd_harmony: put the new line below
scaleNomajor, minor, dorian, mixolydian, harmonic minor, minor pentatonic, blues...
startNoOnly notes starting at or after this QN position in the item
stepsNoScale steps for diatonic_transpose, add_harmony (2 = a 3rd) and sequence
swingNo
timingNoHumanize: max timing shift in QN
channelNo
item_idYesMIDI item id from create_midi_item/get_track_details, or "selected"
repeatsNosequence: how many transposed copies
strengthNo
velocityNo
operationYesquantize (grid, strength, swing), humanize (timing, velocity_amount), transpose (semitones), snap_to_scale (key, scale), velocity (velocity | velocity_start+velocity_end ramp | velocity_scale), strum (strum_delay, strum_direction), legato (legato_gap). Motif development (need key, and scale unless key names one like 'A minor'): diatonic_transpose (steps), invert (mirror around the first note or axis, in the scale), retrograde (reverse), augment / diminish (double / halve durations), add_harmony (parallel line steps away: 2 = 3rds, 5 = 6ths; below; pass chords_item whenever the song has chords, so the line follows them), sequence (repeats, steps), negative_harmony
pitch_lowNoOnly notes at or above this pitch
semitonesNo
legato_gapNo
pitch_highNoOnly notes at or below this pitch
chords_itemNoadd_harmony: a MIDI item playing the song's chords (e.g. the keys part). Harmony notes then follow the chord in force instead of only the key, so chords from outside the key don't clash
strum_delayNoQN between strummed notes
velocity_endNo
selected_onlyNoOnly the notes selected in REAPER's MIDI editor
snap_directionNonearest
velocity_scaleNo
velocity_startNo
strum_directionNoup
velocity_amountNoHumanize: max velocity change
quantize_lengthsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.19.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose real behavioral traits: mutations are scoped ('the rest stay as they are') and reversible in a specific granularity ('One undo step'). It does not cover auth/preconditions or return format, but for a MIDI edit tool the disclosure of partial-edit and undo semantics is substantive.

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 purpose and operations, then closes with the two most behaviorally important facts (filter scoping, undo granularity). Dense but every clause earns its place given 15 operations; the operation enumeration is long but justified by the breadth of the tool.

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 30-parameter, 15-operation tool with no output schema and no annotations, the description covers the operation space, filter scoping, and undo semantics adequately. It leans on the schema for per-parameter detail, which is reasonable given the rich enum description, leaving only minor gaps (prerequisites, selection interaction).

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 60%, between the low and high baselines, so the schema already documents much of the per-parameter meaning (grid, key, scale, steps, chords_item, etc.). The description reinforces the operation groupings but adds little parameter syntax beyond what the schema's own operation and property descriptions provide.

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 ('Edits existing MIDI notes') and enumerates the full operation surface (quantize, humanize, transpose, snap, velocity, strum, legato, motif development). It cleanly distinguishes itself from siblings like add_midi_notes, delete_midi_notes, and get_midi_notes by the 'existing' qualifier.

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?

'Edits existing MIDI notes' plus 'Filters pick which notes; the rest stay as they are' gives clear context for when this applies versus creation or deletion tools. It stops short of explicitly naming the alternative tools or stating exclusions, so it is clear context but not full when/when-not routing.

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