Skip to main content
Glama

mcp_opendaw_create_l_system_melody

Create self-similar melodic patterns using L-system rewriting rules. Select a preset or define custom rules to generate deterministic fractal melodies.

Instructions

Create a melody using an L-system (Lindenmayer system) — a deterministic rewriting system.

L-systems generate self-similar, fractal patterns through recursive production rules. Each symbol in the expanded string maps to a scale step interval. The cumulative sum of intervals determines the melodic contour.

Unlike Markov chains (stochastic, memory-based) or random walk (zero-order), L-systems are fully deterministic — same axiom + rules + iterations always produce the same melody. This makes them ideal for:

  • Self-similar melodic structures (fractal music)

  • Deterministic generative composition

  • Algorithmic music based on mathematical systems

Presets: fibonacci — Fibonacci word (A->AB, B->A), golden ratio self-similarity cantor — Cantor set (A->ABA, B->BBB), gaps and self-similar structure dragon — Dragon curve (A->A+B, B->A-B), jagged contour koch — Koch snowflake (A->A+A-A-A+A), angular melody sierpinski — Sierpinski triangle (A->BA, B->BA), binary pattern

Custom: provide axiom, rules (JSON), and symbol_map (JSON) to define your own L-system.

Args: root: Root note name (C, C#, D, ...). scale: Scale name (major, minor, dorian, phrygian, lydian, mixolydian, harmonic_minor, melodic_minor, pentatonic_major, pentatonic_minor, blues). bars: Number of bars (1-32). octave: Starting MIDI octave (1-6). preset: Preset name (fibonacci, cantor, dragon, koch, sierpinski). axiom: Custom axiom string (overrides preset). rules: Custom rules as JSON {"A": "AB", "B": "A"}. symbol_map: Custom symbol-to-interval map as JSON {"A": 1, "B": -1}. iterations: Number of rule applications (1-8). Higher = more complex. duration: Note duration in beats (0.0625-4.0). velocity: Base velocity 0-1. rest_symbol: Symbol that produces a rest (skip note, advance position). unit_index: AU index. track_index: Note track index. start_beat: Starting beat position.

Returns notes created, L-system string length, and fractal statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
barsNo
rootNoC
axiomNo
rulesNo
scaleNominor
octaveNo
presetNofibonacci
durationNo
velocityNo
iterationsNo
start_beatNo
symbol_mapNo
unit_indexNo
rest_symbolNo
track_indexNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It discloses the deterministic behavior, the meaning of symbols and intervals, parameters' effects, and the return value. However, it does not explicitly state side effects like whether the tool appends notes to an existing region or overwrites, leaving some ambiguity for a mutation tool.

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 description is long but well-structured, starting with the core definition, then explaining the algorithm, use cases, presets, and a complete Args list. It is front-loaded and every section earns its place, though slight trimming could make it more concise without losing value.

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?

Given 15 parameters, no annotations, and the presence of an output schema, the description is exceptionally complete. It covers the mathematical background, presets, custom options, all parameters, and return value, providing all necessary context for an agent to select and invoke the tool correctly.

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 description coverage is 0%, so the description is essential. It provides a clear one-line explanation for every parameter (root, scale, bars, octave, preset, axiom, rules, symbol_map, iterations, duration, velocity, rest_symbol, unit_index, track_index, start_beat), fully compensating for the schema's lack of descriptions.

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?

The description states 'Create a melody using an L-system (Lindenmayer system)—a deterministic rewriting system,' which is a specific verb+resource+approach. It distinguishes itself from siblings by contrasting deterministic L-systems with Markov chains and random walks, clarifying its unique role among melody generation tools.

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

Usage Guidelines5/5

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

The description explicitly contrasts L-systems with Markov chains and random walk, noting that L-systems are fully deterministic, and lists ideal use cases such as self-similar structures and deterministic generative composition. This gives clear guidance on when to choose this tool over alternatives like create_markov_melody or create_random_walk_melody.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ameobius-ai/opendaw-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server