Skip to main content
Glama

Get pattern length

fl_pattern_get_length
Read-onlyIdempotent

Retrieves a pattern's length in beats, ticks, and bars, plus its name and selection state, using a 1-based pattern index.

Instructions

Pattern length in BEATS (FL's native unit) + derived ticks and bars (via RecPPQ / RecPPB), plus its name and current selection state.

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": "fl_pattern_get_length"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexYes1-based pattern index.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered. The description adds genuinely useful semantic context about units (beats as FL's native unit, ticks/bars derived via RecPPQ/RecPPB), but says nothing about failure behavior for an out-of-range index or whether the result reflects live playback position.

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?

One compact fragment that front-loads the primary value (length in beats) before secondary fields. No filler, though the parenthetical PPQ/PPB detail is dense and slightly opaque without elaboration.

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?

An output schema exists, so return values need not be enumerated here, and readOnly annotations cover the safety picture. What the description contributes — the unit convention that determines how the returned length must be interpreted — is the key piece an agent would otherwise have to guess.

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 coverage is 100% and the single parameter is documented as a 1-based pattern index, so the schema carries the parameter burden. The description adds no meaning about the index (e.g. valid range, behavior when no pattern exists at that index), leaving it at the baseline.

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 the resource (a pattern) and precisely what it returns: length in beats, derived ticks and bars, name, and selection state. It is distinguishable from mutating siblings like fl_pattern_rename or fl_pattern_select, though it never states the retrieval verb explicitly and does not contrast with fl_pattern_list.

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?

There is no when-to-use guidance, no mention of prerequisites (e.g. a valid open project), and no routing to alternatives such as fl_pattern_list for enumerating patterns. The agent must infer the use case entirely from the return-field list.

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