Skip to main content
Glama

theory_harmonize

Idempotent

Generates chord progressions for a melody in a MIDI slot using a chosen key and style, balancing style habits with melody fit, and can write the chords into a track slot.

Instructions

Find chords for the melody in a MIDI slot, in a key and a generator style (theory.vocabulary): one chord per harmonic-rhythm slot, chosen so the melody's strong notes are chord tones. fit 0 follows the style's habits, 1 the melody. Returns the chords; with write_to also writes them into a slot (performed like clips.write_progression). Undoable.

Input Schema

NameRequiredDescriptionDefault
fitNo0 = style, 1 = melody (default 0.7).
keyYes
barsNoBars to harmonise (default: the clip's).
seedNoColour seed (default 1).
slotYes0-based clip slot (scene row) on the track.
styleNoGenerator style from theory.vocabulary (default pop).
trackYesTrack id (UUID string from tracks.list, stable) or 0-based index (shifts when tracks are added or moved).
write_toNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent, non-destructive, but the description adds real context: harmonisation is one chord per harmonic-rhythm slot with strong notes as chord tones, writing only happens if write_to is supplied, output is returned as chords, and the write is undoable. These are behavioural facts the annotations cannot express.

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?

Front-loaded with the core action, then the fit semantics, then the write behaviour. Dense but no filler; the only cost is long sentences with stacked parentheticals.

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 an 8-parameter tool with nested objects and no output schema, it covers the return ('the chords'), the conditional write, and undo. The nested perform options rely entirely on schema text, which is acceptable given the schema documents them, but leaves the description slightly thin on the write path.

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 75%, so baseline 3, but the description clarifies the intent of fit ('0 follows the style's habits, 1 the melody') and frames style/key as theory.vocabulary-driven, which is more than the bare defaults in the schema. It says nothing about bars, seed, or write_to.perform, but those are documented in the schema.

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?

Opens with a specific verb+resource ('Find chords for the melody in a MIDI slot') and names the inputs (key, generator style) and the output (chords). It is clearly separable from siblings like theory_progression (which generates progressions without a melody) and clips_write_progression (which writes a given progression rather than deriving one).

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?

The description tells the agent when the tool applies (harmonising an existing melody clip) and how the fit parameter trades off style habits vs the melody. It also explains the optional write path and compares its behaviour to clips.write_progression, but gives no explicit exclusion telling the agent when to prefer that sibling instead.

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