Skip to main content
Glama

mcp_opendaw_detect_key

Read-only

Detect the key and mode of a WAV file using chroma analysis, enabling automatic harmonic arrangement generation for remix pipelines.

Instructions

Detect musical key and mode of a WAV file using chroma features + Krumhansl-Schmuckler key profiles.

Pure Python implementation (no external dependencies):

  1. Parse WAV → mono mixdown

  2. Short-time FFT (4096-point, Hann window, 75% overlap) — pure Python radix-2 Cooley-Tukey

  3. Map spectral bins to 12 pitch classes → chroma vector

  4. Correlate chroma with major/minor key profiles for all 24 keys (12 roots × 2 modes)

  5. Best correlation → key + mode

Essential for Suno integration: detect key → build matching chord progression → create_harmonic_arrangement that fits the imported audio. Enables automatic remix pipeline: download → detect_bpm → detect_key → import → generate matching harmony → mix → render.

filename: Name of the WAV file in the exports directory (without path), or absolute path to any WAV file.

Returns: key (e.g. "A"), mode ("major"/"minor"), confidence (0-1), correlation, alternatives (top 3), chroma (12-element list).

Examples:

After importing a Suno track

result = detect_key("suno_track.wav")

→ {key: "A", mode: "minor", confidence: 0.72, ...}

Then build matching progression

create_chord_progression([["Am","G","F","E7"]])

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already show readOnlyHint, so description adds value by detailing algorithm steps (FFT, chroma, correlation) and return structure. No contradiction. Lacks error or performance notes but sufficient.

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?

Well-structured with clear sections: purpose, algorithm, use case, parameter, return values, example. Front-loaded. Slightly verbose on algorithm details but still efficient.

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?

Covers purpose, algorithm, input/output, integration pipeline, and example. Output schema not shown but described in full. Comprehensive for a single-param 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?

Schema has 0% coverage for filename parameter; description compensates by explaining it can be a relative name (without path) or absolute path, and clarifies it's a WAV file. Adds significant meaning.

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?

Clearly states 'Detect musical key and mode of a WAV file' with specific algorithm references. Distinguishes from siblings like detect_bpm and detect_scale_from_notes by targeting key/mode detection.

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?

Explicitly describes use case in Suno integration and remix pipeline, showing when to use this tool. Lacks explicit when-not-to-use vs alternatives but context is strong.

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