Skip to main content
Glama

write_drum_pattern

Program drum patterns into Ableton Session clips from style presets or custom role layers; maps roles to Drum Rack pads or MIDI notes when no rack exists.

Instructions

Program drums into a Session slot (clip created to fit) on a track with a Drum Rack. Roles are mapped to the kit's pads by their names (a similar free pad stands in for a missing role; missing ones are reported); without a Drum Rack, General MIDI notes are used.

Start from a library style and/or give layers: {role: grid} or {role: {"euclid": [hits, steps, rotate]}}; layers override or extend the style. Roles: kick, clap, snare, rim, closed_hat, open_hat, pedal_hat, ride, crash, tom_low, tom_mid, tom_high, perc, shaker, tambourine, conga, bongo, clave, cowbell, fx. A grid shorter or longer than a bar cycles over the whole clip (a 12-step loop drifts against 16-step bars). Grid: x hit · X accent · o ghost · . rest · 2/3/4 ratchet · ? 50 % · * 25 % ghost (probabilities use Live 12's per-note chance, so the loop varies as it plays).

Parameters:

  • track_index / clip_index: Drum track and Session slot

  • style: Library pattern (see drum_patterns)

  • layers: Extra or replacement grids per role

  • bars: Clip length in bars (4/4)

  • steps_per_bar: Grid resolution (16 = 16ths, 12 = 8th-note triplets, 32)

  • swing_pct: Swing on odd steps, 50 = straight (default: the style's)

  • fill: Every fill_every bars: roll, drop, open_hat, ratchet or crash

  • variation: 0-1, chance of extra ghost hats (written with low probability)

  • humanize: Timing spread in beats (e.g. 0.005), with small velocity changes

  • replace: Clear an existing clip in the slot first

  • seed: Random seed for variation/humanize

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "track_index": "<track_index>",
      "clip_index": "<clip_index>"
    },
    "name": "write_drum_pattern"
  }
}

Input Schema

NameRequiredDescriptionDefault
barsNo
fillNo
seedNo
styleNo
layersNo
replaceNo
humanizeNo
swing_pctNo
variationNo
clip_indexYes
fill_everyNo
track_indexYes
steps_per_barNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses role-to-pad mapping, that a similar free pad stands in for a missing role and missing ones are reported, the General MIDI fallback without a Drum Rack, that probabilities map to Live 12 per-note chance, and that `replace` clears the existing slot. Gaps remain around what happens to an occupied slot when replace is false and what errors/failures are surfaced.

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?

Front-loaded with the core action and clip-creation effect, then layered detail in a defensible order. The long role enumeration and grid symbol legend are necessary reference data, but the paragraphs are dense and could be bulleted more tightly.

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

Completeness5/5

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

For a 13-parameter generator with nested `layers` objects and no annotation coverage, the description supplies everything needed to call it correctly: role vocabulary, grid syntax, mode selection, and defaults. An output schema exists, so return values need not be explained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the description compensates fully, documenting all 13 parameters including defaults implied by prose ("50 = straight", "default: the style's"), and adding non-schema meaning such as grid resolution values (16/12/32) and humanize units in beats. It also supplies the grid grammar and the full 19-role vocabulary that the schema cannot express.

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 and resource ("Program drums into a Session slot... on a track with a Drum Rack") plus the clip-creation side effect, and points at drum_patterns for library styles so it is distinguishable from generic note-writing siblings such as add_notes_to_clip.

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?

Explains the two composition modes ("Start from a library `style` and/or give `layers`") and that layers override or extend the style, which is real routing guidance. It stops short of stating when to prefer this over siblings like add_notes_to_clip or write_clip_evolution, and gives no explicit exclusions.

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