Skip to main content
Glama

mcp_opendaw_analyze_melody

Read-only

Analyze a melody's contour, intervals, direction, and climax to understand its structure, compare phrasing, and guide variations or AI-generated melodies.

Instructions

Analyze melodic content — contour, intervals, direction, climax.

Returns a detailed melodic analysis of notes in a region:

  • Contour profile: direction (up/down/static) for each consecutive interval

  • Interval histogram: count of each interval size (semitones)

  • Step vs leap ratio: percentage of steps (≤2 semitones) vs leaps (>2)

  • Direction changes: how often melody changes direction

  • Climax: highest pitch and its position

  • Nadir: lowest pitch and its position

  • Phrase analysis: groups by rests (gaps > 1 beat) into phrases

  • Contour shape classification: ascending/descending/arch/v_shape/wave/static

  • Melodic range: semitone span between lowest and highest

  • Average interval size

Useful for:

  • Understanding a melody before variation/reharmonization

  • Comparing melodies (which is more jagged, which more stepwise?)

  • Identifying climax placement (is the high point early, middle, late?)

  • Feeding analysis to create_motif_variations

  • Evaluating AI-generated melodies for contour interest

unit_index: AU index. track_index: Note track index. region_index: Region (-1 = first region).

Returns analysis object.

Example: analysis = analyze_melody(0, 3)

contour_shape, climax_position, step_leap_ratio, interval_histogram

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unit_indexYes
track_indexYes
region_indexNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations declare readOnlyHint=true, so the tool is known to be safe. The description adds meaningful behavioral detail beyond the annotation: it explains how phrases are grouped (by rests > 1 beat) and what the return object contains. This is useful context without contradicting the annotation.

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?

The description is long but well-organized with sections and bullet points. Every sentence adds value, but the output feature list (10 items) and use-case list (5 items) could be tightened without losing meaning. Front-loaded core statement ensures quick comprehension.

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?

Given the tool's complexity (detailed musical analysis) and the presence of an output schema, the description is remarkably complete. It covers what the tool does, what it returns (even beyond the schema, e.g., phrase analysis details), when to use it, and parameter explanations. The inclusion of an example call reinforces correct invocation.

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

Parameters5/5

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

The schema has 0% description coverage, but the description compensates with a clear param section: 'unit_index: AU index, track_index: Note track index, region_index: Region (-1 = first region).' It also provides a code example showing positional usage, making parameter semantics explicit and actionable.

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?

The description opens with a specific verb+resource: 'Analyze melodic content — contour, intervals, direction, climax.' It then enumerates a detailed list of outputs (contour profile, interval histogram, step/leap ratio, etc.), making the tool's function unmistakable. The specificity distinguishes it from broader sibling tools like mcp_opendaw_analyze_track or mcp_opendaw_note_stats.

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?

A dedicated 'Useful for:' section lists five concrete scenarios, such as 'understanding a melody before variation/reharmonization' and 'feeding analysis to create_motif_variations.' This provides clear context on when to use the tool, though it does not explicitly mention when not to use it or name alternative tools for comparison.

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/ameobius-ai/opendaw-mcp'

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