Skip to main content
Glama

get_selected_midi_notes

Read-only

Fetches selected MIDI notes in REAPER's editor for the active take, returning pitch, beat positions, and channel. Use it to convert a manual selection into an explicit filter for targeted MIDI edits.

Instructions

Read the MIDI notes currently SELECTED in REAPER's editor for the active take.

The escape hatch for "operate on what I've selected": select notes by hand in REAPER, call this to see which they are, then translate that into an explicit value filter (pitch range / beat window / channel) for the transform tools. Read-only, no undo.

Returns: {ok, notes:[...], ret} - the selected notes, same shape as get_midi_notes (each note carries item-relative start_beat/end_beat). index is REAPER's absolute PPQ-sorted note index, so a partial selection is non-contiguous. Empty selection -> notes:[].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNo
item_indexYes
track_indexYes

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?

The description adds significant behavioral detail beyond the readOnlyHint annotation: it states 'Read-only, no undo,' describes the exact return shape, explains that `index` is REAPER's absolute PPQ-sorted note index and that a partial selection is non-contiguous, and explicitly handles the empty selection case with `notes:[]`. This fully informs the agent of edge cases and output semantics.

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 compact and well-structured: a clear opening statement, a practical usage note, and a return-value specification. Every sentence adds value, and the most important information (what the tool reads) is front-loaded before the more detailed return semantics.

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?

Given the lack of an output schema, the description thoroughly covers return types and edge cases (non-contiguous selection, empty selection). It also provides usage context. However, the parameter semantics are incomplete, and an agent might not be sure how the required track_index and item_index map to the 'active take,' preventing fully confident invocation without consulting other tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden for explaining parameters. It never explains track_index, item_index, or fields, nor their relationship to the 'active take' mentioned in the opening sentence. The parameter meanings are left to inference from names and sibling tools, which is a clear gap for a tool with 3 parameters and no schema descriptions.

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 description explicitly states 'Read the MIDI notes currently SELECTED in REAPER's editor for the active take,' identifying a specific verb, resource, and scope. It clearly distinguishes itself from siblings like get_midi_notes (which reads all notes) and select_midi_notes (which manipulates selection) by focusing on reading the current selection.

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?

Provides explicit when-to-use guidance: it is the 'escape hatch' for operating on what the user has selected, and instructs the agent to translate the selection into an explicit value filter for transform tools. It also notes that the operation is read-only with no undo, which helps an agent decide when to invoke it over alternatives.

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