Skip to main content
Glama

set_midi_note

Edit an existing MIDI note’s pitch, start, length, or channel in place. Pass only the fields you want to change, and the remaining note properties stay untouched.

Instructions

Edit one existing MIDI note in place: pitch, start, length and/or channel. Only the fields you pass change, and at least one is required. (Velocity: set_midi_note_velocity.)

note_index is REAPER's PPQ-sorted index from get_midi_notes / get_selected_midi_notes and is unstable - re-read after the edit, since the returned list reflects the new order.

Args: pitch: New pitch (0-127). start_beat: New start in beats from item start; length is preserved. A start before the item start clamps there and is counted in out_of_bounds, not clamped. length_beats: New length in beats (> 0), resized from the current start. channel: New MIDI channel (0-15).

Returns: {ok, notes_changed, clamped, skipped, out_of_bounds, notes:[...]}, or {ok:false, error} for a bad index, an empty edit, or an out-of-range value (nothing is written).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pitchNo
fieldsNo
channelNo
item_indexYes
note_indexYes
start_beatNo
track_indexYes
length_beatsNo
return_notesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.3

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say destructiveHint=false, so the description carries the disclosure burden and does it thoroughly: partial-update semantics, PPQ-sorted and unstable note_index, clamping behavior for start_beat, and a guarantee that invalid edits write nothing. This goes well beyond the structured annotations and contains 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?

The tool's purpose is stated in the first sentence, and the rest is organized into a note-index warning, an Args block, and a Returns block. Every sentence carries operational content; there is no filler or restatement of the schema.

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?

The description covers most of what an agent needs for a state-changing MIDI edit: preconditions for note_index, partial updates, error behavior, and return shape. It is not fully complete because some return counters (e.g., skipped, clamped, out_of_bounds) and the `fields`/`return_notes` parameters are not clearly defined, and no output schema exists to fill those gaps.

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?

With 0% schema description coverage, the Args section adds important range and behavior semantics for pitch, start_beat, length_beats, and channel, and it clarifies the unstable meaning of note_index. However, it does not explain the `fields` parameter, `return_notes`, or track_index/item_index values, so an agent still has to infer or discover significant parts of the 9-parameter 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?

The opening sentence states the exact operation ('Edit one existing MIDI note in place') and the modified attributes (pitch, start, length, channel), which clearly separates it from add/delete/velocity tools. The parenthetical 'Velocity: set_midi_note_velocity' directly names the closest sibling, removing ambiguity.

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?

The description frames the tool as editing one existing note with partial updates and at least one required field, making its use case clear. It explicitly routes velocity changes to set_midi_note_velocity, but it does not spell out when to prefer add_midi_note, add_midi_notes_batch, or delete_midi_note beyond the word 'existing'.

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