Skip to main content
Glama

analyze_harmony

Read-only

Analyze music project harmony by detecting key, scale, chords, Roman numerals, and cadences. Exports MIDI, filters drum tracks, and uses music21 to provide confidence scores and alternatives.

Instructions

Detect key/scale/chords/Roman numerals/cadences.

Exports the project's MIDI, filters drum tracks (Krumhansl detection is garbage on beats), and runs music21. Always returns a confidence + alternatives; on drum-only or non-chordal material it hedges rather than inventing harmony.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
key_rootNo
modeNo
key_confidenceNomusic21 K-S confidence - surface it, never hide it.
alternative_keysNo
roman_numeralsNo
cadencesNo
noteNoHedging note when confidence is low or the project lacks chordal MIDI.
Behavior5/5

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

Description reveals beyond readOnlyHint=true: it filters drum tracks, uses music21, always returns confidence+alternatives, and hedges on non-chordal material. No contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose. Second sentence adds essential behavioral traits. No redundant information.

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?

With no parameters, annotations present, and output schema, the description covers all relevant behavioral aspects: filtering, algorithm, return type, and edge cases.

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?

No parameters, so baseline 4. Description adds context about what the tool does but no need for parameter-level details.

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?

Description starts with 'Detect key/scale/chords/Roman numerals/cadences' which is a specific verb and resource. It clearly distinguishes from sibling tools like analyze_audio_character or analyze_groove.

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?

Description explains when to use (for harmonic analysis) and what to expect (confidence+alternatives, hedging on non-chordal). Does not explicitly state when not to use or name alternatives, but context is clear.

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/mal0ware/Orpheus'

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