Skip to main content
Glama

humanize_midi_notes

Adds subtle human feel to MIDI notes by applying small random timing and velocity offsets. Reproducible with a seed, preserves note lengths, and clamps velocities to valid range.

Instructions

Humanize MIDI: nudge timing and velocity by small random amounts, reproducibly.

Each note gets its own timing and velocity offset drawn from a bell curve. Note lengths are preserved (start and end move together) and pitches are never touched. The randomness is seeded, so the same take with the same seed and settings gives identical results every time. Velocities are clamped to 1-127 and counted in clamped; notes pushed past the item end are kept and reported in out_of_bounds.

Unlike the other timing tools, a note pushed before the item start is placed at the item start and counted in out_of_bounds, not clamped; clamped here counts only the velocity clamp.

Args: timing: Timing spread in beats (standard deviation); 0.02 is a subtle human feel, 0.0 leaves timing alone. velocity: Velocity spread (standard deviation, in velocity units); 0.0 leaves velocity alone. seed: Any integer. The same seed, settings and take give the same result. max_sigma: Cap on how far one note may stray, in multiples of the spread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
fieldsNo
timingNo
channelNo
end_beatNo
velocityNo
max_sigmaNo
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.3/5.0
Behavior5/5

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

Annotations only provide destructiveHint: false, so the description carries the full burden and exceeds it. It discloses that pitches are never touched, lengths are preserved, velocities are clamped to 1-127, notes pushed past the item end are kept and reported, and that randomness is seeded and reproducible. It also explains the difference in clamping behavior for notes before the item start. This is comprehensive and goes far beyond the minimal annotation.

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 summary, a paragraph explaining the core behavior and edge cases, then a concise bullet list of key parameters. Every sentence adds value, and the most important behavioral details are front-loaded. There is no fluff or repetition.

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?

Given the tool's complexity (13 parameters, no output schema), the description covers the core behavior well but leaves many parameters undefined. It does not explain what the function returns (e.g., the structure of 'out_of_bounds' or 'clamped' results) nor the purpose of parameters like 'fields', 'return_notes', or the pitch/beat range filters. An agent would need to infer or guess these, which is a gap.

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?

The schema has 0% description coverage, so the description must explain parameters. It does explain four key parameters (timing, velocity, seed, max_sigma) with meaningful details like standard deviation and defaults. However, it leaves nine other parameters (track_index, item_index, fields, channel, start_beat, end_beat, pitch_low, pitch_high, return_notes) unexplained. While some are self-explanatory by name, the description does not fully compensate for the schema's lack of descriptions.

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 starts with a clear verb+resource: 'Humanize MIDI: nudge timing and velocity by small random amounts, reproducibly.' It precisely states what the tool does and even differentiates from sibling tools by noting 'Unlike the other timing tools' and explaining a specific behavioral difference. This makes it easy for an agent to know exactly what this tool is for.

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 a clear behavioral distinction from 'other timing tools' (clamping vs. clamping behavior for out-of-bounds notes), which helps an agent decide when to use this tool. However, it does not explicitly state 'use this when you want a natural, human feel' or name specific alternatives like quantize or nudge, leaving some inference to the agent. It is close to explicit but could be more direct.

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