Skip to main content
Glama

get_selected_midi_notes

Retrieve the MIDI notes currently selected in REAPER's editor for the active take. Use the selection to build explicit value filters for transform tools.

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.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and mostly discharges it: it declares 'Read-only, no undo,' documents the return shape, explains that `index` is REAPER's absolute PPQ-sorted note index so a partial selection is non-contiguous, and defines the empty-selection case. It stops short of error/permission behavior, but for a pure read this is strong disclosure.

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?

Front-loaded with the core action in the first sentence, then usage guidance, then a compact Returns block. No filler; the return-shape detail earns its space because no output schema exists.

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 tool with no output schema, the description usefully specifies return structure and indexing semantics. The remaining gap is parameter documentation at 0% coverage, particularly `fields`, which an agent cannot resolve from either structured source.

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% and the description never mentions track_index, item_index, or fields by name; the only hint is 'for the active take' and 'item-relative start_beat/end_beat.' The `fields` projection parameter is left entirely unexplained in both schema and description, so the description does not compensate for the coverage gap.

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 ('Read the MIDI notes currently SELECTED ... for the active take') with a clearly bounded scope. It is immediately distinguishable from the sibling get_midi_notes, which covers all notes rather than the 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?

Explicitly frames itself as the 'escape hatch for "operate on what I've selected"' and walks through the intended workflow: select by hand in REAPER, call this, then convert the result into an explicit value filter (pitch range / beat window / channel) for transform tools. That is exactly the when-to-use and how-to-follow-up guidance an agent needs.

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