Skip to main content
Glama

set_midi_note

Modify specific properties of an existing MIDI note in REAPER projects, including pitch, velocity, timing, and channel settings.

Instructions

Modify an existing MIDI note. Only the supplied fields are changed.

  • pitch: MIDI note number (0-127)

  • velocity: 0-127

  • channel: 0-15

  • start_ppq / end_ppq: positions in PPQ ticks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
item_indexYes
note_indexYes
start_ppqNo
end_ppqNo
pitchNo
velocityNo
channelNo
selectedNo
mutedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of the 'set_midi_note' tool, which calls the REAPER client.
    def set_midi_note(
        self,
        track_index: int,
        item_index: int,
        note_index: int,
        start_ppq: int | None = None,
        end_ppq: int | None = None,
        pitch: int | None = None,
        velocity: int | None = None,
        channel: int | None = None,
        selected: bool | None = None,
        muted: bool | None = None,
    ) -> dict[str, Any]:
        return self._client.call(
            "set_midi_note",
            track_index=track_index,
            item_index=item_index,
            note_index=note_index,
            start_ppq=start_ppq,
            end_ppq=end_ppq,
            pitch=pitch,
            velocity=velocity,
            channel=channel,
            selected=selected,
            muted=muted,
        )
    
    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
  • The MCP tool registration and handler entry point for 'set_midi_note'.
    @mcp.tool()
    def set_midi_note(
        track_index: int,
        item_index: int,
        note_index: int,
        start_ppq: int | None = None,
        end_ppq: int | None = None,
        pitch: int | None = None,
        velocity: int | None = None,
        channel: int | None = None,
        selected: bool | None = None,
        muted: bool | None = None,
    ) -> dict[str, Any]:
        """
        Modify an existing MIDI note. Only the supplied fields are changed.
        - pitch: MIDI note number (0-127)
        - velocity: 0-127
        - channel: 0-15
        - start_ppq / end_ppq: positions in PPQ ticks
        """
Behavior3/5

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

Without annotations, the description carries the full behavioral disclosure burden. It successfully indicates partial-update behavior but omits details about error handling (invalid indices), atomicity, or what the output schema contains.

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?

The description is efficiently structured with a clear opening sentence, partial-update clarification, and concise bullet points for parameter constraints. Every element earns its place, though a brief mention of the addressing scheme would have improved completeness without sacrificing brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema, the description appropriately omits return value details. However, for a 10-parameter mutation tool with zero schema coverage, documenting only half the parameters (and omitting the required identifiers) leaves significant gaps in contextual completeness.

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?

With 0% schema description coverage, the description must compensate for all 10 parameters. While it excellently documents value ranges and units for the 5 musical properties (pitch, velocity, etc.), it completely omits the three required addressing fields (track_index, item_index, note_index) and the two boolean flags (selected, muted), leaving critical gaps in how to identify and select the target note.

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 'Modify an existing MIDI note' provides a specific verb (modify) and resource (MIDI note) that clearly distinguishes it from sibling tools like delete_midi_note, get_midi_notes, and insert_midi_event.

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?

The phrase 'Only the supplied fields are changed' effectively documents the partial-update pattern (PATCH semantics), which is critical for understanding the nullable parameter defaults. However, it lacks explicit guidance on when to use this single-note tool versus the plural set_midi_notes or nudge_midi_notes.

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