Skip to main content
Glama

detect_session_key

Read-only

Detects the overall key and scale of an Ableton Live set by analyzing MIDI notes from session clips using Krumhansl-Kessler analysis. Choose weighting method for histogram.

Instructions

Detect the overall key/scale of the whole set by pooling the notes of every MIDI track's Session clips (Krumhansl-Kessler). Gives the harmonic center of the arrangement as a whole. weight selects the histogram weighting ("duration", "velocity", "product", "count"). Reads only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
weightNoduration

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description explicitly states 'Reads only,' matching the readOnlyHint annotation. It adds context about pooling notes from all MIDI tracks' Session clips and the algorithm used (Krumhansl-Kessler), which goes beyond 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.

Conciseness5/5

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

The description is two sentences plus a parameter note, all front-loaded with the core purpose. Every sentence adds value with no redundancy or unnecessary details.

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 purpose (key detection), the description covers the algorithm, scope, parameter options, and read-only nature. With an output schema present, return values need not be detailed. The description is complete for an AI agent to understand and invoke the tool.

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 description fully explains the single parameter 'weight,' listing its possible values ('duration', 'velocity', 'product', 'count') and their meaning (histogram weighting). Since the schema provides no enum or description, this adds critical semantic clarity.

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 clearly states the tool detects the overall key/scale of the whole set by pooling notes from all MIDI tracks' Session clips using the Krumhansl-Kessler algorithm. This distinguishes it from sibling tools like detect_clip_key and detect_track_key which focus on individual clips or tracks.

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 specifies the tool is for detecting the harmonic center of the entire arrangement, implying it should be used when an overall key is needed rather than per-track or per-clip. However, it does not explicitly name alternatives or state when not to use it.

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/wstierhout/ableton-live-mcp'

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