Skip to main content
Glama

mcp_opendaw_scale_durations

Scale all note durations in a region with modes for multiply, add, set, quantize, or legato. Control articulation globally by shortening, lengthening, or snapping notes to grid.

Instructions

Scale the duration of all notes in a region — MIDI note length control.

Like scale_velocity but for note durations. Multiply, set, add, quantize, or snap to grid. Useful for changing articulation globally — make all notes shorter (staccato feel), longer (legato feel), or snap to a grid.

mode: How to scale durations:

  • "multiply" — multiply each note's duration by value (0.5 = half length, 2.0 = double). Clamped to min/max.

  • "add" — add value (in beats) to each duration. Clamped.

  • "set" — set all durations to value (in beats).

  • "quantize" — snap each duration to the nearest grid division. value = grid in beats (0.25 = 16th, 0.5 = 8th, 1.0 = quarter).

  • "legato" — extend each note to just before the next note's start. value = gap fraction (0.0 = touch next note, 0.1 = 10% gap before next).

value: The scaling parameter (meaning depends on mode). region_index: Region index (-1 = first region). min_duration / max_duration: Clamp range in beats. quantize: Grid for quantize mode ("16th", "8th", "quarter", "half") — overrides value if mode="quantize".

Returns count of notes modified, original and new duration stats.

Example:

Make everything half length (staccato feel)

scale_durations(0, 0, mode="multiply", value=0.5)

All notes to quarter note length

scale_durations(0, 3, mode="set", value=1.0)

Snap durations to 16th grid

scale_durations(0, 0, mode="quantize", quantize="16th")

Legato — extend to next note with small gap

scale_durations(0, 1, mode="legato", value=0.1)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNomultiply
valueNo
quantizeNonone
unit_indexYes
track_indexYes
max_durationNo
min_durationNo
region_indexNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries full responsibility for behavioral disclosure and delivers comprehensively. It details each mode's exact behavior (multiply, add, set, quantize, legato), explicitly mentions clamping to min/max, quantize overriding value, and legato gap semantics. It also states the return value (count of notes modified and duration stats), providing a thorough behavioral contract.

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 detailed but well-organized: an introductory summary, a structured list of modes with clear definitions, parameter explanations, and a practical example block. Every sentence adds meaningful information; no filler or redundancy. The formatting with bullets and spacing enhances readability without bloating the content.

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?

Given the tool's complexity (8 parameters, 5 modes, clamping, quantize override), the description covers all necessary context: parameter meaning, mode behavior, defaults, and examples. The return value is also described, which, combined with the output schema, gives a complete picture. No significant gaps remain.

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?

Schema description coverage is 0%, so the description must fully compensate for all 8 parameters. It does so by explaining every mode's effect on the value parameter, defining min/max as clamp range, region_index's -1 meaning, and quantize override behavior. The inclusion of concrete examples (e.g., mode=multiply with value=0.5) further clarifies parameter usage beyond the bare schema.

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 clearly states the tool's purpose: 'Scale the duration of all notes in a region' with an explicit scope (MIDI note length control). It distinguishes itself from siblings by referencing scale_velocity ('Like scale_velocity but for note durations'), making it immediately clear which operation it performs and how it differs from similar tools.

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 provides clear usage context: 'Useful for changing articulation globally — make all notes shorter (staccato feel), longer (legato feel), or snap to a grid.' It also names an alternative (scale_velocity) to clarify when this tool is not appropriate. While it doesn't explicitly enumerate when not to use it, the comparison to scale_velocity gives a strong implicit guideline.

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/ameobius-ai/opendaw-mcp'

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