Skip to main content
Glama

mcp_opendaw_extract_motifs

Extract repeating melodic motifs from MIDI regions by interval contour. Identify short melodic phrases for structure analysis, pattern variation, and arrangement building.

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
Behavior4/5

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

No annotations are present, so the description carries the full burden. It explains key behavioral details: motifs are key-transposed equivalently identified by interval contour, results sorted by significance, and the return list contents. It implies a non-destructive analysis operation through 'Extract' and 'Returns list'.

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 front-loaded with the main purpose, followed by a useful conceptual explanation, a concise use-case list, and a clear parameter listing. Every section adds value and the formatting makes it easy to scan.

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?

For a 7-parameter tool with no annotations, the description covers the essential aspects: purpose, algorithm, parameter semantics, and return values. It does not discuss edge cases or error conditions, but the presence of an output schema and the straightforward nature of the extraction keep this from being a serious gap.

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?

Schema description coverage is 0%, but the description lists all 7 parameters with clear meanings and defaults. It explains the -1 sentinel values for unit/track/region indices and specifies min/max motif length ranges. This fully compensates for the schema's lack of descriptions.

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 and resource: 'Extract repeating melodic motifs from a MIDI region.' It clearly defines what a motif is (short melodic phrase identified by interval contour) and distinguishes itself from sibling tools like extract_rhythm or create_motif_variations by focusing on analysis and pattern discovery.

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 provides clear use-case guidance with 'Essential for: understanding melodic structure...', 'finding repetitive patterns for variation', etc. It does not explicitly mention when not to use or name alternative tools, but gives enough context to select it appropriately among the many sibling tools.

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