Skip to main content
Glama
FL Studio MCP (fLMCP)

FL Studio MCP (fLMCP)

Set Pattern Length

pattern_set_length
Idempotent

Set a 1-based pattern's loop length in bars, beats, or 16th-note steps for FL Studio 2026+, returning the resulting steps, beats, and bars.

Instructions

Set a 1-based pattern's loop length in bars, beats, or 16th-note steps (FL Studio 2026+).

Supply exactly one of bars, beats, or steps (passing zero or multiple raises a tool error). Returns the resulting length in steps, beats, and bars. On FL 2024/2025 where this API is unavailable, returns ok=False with a hint—extend notes or the step grid instead.

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": {
      "index": "<index>"
    },
    "name": "pattern_set_length"
  }
}

Input Schema

NameRequiredDescriptionDefault
barsNoTarget length in bars using the project time signature. Provide exactly one of `bars`, `beats`, or `steps`.
beatsNoTarget length in beats (quarter notes in 4/4). Provide exactly one of `bars`, `beats`, or `steps`.
indexYes1-based pattern index whose length will be set.
stepsNoTarget length in 16th-note steps (4 per beat, 16 per 4/4 bar). Provide exactly one of `bars`, `beats`, or `steps`.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.6.1
    • addedInput schema / properties / bars / description
      Added value: +"Target length in bars using the project time signature. Provide exactly one of `bars`, `beats`, or `steps`."
    • addedInput schema / properties / beats / description
      Added value: +"Target length in beats (quarter notes in 4/4). Provide exactly one of `bars`, `beats`, or `steps`."
    • addedInput schema / properties / index / description
      Added value: +"1-based pattern index whose length will be set."
    • addedInput schema / properties / steps / description
      Added value: +"Target length in 16th-note steps (4 per beat, 16 per 4/4 bar). Provide exactly one of `bars`, `beats`, or `steps`."
  2. First observedv0.6.0

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations (which already declare non-read-only, idempotent, non-destructive), the description discloses the error condition for zero/multiple values, the returned shape (steps/beats/bars), and version gating with an ok=False hint on FL 2024/2025. That is meaningful behavior an agent could not get from the annotations alone.

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?

The primary action is front-loaded in the first sentence, followed by the constraint, return value, and version fallback in a tight second sentence. No filler, though the parenthetical version note and return summary add density.

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 four-parameter setter with an output schema, the description covers the mutation's constraint, the return values, and the version-gated failure path. Nothing an agent needs in order 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 the schema already explains each parameter including the one-of constraint. The description reinforces the exactly-one rule and the 1-based index but adds no syntax or format detail beyond what the schema provides, so the baseline 3 applies.

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 names a specific verb and resource ('Set a 1-based pattern's loop length') plus the three units accepted, so the action is unambiguous. It does not explicitly contrast itself with any named sibling such as transport_song_length, leaving that distinction to be inferred from the word 'pattern'.

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?

It states the mutual-exclusion rule ('Supply exactly one of bars, beats, or steps') and that zero or multiple values raise a tool error, which is concrete usage context. It also covers the unavailable-API case and points to a workaround, but never names an alternative tool for when this call is not appropriate.

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