Skip to main content
Glama

get_midi_notes

Extract MIDI note data from media items in REAPER projects, returning note timing, pitch, velocity, and channel information for analysis or processing.

Instructions

Read all MIDI notes from a media item's active MIDI take. Returns a list of notes with start_ppq, end_ppq, pitch, velocity, channel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
item_indexYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'get_midi_notes', which exposes the tool and calls the adapter.
    @mcp.tool()
    def get_midi_notes(track_index: int, item_index: int) -> dict[str, Any]:
        """
        Read all MIDI notes from a media item's active MIDI take.
        Returns a list of notes with start_ppq, end_ppq, pitch, velocity, channel.
        """
        try:
            return _wrap(
                adapter.get_midi_notes(track_index=track_index, item_index=item_index)
            )
        except Exception as exc:
            return _err(exc)
  • Tool registration using the @mcp.tool() decorator.
    @mcp.tool()
    def get_midi_notes(track_index: int, item_index: int) -> dict[str, Any]:
  • Adapter method that forwards the 'get_midi_notes' request to the underlying bridge client.
    def get_midi_notes(self, track_index: int, item_index: int) -> dict[str, Any]:
        return self._client.call(
            "get_midi_notes", track_index=track_index, item_index=item_index
        )
Behavior4/5

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

With no annotations, description carries full burden and successfully discloses return format (list with start_ppq, end_ppq, pitch, velocity, channel) and scope limitation (active take only). Missing details on failure modes (invalid indices, non-MIDI item).

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?

Two sentences with zero waste: first defines operation, second defines return structure. Front-loaded with action verb. No redundant text.

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?

Good coverage given output schema exists; description proactively lists return fields which aids agent interpretation. With only 2 simple indices and a clear read operation, nearly complete except for error handling documentation.

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 coverage is 0% (titles only). Description partially compensates by referencing 'media item' (clarifying item_index) but never mentions track_index or explains the track+item coordinate system. Baseline 3 acceptable but could document parameter relationship.

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?

Specific verb 'Read' with clear resource 'MIDI notes from a media item's active MIDI take'. Scope is well-defined (ALL notes from the ACTIVE take) and implicitly distinguishes from siblings like set_midi_notes (write) and delete_midi_note (delete).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage scenario (retrieving existing MIDI data) but lacks explicit guidance on prerequisites (e.g., verifying item exists, has MIDI take) or when to prefer this over get_track_items. No mention of error conditions when indices are invalid.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danielkinahan/ReaMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server