Skip to main content
Glama

set_midi_notes

Batch-edit multiple MIDI notes simultaneously in REAPER projects. Update pitch, velocity, timing, and other properties for multiple notes in one efficient operation.

Instructions

Batch-edit multiple MIDI notes in one call. More efficient than calling set_midi_note() repeatedly. Each entry in 'notes' must have 'note_index' and any subset of: pitch, velocity, start_ppq, end_ppq, channel, selected, muted. Omitted fields keep their current values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
item_indexYes
notesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the `set_midi_notes` tool, which wraps the adapter call.
    @mcp.tool()
    def set_midi_notes(
        track_index: int,
        item_index: int,
        notes: list[dict[str, Any]],
    ) -> dict[str, Any]:
        """
        Batch-edit multiple MIDI notes in one call. More efficient than calling
        set_midi_note() repeatedly.
        Each entry in 'notes' must have 'note_index' and any subset of:
          pitch, velocity, start_ppq, end_ppq, channel, selected, muted.
        Omitted fields keep their current values.
        """
        try:
            return _wrap(
                adapter.set_midi_notes(
                    track_index=track_index,
                    item_index=item_index,
                    notes=notes,
                )
            )
        except Exception as exc:
            return _err(exc)
  • Registration of the `set_midi_notes` function as an MCP tool.
    @mcp.tool()
  • The adapter implementation that forwards the `set_midi_notes` request to the bridge client.
    def set_midi_notes(
        self,
        track_index: int,
        item_index: int,
        notes: list[dict[str, Any]],
    ) -> dict[str, Any]:
        return self._client.call(
            "set_midi_notes",
            track_index=track_index,
            item_index=item_index,
            notes=notes,
        )
Behavior3/5

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

No annotations provided, so description carries full burden. Critically discloses partial-update behavior ('Omitted fields keep their current values'). Missing mutation side-effects, error handling for invalid note_index, or idempotency details.

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?

Three sentences with zero waste. First sentence establishes purpose, second provides usage guidance, third explains parameter semantics and behavior. Well-structured and front-loaded.

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?

With output schema present, description appropriately focuses on input requirements. Comprehensive coverage of the complex nested notes structure. Minor gap: could reference how to obtain track/item indices from sibling tools like get_track_items.

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

Parameters4/5

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

Schema coverage is 0%, requiring description to compensate. Excellent documentation of complex 'notes' array structure (required fields, valid subset fields, omission behavior). However, track_index and item_index lack semantic explanation despite being required identifiers.

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?

Explicitly states 'Batch-edit multiple MIDI notes' with clear verb, resource, and scope. Explicitly distinguishes from sibling tool set_midi_note() by stating efficiency advantage for batch operations vs repeated single calls.

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?

Explicitly compares to set_midi_note() stating this is preferable for batch operations. Lacks explicit 'when not to use' guidance (e.g., single-note edits) or prerequisites for track/item indices.

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