Skip to main content
Glama

scale_midi_note_velocities

Scale MIDI note velocities in REAPER by multiplying, setting a fixed value, or compressing toward a pivot, with results clamped to 1-127.

Instructions

Scale MIDI note velocities: multiply, set to a fixed value, or compress toward a pivot. Results clamp to 1-127.

Args: mode: "multiply" (velocity * ratio), "set" (velocity becomes value), or "compress" (pivot + (velocity - pivot) * ratio). ratio: Multiply factor (>= 0, no upper cap), or compress amount (0.0-1.0, where 0 collapses every note onto the pivot and 1.0 changes nothing). value: Target velocity for "set" mode (1-127). pivot: What compress pulls toward (1-127), or -1 for the rounded mean of the matched notes' velocities (reported as pivot_used).

Returns: {ok, notes_changed, clamped, skipped, out_of_bounds, pivot_used, notes:[...]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNomultiply
pivotNo
ratioNo
valueNo
fieldsNo
channelNo
end_beatNo
pitch_lowNo
item_indexYes
pitch_highNo
start_beatNo
track_indexYes
return_notesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.3

TDQS

A3.9/5.0
Behavior4/5

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

Aside from destructiveHint=false, annotations carry little behavioral context, so the description does the heavy lifting. It clearly discloses clamping to 1-127, exact transformation formulas per mode, the special pivot=-1 mean behavior with pivot_used reporting, and the shape of the result with counts such as clamped, skipped, and out_of_bounds. This goes well beyond what annotations provide.

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 well-structured: a one-line purpose statement, compact Args blocks with precise semantics, and a Returns contract. There is no filler, and each sentence contributes either a transformation rule, a boundary condition, or return-field information.

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?

For a 13-parameter tool with no output schema, the description covers the core transformation logic and return shape, which is good. However, it does not explain the filtering parameters or the meaning of fields, leaving some supported invocations underdocumented. It is complete for basic use but not fully self-contained for all capabilities.

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?

Schema description coverage is 0%, so the description must compensate. It thoroughly explains mode, ratio, value, and pivot, but it leaves several parameters undocumented, including fields, channel, pitch_low, pitch_high, start_beat, end_beat, and return_notes. Some parameter names are self-explanatory, but the gap is still noticeable for a 13-parameter tool.

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 opens with a specific verb and resource: 'Scale MIDI note velocities', then lists three concrete modes (multiply, set, compress). This makes the tool's purpose immediately clear and helps distinguish it from single-note velocity edits like set_midi_note_velocity and from shape-based operations like ramp_midi_note_velocities.

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 mode descriptions imply usage scenarios (multiply, set, compress), and the phrase 'matched notes' implies a filtered bulk operation. However, the description never explicitly tells the agent when to choose this tool over related siblings such as set_midi_note_velocity or ramp_midi_note_velocities, and it provides no exclusions or alternative-selection guidance.

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

Deploy Server

Other Tools