Skip to main content
Glama

quantize_midi_notes

Quantize MIDI note onsets to the project grid to tighten sloppy timing and add swing, preserving note lengths.

Instructions

Quantize MIDI note onsets onto the grid (tighten sloppy timing, add swing).

Onsets snap to the PROJECT bar/beat grid, not to an offset from the item's own start, and note lengths are preserved: start and end move together. Notes that land past the item end are kept, and one that would land before the item start is placed at it; both are counted in out_of_bounds (clamped stays 0 here).

Args: grid: Grid spacing in beats: 0.25 = 1/16, 0.5 = 1/8, 1.0 = 1/4. Must be > 0. strength: 0.0-1.0. 1.0 snaps exactly onto the grid, 0.5 moves each note halfway there, 0.0 is a no-op. swing: 0.0-1.0. 0.0 = straight, 1.0 = full triplet feel (off-beats at 66.7%), scaling linearly between. Only the off-beat (odd) grid cells are delayed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gridNo
swingNo
fieldsNo
channelNo
end_beatNo
strengthNo
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

A4/5.0
Behavior5/5

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

The description goes beyond the annotations by detailing edge cases (notes past item end kept, before start clamped), the counting of out_of_bounds, and the exact semantics of strength and swing. It discloses the non-destructive nature implied by destructiveHint=false and adds substantial behavioral context, making it highly transparent.

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?

The description is well-structured with a clear opening sentence, a behavioral paragraph, and an args section. It is appropriately detailed for the tool's complexity, but the long list of parameters could be more concise. The front-loaded purpose is effective.

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?

Despite a thorough explanation of the quantization behavior, the description omits critical context: it does not explain the filtering parameters (fields, channel, pitch range, start/end beats) or the return value structure (though it mentions out_of_bounds/clamped). With no output schema and 12 params, an agent lacks complete information to correctly invoke the tool for all use cases.

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?

The schema has 12 parameters with 0% description coverage, so the description must compensate. It explains only three parameters (grid, strength, swing) in detail, but leaves the others (fields, channel, pitch_low, pitch_high, start_beat, end_beat, return_notes, etc.) unexplained. An agent would not know the purpose or constraints of these remaining parameters from the description alone.

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 function: quantize MIDI note onsets onto the grid, with explicit mention of tightening timing and adding swing. It identifies the specific resource (MIDI notes) and the action (quantize), distinguishing it from other MIDI editing tools like humanize or snap-to-scale, even though it doesn't name alternatives.

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 context on when to use this tool (when quantizing note onsets to the grid) and explains its behavior (snaps to project grid, preserves lengths, handles out-of-bounds). However, it does not explicitly mention alternatives or when not to use it, such as distinguishing from snap_midi_notes_to_scale or nudge_midi_notes.

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