Skip to main content
Glama

configure_midi_input

Set a track's record input to a MIDI device and channel, arm or monitor as needed, then verify the settings. Use after get_midi_inputs to specify a device.

Instructions

Set one track's record input to a MIDI device and channel, optionally record-arm it and turn input monitoring on or off, then read the values back. Omitted arm/monitor are left unchanged; the record input is always set (device 63, channel 0 when omitted). Returns {track_guid, input, armed, monitoring}, where input is REAPER's I_RECINPUT code (4096 + device*32 + channel). Errors: NO_MIDI_INPUT (device index not present), BAD_PAYLOAD (value out of range), VERIFY_FAILED (REAPER did not keep the setting), NO_TARGET_TRACK / AMBIGUOUS_TARGET_TRACK. Undoable. Use get_midi_inputs first to find the device index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
armNotrue arms the track for recording, false disarms; omit to leave as is.
trackNoExact track name (case-insensitive); "master" targets the master track. Used when no GUID is given; errors if two tracks share the name.
deviceNoDevice index from get_midi_inputs; 62 = virtual MIDI keyboard, 63 = all devices (default).
channelNoMIDI channel to record: 0 = all channels (default), 1..16 = that channel only.
dry_runNoPreview: return what would run without changing the project.
monitorNotrue turns input monitoring on, false off; omit to leave as is.
track_containsNoCase-insensitive substring; used only when no GUID or exact name is given. Errors if it matches more than one track.
target_track_guidNoStable REAPER track GUID; preferred when available. Wins over every other track selector.
use_selected_trackNoTarget the first selected track; ignored when any other track selector is given. Errors if nothing is selected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv3.21.0
    • addedInput schema / properties / arm / description
      Added value: +"true arms the track for recording, false disarms; omit to leave as is."
    • changedInput schema / properties / channel / description
      Previous value: -"0 all, 1..16 specific"New value: +"MIDI channel to record: 0 = all channels (default), 1..16 = that channel only."
    • addedInput schema / properties / channel / maximum
      Added value: +16
    • addedInput schema / properties / channel / minimum
      Added value: +0
    • addedInput schema / properties / device / description
      Added value: +"Device index from get_midi_inputs; 62 = virtual MIDI keyboard, 63 = all devices (default)."
    • addedInput schema / properties / device / maximum
      Added value: +63
    • addedInput schema / properties / device / minimum
      Added value: +0
    • removedInput schema / properties / fx_guid
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / fx_index
      Removed value: -{
      -  "type": "integer"
      -}
    • removedInput schema / properties / fx_name_contains
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / fx_scope
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / monitor / description
      Added value: +"true turns input monitoring on, false off; omit to leave as is."
    • changedInput schema / properties / target_track_guid / description
      Previous value: -"Stable REAPER track GUID; preferred when available."New value: +"Stable REAPER track GUID; preferred when available. Wins over every other track selector."
    • changedInput schema / properties / track / description
      Previous value: -"Exact track name (case-insensitive)."New value: +"Exact track name (case-insensitive); \"master\" targets the master track. Used when no GUID is given; errors if two tracks share the name."
    • changedInput schema / properties / track_contains / description
      Previous value: -"Case-insensitive substring; errors if it matches more than one track."New value: +"Case-insensitive substring; used only when no GUID or exact name is given. Errors if it matches more than one track."
    • changedInput schema / properties / use_selected_track / description
      Previous value: -"Target the currently selected track instead of naming one."New value: +"Target the first selected track; ignored when any other track selector is given. Errors if nothing is selected."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden of disclosing behavior. It states that the record input is always set even when other fields are omitted, that the operation is undoable, that values are read back, and it enumerates the exact error codes. It also explains the I_RECINPUT encoding, which is valuable non-obvious behavior.

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?

The description is dense but every sentence earns its place: the core action, the omission/default behavior, the return shape, the error list, the undo property, and the prerequisite. It is compact, front-loaded, and contains no filler.

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

Completeness5/5

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

This is a complex 9-parameter tool with no annotations and no output schema. The description compensates by specifying the return object shape, the exact encoding formula, all relevant error cases, and the undo behavior, while the schema fully documents parameter semantics. An agent has enough context to select and call the tool correctly.

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

Parameters3/5

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

The input schema already covers all 9 parameters at 100% coverage, including defaults and 'leave as is' semantics. The description adds a small amount of cross-parameter meaning ('the record input is always set') and a tool prerequisite, but most parameter-level meaning is already in the schema, so the baseline of 3 is appropriate.

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 names the exact action—'Set one track's record input to a MIDI device and channel'—and adds the optional arm/monitor behavior plus a read-back of the resulting state. This is specific enough to distinguish the tool from siblings like get_midi_inputs, which is referenced as a prerequisite rather than a substitute.

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?

The description gives an explicit prerequisite ('Use get_midi_inputs first to find the device index') and explains the default/omission behavior for arm, monitor, device, and channel. It does not explicitly list alternative tools or state when not to use configure_midi_input, so it falls just short of a full 5.

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