Skip to main content
Glama

create_midi_item

Add a MIDI item to a track with optional note data to compose or edit music in REAPER projects.

Instructions

Create a MIDI item on a track and optionally pre-populate it with notes.

  • start / end: time in seconds

  • notes: list of {start_ppq, end_ppq, pitch, velocity=100, channel=0}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
startYes
endYes
notesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool definition for `create_midi_item`, which wraps the `ReaperAdapter` method.
    @mcp.tool()
    def create_midi_item(
        track_index: int,
        start: float,
        end: float,
        notes: list[dict[str, Any]] | None = None,
    ) -> dict[str, Any]:
        """
        Create a MIDI item on a track and optionally pre-populate it with notes.
        - start / end: time in seconds
        - notes: list of {start_ppq, end_ppq, pitch, velocity=100, channel=0}
        """
        try:
            return _wrap(
                adapter.create_midi_item(
                    track_index=track_index,
                    start=start,
                    end=end,
                    notes=notes,
                )
            )
        except Exception as exc:
            return _err(exc)
  • The actual implementation in `ReaperAdapter` that calls the bridge client to create a MIDI item.
    def create_midi_item(
        self,
        track_index: int,
        start: float,
        end: float,
        notes: list[dict[str, Any]] | None = None,
    ) -> dict[str, Any]:
        return self._client.call(
            "create_midi_item",
            track_index=track_index,
            start=start,
            end=end,
            notes=notes or [],
        )
Behavior3/5

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

Reveals crucial behavioral detail that time bases are mixed (start/end in seconds, but note timestamps in PPQ). No annotations provided, so description carries full burden; it lacks safety info (failure modes, idempotency, destructiveness) and error handling despite being a creation operation.

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?

Extremely efficient structure: one sentence for purpose, bullet points for parameter details. No wasted words; every element conveys necessary information not present in schema.

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?

Medium complexity tool with nested object structures. Description partially covers parameters (missing track_index semantics) and lacks safety/error context. Output schema exists (per context signals), relieving the need to document return values.

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 has 0% description coverage. Description compensates substantially by documenting 3 of 4 parameters: start/end units (seconds) and notes structure with field names and defaults. Only `track_index` remains undocumented (0-indexed? bounds?).

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?

States specific verb (Create) and resource (MIDI item) with clear scoping (on a track). Distinguishes from audio insertion and track creation siblings, though could clarify distinction from `insert_midi_event` or `set_midi_notes`.

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 through 'optionally pre-populate,' suggesting it can create empty items or pre-filled ones. Lacks explicit when-to-use versus alternatives or prerequisites (e.g., whether track must exist first).

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