Skip to main content
Glama

mcp_opendaw_extract_motifs

Identify and extract repeating melodic motifs from MIDI regions by analyzing interval contours, helping to understand musical structure and create variations.

Instructions

Extract repeating melodic motifs from a MIDI region.

A motif is a short melodic phrase (3-8 notes) identified by its interval contour — the pattern of pitch changes between consecutive notes. The same motif transposed to a different key still matches, because the relative intervals are identical.

Essential for: understanding melodic structure of existing pieces, finding repetitive patterns for variation, identifying verse/chorus motifs, and building call-and-response arrangements from existing material.

unit_index: AU index (-1 = all AUs). track_index: Note track index (-1 = all note tracks). region_index: Region index (-1 = all regions on track). min_motif_length: Minimum notes in a motif (default 3). max_motif_length: Maximum notes in a motif (default 8). min_repetitions: Minimum times a motif must appear to be reported (default 2). max_results: Maximum motifs to return, sorted by significance (default 20).

Returns list of motifs with contour, rhythm pattern, contour type, and occurrence positions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unit_indexNo
max_resultsNo
track_indexNo
region_indexNo
min_repetitionsNo
max_motif_lengthNo
min_motif_lengthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It explains the transposition invariance and output fields, but does not explicitly state that the tool is read-only (non-destructive) or describe failure conditions. For a read-only analysis tool, this is adequate but leaves some ambiguity.

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?

The description is concise and well-structured: opening verb-object statement, definition, use cases, parameter list, and output summary. Every sentence adds value with no redundancy or off-topic content. It is front-loaded with the main purpose.

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?

Given the tool has 7 parameters and an output schema (not shown), the description covers input parameters fully and outlines the output structure. It explains the motif concept and use cases. However, it could mention prerequisites (e.g., MIDI region must have notes) or limitations, but overall it is complete for an analysis tool.

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?

The schema has 0% description coverage, so the parameter descriptions in the text are essential. Each parameter is explained with purpose and default values (e.g., 'min_motif_length: Minimum notes in a motif'). This adds significant meaning beyond the schema's names and defaults. However, details like the significance ordering of 'max_results' are not explained.

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 clearly states the action ('Extract repeating melodic motifs from a MIDI region') and defines what a motif is via interval contour. It distinguishes from siblings like 'analyze_melody' and 'transcribe_melody' by focusing on patterns. However, it could be more explicit about which sibling to use for broader analysis.

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 lists specific use cases ('Essential for: understanding melodic structure...') that guide when to use the tool. It does not explicitly state when not to use it or compare with alternatives like 'extract_rhythm' or 'analyze_melody', but the use cases are clear enough for an informed decision.

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

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