Skip to main content
Glama

midi

Manage musical notes and control changes on a REAPER track item. Create, append, replace, update, or delete notes, and insert or read CC and program changes.

Instructions

MIDI on a track item. Times are absolute project beats. action: create_item | add | get | replace | update | delete | cc | get_cc. replace rewrites the whole take in one undo step; add only appends. cc inserts CC (cc+value) or program change (program) via ccs[]; get_cc reads CC, program and pitch_bend back in that shape. get omits index (use array offset), channel if 0, muted/selected if false.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>",
      "track_index": "<track_index>"
    },
    "name": "midi"
  }
}

Input Schema

NameRequiredDescriptionDefault
ccsNo
mutedNo
notesNo
pitchNo
actionYes
channelNo
velocityNo
item_indexNo
note_indexNo
start_beatsNo
track_indexYes
length_beatsNo
note_indicesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "create_item",
      -  "add",
      -  "get",
      -  "replace",
      -  "update",
      -  "delete",
      -  "cc"
      -]New value: +[
      +  "create_item",
      +  "add",
      +  "get",
      +  "replace",
      +  "update",
      +  "delete",
      +  "cc",
      +  "get_cc"
      +]
  2. Changed2 schema fields changedv0.5.0
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "create_item",
      -  "add",
      -  "get",
      -  "replace",
      -  "update",
      -  "delete"
      -]New value: +[
      +  "create_item",
      +  "add",
      +  "get",
      +  "replace",
      +  "update",
      +  "delete",
      +  "cc"
      +]
    • addedInput schema / properties / ccs
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "cc": {
      +        "maximum": 127,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "channel": {
      +        "maximum": 15,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "program": {
      +        "maximum": 127,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "start_beats": {
      +        "type": "number"
      +      },
      +      "value": {
      +        "maximum": 127,
      +        "minimum": 0,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "start_beats"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  3. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two valuable traits the schema cannot: replace's whole-take rewrite in one undo step, and get's omission of zero/false fields in the response. It says nothing about delete being destructive/irreversible, permission or track-item preconditions, or failure modes, which is a meaningful gap for a mutation tool with zero annotation coverage.

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?

It is a single dense block with the action list front-loaded and no filler sentences; the replace/add and cc/get_cc contrasts each earn their place. It is terse to the point of being terse over telegraphic, but nothing is redundant.

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

Completeness2/5

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

For a 13-parameter, 8-action tool with no annotations, no output schema, and 0% schema coverage, the description is far from sufficient: an agent cannot learn the per-action parameter contract or the response shape for notes/CC reads. What is present is high value but covers a minority of the calling surface.

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?

Schema description coverage is 0%, so the description must document the 13 parameters; it only clarifies that times are absolute project beats and explains the ccs[] shape (cc+value or program). notes[], pitch, velocity, length_beats, note_index, note_indices, item_index and track_index go entirely undocumented, and it never says which parameters are required per action.

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 names the resource ('MIDI on a track item') and enumerates all eight actions supported by the action enum, so an agent can see this is a multi-op MIDI note/CC manipulation tool. It does not disambiguate against siblings (e.g. item), but no sibling appears to overlap in MIDI domain, so the boundary is reasonably clear.

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?

It explicitly contrasts replace vs add ('replace rewrites the whole take in one undo step; add only appends') and pairs cc with get_cc, which are real usage choices. However, nothing tells the agent when to choose create_item vs add vs update, or what preconditions exist (item must already exist, track must have a MIDI item), leaving the biggest routing decision implicit.

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