Skip to main content
Glama

harmonize_melody

Generate chord progressions for an existing melody by mapping strong-beat notes to chord tones, following tonic-predominant-dominant motion and cadencing home; optionally write chords to a MIDI item.

Instructions

Finds chords for an existing melody (strong-beat melody notes become chord tones, chords move tonic-predominant-dominant, the end cadences home), and optionally writes them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoKey with any scale or mode: 'A minor', 'F# dorian', 'Bb', 'Eb mixolydian', 'C harmonic minor'
octaveNo
rhythmNosustain
item_idYesThe MIDI item with the melody
paletteNocolorful adds secondary dominants and borrowed chordsdiatonic
voicingNoclose
seventhsNo
chords_per_barNoHarmonic rhythm: 0.5, 1, 2 or 4
write_to_item_idNoWrite the chords into this item (e.g. on a piano track)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.19.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the harmonic algorithm and that writing is optional ('optionally writes them'), but gives no side-effect detail: whether writing into write_to_item_id overwrites existing notes, whether it appends to a track, or what is returned when it does not write. Useful behavioral content, incomplete for a mutation-capable 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?

A single front-loaded sentence; the verb/resource leads and the parenthetical method detail follows. It is dense with three nested clauses but each earns its place, so it stays efficient rather than padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Nine parameters, no output schema, and only partial schema coverage. The description covers the algorithm well but never says what the tool returns (chord symbols? a new MIDI item?) or how the non-writing path surfaces results, leaving an agent unsure what to expect from a successful call.

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 a middling 56%, and the description only implicitly ties to parameters ('optionally writes them' gestures at write_to_item_id). Parameters left undocumented by the schema (octave, rhythm, voicing, sevenths) get no explanation in the description either, so it neither fully compensates nor falls below the adequate baseline.

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?

States a specific verb and resource ('Finds chords for an existing melody') and the parenthetical pins down the method (strong-beat notes as chord tones, tonic-predominant-dominant motion, cadence home). This clearly separates it from chord-side siblings like add_chord_progression and reharmonize, which operate on progressions rather than an input melody.

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

Usage Guidelines3/5

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

The phrase 'for an existing melody' implies the precondition (a melody item must exist), but there is no explicit when-to-use, when-not-to-use, or pointer to the competing tools (reharmonize, add_chord_progression) in a sibling list this dense. Usage is inferred rather than stated.

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