Skip to main content
Glama

analyze_harmony

Read-only

Reads a MIDI item and explains its harmony: key, chords over time, Roman numerals, cadences, and non-chord tones when a melody is provided.

Instructions

Reads a MIDI item and explains its harmony: the key (detected), chords over time, Roman numerals and functions, cadences, notes outside the key, and (with a melody item) passing tones, suspensions, appoggiaturas and other non-chord tones.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoKey with any scale or mode: 'A minor', 'F# dorian', 'Bb', 'Eb mixolydian', 'C harmonic minor'
item_idYesMIDI item id from create_midi_item/get_track_details, or "selected"
resolutionNoauto
melody_item_idNoAlso analyze this melody against the chords: non-chord tones

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.19.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered and the bar is lower. The description still adds real behavioral context: the key is "detected" unless supplied, the analysis spans chords-over-time plus cadences and non-chord tones, and a second item can be analyzed against the chords. It does not mention any failure modes (e.g., what happens with a non-MIDI or empty item), which keeps it from a 5.

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 with the verb and resource first, followed by a colon-list of outputs and one parenthetical conditional. Every clause earns its place, though the list is dense enough that it reads more as an inventory than as structured guidance.

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?

There is no output schema, so the description must describe return values — and it does, enumerating key, chords, Roman numerals, functions, cadences, non-key notes, and non-chord tones. Combined with readOnlyHint covering safety and the schema covering item_id, an agent has enough to call this correctly; only error/edge behavior is unaddressed.

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 the schema carries most of the load. Even so, the description adds meaning beyond the schema for two parameters: it clarifies that the key is auto-detected when omitted (the schema only shows a null default), and it explains that melody_item_id analyzes a melody against the detected chords for non-chord tones — a purpose the schema states only tersely. Only the resolution enum remains unexplained.

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 a specific verb and resource ("Reads a MIDI item and explains its harmony") and then enumerates exactly what it produces: key, chords over time, Roman numerals, functions, cadences, non-key notes, and non-chord tones with a melody. This is far more specific than a tautology, but it never distinguishes itself from close siblings such as analyze_progression, identify_chord, or check_voice_leading, which also operate on harmonic analysis.

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?

Usage is only implied: the reader infers that you call this when you want a harmonic read-out of a MIDI item. The description does state one conditional usage case ("with a melody item ... non-chord tones"), which is helpful, but it gives no explicit when-to-use/when-not guidance and never routes the agent to or away from analyze_progression, identify_chord, or reharmonize.

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