Skip to main content
Glama

clips_generate_melody

Idempotent

Generates a MIDI melody into a clip slot from a chosen style, key, bars, register, and density, following the slot’s chord lane or a specified chord source; same seed yields same result.

Instructions

Write a melody into a MIDI slot with the piano roll's melody generator: a style (stepwise_flow, minimal_cell, classical_arch, funk_groove, celtic_reel, bebop_line, arpeggio_loop, synth_arp, sequence_run, ambient_drift, tension_build, modal_motive), a key, bars, register and density. It sits on the chords of the slot's chord lane, or of chords_from (e.g. the pad slot written by clips.write_progression). Same seed, same melody. Undoable.

Input Schema

NameRequiredDescriptionDefault
keyYes
barsNoBars to write (default 4).
seedNoSame seed, same melody (default 1).
slotYes0-based clip slot (scene row) on the track.
styleYesMelody style.
trackYesTrack id (UUID string from tracks.list, stable) or 0-based index (shifts when tracks are added or moved).
densityNoNotes per bar (default medium).
registerNoPitch range (default mid).
chords_fromNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare non-read-only, idempotent, non-destructive; the description adds two real facts beyond them — determinism from the seed and that the write is undoable. It does not say whether existing notes in the slot are replaced or merged, nor any clip-length handling, which is the main behavioral question for a write into an existing slot.

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 sentences, front-loaded with purpose then the harmonization rule, with no filler. The full enumeration of twelve style values restates the schema enum and is the one segment that does not earn its space.

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?

For a 9-parameter, nested-object write tool with no output schema, the description covers the core decision points (style, harmonic source, determinism, reversibility). The remaining gap — overwrite versus merge semantics for the target slot — is the one thing an agent still has to guess.

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

Parameters4/5

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

Schema coverage is 78% and the description adds meaning on top: the seed's determinism contract, and how chords_from relates to the slot's chord lane with a concrete example. The twelve style names are repeated from the enum, so it adds little for style itself.

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?

"Write a melody into a MIDI slot with the piano roll's melody generator" gives a specific verb, resource, and the generator it uses, and the parameter roll-call (style, key, bars, register, density) makes it clearly distinct from clips_write_midi (explicit notes) and clips_write_progression (chords).

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 explains the harmonic source decision: the slot's own chord lane by default, or chords_from pointing at another slot, with a concrete workflow example (the pad slot written by clips.write_progression). It never states when to prefer this over clips_write_midi or what happens if the slot already has notes, so the guidance is clear but not exclusive.

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