Skip to main content
Glama

add_notes

Insert MIDI notes into existing MIDI items in REAPER DAW tracks by specifying pitch, timing, duration, and velocity parameters.

Instructions

Add MIDI notes to an existing MIDI item.

Args:
    track_number: Track number (1-based)
    item_index: Index of the MIDI item (0-based)
    notes: List of note dictionaries with:
        - pitch: MIDI note number (0-127, middle C = 60)
        - start: Start position in beats (relative to item)
        - duration: Duration in beats
        - velocity: Velocity (1-127, default 100)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_numberYes
item_indexYes
notesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary MCP tool handler for 'add_notes', decorated with @mcp.tool() which registers the tool and defines its input schema via type annotations and docstring. It calls ReaperBridge.add_notes to perform the action.
    @mcp.tool()
    def add_notes(
        ctx: Context,
        track_number: int,
        item_index: int,
        notes: List[Dict[str, Any]]
    ) -> str:
        """
        Add MIDI notes to an existing MIDI item.
        
        Args:
            track_number: Track number (1-based)
            item_index: Index of the MIDI item (0-based)
            notes: List of note dictionaries with:
                - pitch: MIDI note number (0-127, middle C = 60)
                - start: Start position in beats (relative to item)
                - duration: Duration in beats
                - velocity: Velocity (1-127, default 100)
        """
        bridge = get_bridge()
        result = bridge.add_notes(track_number - 1, item_index, notes)
        return result.get("message", f"Added {len(notes)} note(s)")
  • Helper method in the ReaperBridge class that serializes the add_notes parameters and sends them as a command to the REAPER bridge protocol.
    def add_notes(self, track_index: int, item_index: int, notes: List[Dict]) -> Dict[str, Any]:
        """Add MIDI notes via file command."""
        self._write_command("add_notes", {
            "track_index": track_index,
            "item_index": item_index,
            "notes": notes
        })
        
        response = self._read_response()
        if response:
            return response
        return {"success": True, "message": "Notes command sent"}
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the write operation ('Add MIDI notes') but lacks critical behavioral details: it doesn't mention whether this operation is destructive (e.g., overwrites existing notes), what permissions are required, error handling, or the response format. The description provides some context about note structure but misses broader behavioral traits needed for safe invocation.

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 appropriately sized and front-loaded with the core purpose in the first sentence. The parameter explanations are structured clearly with bullet points, though the formatting could be slightly more concise. Every sentence adds value, with no redundant information.

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 tool's moderate complexity (3 parameters, no annotations, but with an output schema), the description is reasonably complete. It covers parameter semantics thoroughly and states the purpose clearly. Since an output schema exists, the description doesn't need to explain return values, but it could benefit from more behavioral context (e.g., mutation effects, error cases) to be fully comprehensive.

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

Parameters5/5

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

The description adds substantial meaning beyond the input schema, which has 0% description coverage. It explains all three parameters in detail: 'track_number' as 1-based, 'item_index' as 0-based, and 'notes' as a list of dictionaries with specific fields (pitch, start, duration, velocity) including value ranges and defaults. This fully compensates for the schema's lack of documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Add MIDI notes') and target resource ('to an existing MIDI item'), making the purpose immediately understandable. It distinguishes from siblings like 'create_midi_item' by specifying it works on existing items rather than creating new ones. However, it doesn't explicitly differentiate from all possible note-related operations that might exist in other contexts.

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 description implies usage context by specifying 'to an existing MIDI item,' suggesting this tool should be used when you have an existing item to modify rather than creating a new one. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'create_midi_item' or other note manipulation tools, nor does it mention prerequisites or exclusions.

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/yura9011/scythe_mcp_reaper'

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