Skip to main content
Glama

apply_midi_gate_pattern

Plan or apply MIDI gate durations for selected notes, preserving pitch, velocity, probability, and expression. Use dry-run to preview changes before confirming.

Instructions

Plan or apply guarded MIDI gate durations while preserving onset, pitch, velocity, probability, and expression metadata.

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.
noteIdsYesUnique stable note IDs at complete selected onsets.
trackIdYesStable track ID returned by list_tracks.
planHashNoHash returned by the matching dry run.
gridBeatsYesReference grid step in beats, including fractional triplet values.
gateRatiosYesExplicit repeating gate ratios by ordered onset.
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

B3.2/5.0
Behavior3/5

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

Annotations indicate a modifying non-destructive operation (readOnlyHint=false, destructiveHint=false). The description adds a valuable guarantee: it preserves onset, pitch, velocity, probability, and expression metadata. However, it does not disclose other behavioral aspects like side effects on note durations, whether changes are reversible, or that a confirmation step is involved.

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 a single, efficient sentence that front-loads the purpose and the key benefit (preserving metadata). No unnecessary words or repetition; it is well-structured and easy to parse.

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?

For a tool with 9 parameters and a two-step plan/apply workflow, the description omits critical context: it does not explain the dry-run/apply distinction, the requirement for a confirmationToken, what 'guarded' means, or return values. With no output schema, the agent is left without guidance on expected results. The description is too minimal for the tool's complexity.

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 descriptions cover all 9 parameters (100% coverage), so the description adds no extra semantic meaning. It references 'gateRatios' and 'gridBeats' implicitly but provides no new information beyond what the schema already states. Baseline 3 is appropriate given high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Plan or apply guarded MIDI gate durations') on a clear resource (MIDI gate durations) and mentions preservation of metadata. However, it does not explicitly distinguish this from sibling 'plan_midi_gate_pattern' or other apply_* tools, and the 'Plan or apply' phrasing is somewhat ambiguous without context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus planning-only tools (e.g., plan_midi_gate_pattern) or other apply_* tools. The schema implies a two-step dry-run/apply process (dryRun, planHash, confirmationToken), but the description does not mention prerequisites, such as needing a plan first or providing a confirmationToken for the apply phase.

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