Skip to main content
Glama

Write step sequencer (drum pattern)

fl_set_step_grid
Idempotent

Sets a channel's step-sequencer steps in the current pattern, turning exactly the specified steps on and all others off; changes can be rolled back.

Instructions

Set a channel's step-sequencer steps in the CURRENT pattern: exactly the given steps on, the rest of 0..length-1 off. Snapshot, read back, undo with fl_rollback_last_change.

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": {
      "channel": "<channel>"
    },
    "name": "fl_set_step_grid"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepsNoOr: step indexes that are on (0 = first 1/16).
lengthNoSteps to write; all others in range are turned off.
channelYesChannel-rack channel index.
patternNoSteps as text, e.g. 'x...x...x...x...' (four on the floor); 'x' or '1' = on.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover readOnly=false, idempotent=true, destructive=false. The description adds real behavioral context beyond them: this is a whole-state overwrite that turns off every step in 0..length-1 not listed, and there is a snapshot/read-back/rollback workflow. The one gap is that 'Snapshot, read back' is telegraphic and doesn't say whether the tool takes the snapshot itself or the agent must.

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?

Two short sentences with the write semantics front-loaded and the rollback hint last — no filler. The second sentence is clipped to the point of ambiguity ('Snapshot, read back'), which costs a little clarity.

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

Completeness4/5

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

With an output schema present and full annotation coverage, the definition only needs to convey the mutation model and safety path, which it does. It leaves minor unknowns — whether a non-current pattern can be targeted and what happens on an invalid channel — but nothing an agent needs to call it correctly is missing.

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 description coverage is 100%, so all four parameters (channel, length, steps, pattern) are already documented in the schema. The description's 'the rest of 0..length-1 off' largely restates the schema's own note that 'all others in range are turned off,' so it adds little new meaning. Baseline 3 is appropriate.

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 ('Set a channel's step-sequencer steps') plus the scope ('in the CURRENT pattern') and the precise write semantics ('exactly the given steps on, the rest of 0..length-1 off'). This clearly separates it from the read-side sibling fl_get_step_grid and from the piano-roll/raga writers.

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?

Gives clear usage context — writes always target the CURRENT pattern, so the agent knows pattern selection must happen first — and names the recovery path (fl_rollback_last_change). It stops short of explicit when-not guidance or naming a sibling for non-step (melodic) writing, so it is clear but not complete on alternatives.

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