Skip to main content
Glama

analyze_clip_music

Analyzes a MIDI clip to identify key and mode candidates, segment chords with roman numerals, out-of-scale notes, rhythm, and melodic motion, revealing its harmony and structure.

Instructions

Musical analysis of a MIDI clip: key and mode candidates (with coverage and outside notes; relative modes are told apart by the harmony, e.g. a V7 pointing to its tonic), chords per segment with roman numerals, out-of-scale notes, range, rhythm (density, offbeat share, polyphony) and melodic motion of the top line. Also reports Live's song scale.

Parameters:

  • track_index / clip_index: The clip (Session slot or Arrangement index)

  • location: "session" (default) or "arrangement"

  • segment_beats: Chord detection window (2 = two chords per bar by default, 4 = one per bar, 1 per beat); identical neighbours are merged

  • key_root / key_scale: Force the key used for roman numerals (optional)

  • vocabulary: "basic" (triads and sevenths: classical, pop, counterpoint) or "jazz" (adds 6, 9, sus and extended chords)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "track_index": "<track_index>",
      "clip_index": "<clip_index>"
    },
    "name": "analyze_clip_music"
  }
}

Input Schema

NameRequiredDescriptionDefault
key_rootNo
locationNosession
key_scaleNo
clip_indexYes
vocabularyNobasic
track_indexYes
segment_beatsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses real behavior beyond structure: that identical neighbouring chords are merged, that relative modes are disambiguated by harmony (V7 pointing to its tonic), and that Live's song scale is also returned. It never states the operation is read-only or what happens on an empty/non-MIDI clip, which is the remaining gap.

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?

Front-loaded summary followed by a tight bulleted parameter list; every entry adds information and nothing is redundant. The opening sentence is a long run-on enumeration but still earns its length by enumerating outputs an agent needs.

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, annotation-free analysis tool, the description covers all parameters and the analysis surface, and an output schema exists so return shapes needn't be restated. Missing pieces are preconditions (clip must contain MIDI notes) and failure behavior, which matter for an unannotated 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 coverage is 0%, so the description must compensate and largely does: it explains location ('session' default or 'arrangement'), segment_beats semantics (2 = two chords per bar, 4 = one per bar, 1 per beat), and enumerates vocabulary values. key_root/key_scale are described only by purpose, with no hint about accepted value format (e.g. 'C' vs 'major'), leaving that pair underspecified.

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?

Opens with a specific verb+resource ('Musical analysis of a MIDI clip') and then enumerates the exact outputs (key/mode candidates, chords with roman numerals, out-of-scale notes, range, rhythm, melodic motion). Naming 'MIDI clip' implicitly separates it from analyze_audio_file, but no sibling is named explicitly, so differentiation is only implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Offers parameter-level guidance ('basic' for classical/pop/counterpoint vs 'jazz' for extended chords) that hints at when to choose which mode, but gives no when-to-use/when-not-to-use statement or comparison to siblings like get_clip_notes or analyze_mix. Usage is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools