Skip to main content
Glama

quantize_midi_notes

Snap MIDI note onsets to the project bar/beat grid to tighten timing and add swing while 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

A3.9/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and delivers unusually well: it discloses that onsets snap to the project grid, that note lengths are preserved (start/end move together), and the out-of-bounds policy with `clamped` staying 0. It stops short of saying whether edits are in-place/destructive or what the returned payload contains beyond `out_of_bounds`.

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?

Front-loads the operation, then the behavioral contract, then a clean Args block. Every sentence adds information; the grid-reference warning is appropriately prominent.

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 12-parameter, unannotated, no-output-schema mutation tool, the description explains the musical core but omits note selection scope (fields, channel, pitch range, beat range) and return behavior. An agent could invoke it but might not understand how to restrict which notes are affected.

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 coverage is 0% across 12 parameters, so the description must compensate and does so only partially: grid, strength, and swing get excellent units, ranges, and interpolation semantics. The other nine parameters (track_index, item_index, fields, channel, pitch_low/high, start_beat, end_beat, return_notes) are entirely undocumented anywhere.

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?

States a specific verb+resource ('Quantize MIDI note onsets onto the grid') plus the two musical intents (tighten timing, add swing). It is clearly distinct from siblings like nudge_midi_notes, humanize_midi_notes, and stretch_midi_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?

Implies usage via 'tighten sloppy timing, add swing' and clarifies the grid reference (project bar/beat grid, not item offset), which is the key disambiguation for correct use. However, it never explicitly says when to prefer this over humanize/nudge/stretch siblings, or what prerequisites exist.

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