Skip to main content
Glama

correct_midi_clip_to_scale

Fix MIDI notes in a clip that fall outside the current Live scale, moving each to the nearest in-scale pitch up, down, or nearest via explicit direction. Existing in-scale notes stay untouched.

Instructions

Plan or apply guarded pitch correction of exact chromatic MIDI notes into the current Live scale. Direction is explicit; equal nearest choices require an explicit tie break. Existing in-scale notes are never changed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clipIdYesStable clip ID: track-N:clip-M from list_clips, or track-N:arrangement-clip-M from list_arrangement_clips for tools that support Arrangement clips.
dryRunNoOmit or true to return a plan; false requires a valid confirmationToken.
noteIdsNoOptional stable note IDs; omitted selects every chromatic note.
trackIdYesStable track ID returned by list_tracks.
planHashNoHash returned by the matching dry run.
tieBreakNoRequired only for equal nearest choices.
directionYes
confirmationTokenNoShort-lived, single-use token returned by the matching dry run.
expectedStateVersionYesExact stateVersion observed immediately before planning.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations provide only readOnlyHint=false and destructiveHint=false. The description adds significant behavioral detail: the tool can either plan or apply, it requires an explicit direction, equal nearest choices require a tie-break, and existing in-scale notes are never changed. This goes well beyond the annotations and discloses the tool's guarded, non-destructive 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?

Two terse sentences with no filler. The main verb and resource are front-loaded, followed by the two most critical behavioral constraints (explicit direction/tie-break and preservation of in-scale notes). Every clause earns its place.

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

Completeness4/5

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

For a tool with 9 parameters and no output schema, the description captures the core behavior, the plan/apply distinction, the direction/tie-break requirement, and the safety guarantee. It relies appropriately on the schema for parameter-level details (planHash, confirmationToken, dryRun) and does not need to restate them. A minor gap is that it does not explain what 'current Live scale' refers to contextually, but this is not critical for correct invocation.

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 89% (8 of 9 properties have descriptions; only 'direction' lacks one). The description adds a little rationale for the direction and tieBreak parameters ('equal nearest choices require an explicit tie break') but largely restates what the schema already communicates (e.g., tieBreak 'Required only for equal nearest choices'). It does not add substantial per-parameter meaning beyond the 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?

Description opens with a specific verb and resource: 'Plan or apply guarded pitch correction of exact chromatic MIDI notes into the current Live scale.' It clearly distinguishes this tool from the many sibling plan_midi_*/apply_midi_* tools by naming the scale-correction purpose and the 'guarded' constraint, which is further clarified as never changing existing in-scale 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?

The description implies when to use it (when needing pitch correction of MIDI notes to the current Live scale) but does not explicitly state when not to use it or which alternative sibling (e.g., plan_midi_diatonic_transposition, apply_midi_scale_chord_remapping) would be preferred. The plan/apply duality is implied by 'Plan or apply,' but no comparison to other pitch-correction tools is given.

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