Skip to main content
Glama

read_clip_notes

Read-onlyIdempotent

Read MIDI notes from Ableton Live Session clips, filter by time or pitch range, and count notes in large clips without transferring them.

Instructions

Read MIDI notes of a Session clip, query a specific window, or count notes.

Returns:
    Dictionary containing notes, count, window parameters, and validation report.

Note:
    Times and positions are clip-local beats. Muted notes are included and carry ``mute:
    true``.

    A single drum clip of 384 notes comes back as 57k characters, past the tool-result
    cap, and ``Clip`` has no ``note_count`` in the LOM, so counting from out here
    otherwise means transferring every note. ``count_only=True`` carries back one
    integer instead. ``pitch_min`` and ``pitch_max`` narrow the read the way time does,
    which is what makes a question like "what sits below this guitar's lowest string"
    answerable on a clip too large to read whole. ``get_notes_extended`` through
    ``lom_call`` takes a pitch window too, but answers with opaque note handles that can
    be counted and not read. With ``count_only`` there is nothing to validate, so
    ``check`` is ignored; with a window, ``check`` sees the window and not the clip.

    Returned notes are sorted by time, then pitch. Live hands them back ordered by
    pitch, which is the one order a musical instruction never means: four notes written
    at beats 0, 1, 2, 3 with pitches 72, 60, 67, 62 come back 60, 62, 67, 72, so taking
    every other entry off the raw list picks alternating pitches rather than alternating
    beats, silently and plausibly. For Live's own order call ``get_notes_extended``
    through ``lom_call``.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoLOM path to a Session clip, song.tracks[N].clip_slots[M] with or without a trailing .clip, as an alternative to track and slot. A song.tracks[N].arrangement_clips[i] path is refused with code region_not_addressable.
slotNoClip slot index in track.clip_slots, counted from 0, which is the scene the clip sits in. Give track and slot, or give path instead. These are Session coordinates; an Arrangement clip has none.
checkNoTrue runs validation over the notes that came back and reports what it found. Ignored when count_only is true, since there are no notes to check.
trackNoSession track index in song.tracks, counted from 0. Give track and slot, or give path instead. These are Session coordinates; an Arrangement clip has none.
from_timeNoFirst beat of the window to read, clip-local, where 0 is the clip start. Omit to read from the beginning.
pitch_maxNoHighest MIDI pitch to return, inclusive. Omit for no upper bound.
pitch_minNoLowest MIDI pitch to return, inclusive. Omit for no lower bound. Use it to ask about part of a clip too large to read whole, such as what sits below an instrument's real range.
time_spanNoLength of the window in beats, not the beat it ends on: beats 24 to 32 is from_time=24, time_span=8. Omit to read to the end.
count_onlyNoTrue counts the notes and returns the number without carrying them back, which is the way to ask about a large clip.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • changedInput schema / properties / count_only / description
      Previous value: -"True counts the notes inside Live and returns the number without transferring them, which is the way to ask about a large clip."New value: +"True counts the notes and returns the number without carrying them back, which is the way to ask about a large clip."
    • addedInput schema / properties / path
      Added value: +{
      +  "default": "",
      +  "description": "LOM path to a Session clip, song.tracks[N].clip_slots[M] with or without a trailing .clip, as an alternative to track and slot. A song.tracks[N].arrangement_clips[i] path is refused with code region_not_addressable.",
      +  "title": "Path",
      +  "type": "string"
      +}
    • addedInput schema / properties / pitch_max
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 127,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Highest MIDI pitch to return, inclusive. Omit for no upper bound.",
      +  "title": "Pitch Max"
      +}
    • addedInput schema / properties / pitch_min
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 127,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Lowest MIDI pitch to return, inclusive. Omit for no lower bound. Use it to ask about part of a clip too large to read whole, such as what sits below an instrument's real range.",
      +  "title": "Pitch Min"
      +}
    • addedInput schema / properties / slot / anyOf
      Added value: +[
      +  {
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / slot / default
      Added value: +null
    • changedInput schema / properties / slot / description
      Previous value: -"Clip slot index in track.clip_slots, counted from 0. A slot index is the scene the clip sits in, so slot 2 is the third scene down."New value: +"Clip slot index in track.clip_slots, counted from 0, which is the scene the clip sits in. Give track and slot, or give path instead. These are Session coordinates; an Arrangement clip has none."
    • removedInput schema / properties / slot / type
      Removed value: -"integer"
    • addedInput schema / properties / track / anyOf
      Added value: +[
      +  {
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / track / default
      Added value: +null
    • changedInput schema / properties / track / description
      Previous value: -"Track index in song.tracks, counted from 0."New value: +"Session track index in song.tracks, counted from 0. Give track and slot, or give path instead. These are Session coordinates; an Arrangement clip has none."
    • removedInput schema / properties / track / type
      Removed value: -"integer"
    • removedInput schema / required
      Removed value: -[
      -  "track",
      -  "slot"
      -]
  2. Changed6 schema fields changedv0.1.1
    • addedInput schema / properties / check / description
      Added value: +"True runs validation over the notes that came back and reports what it found. Ignored when count_only is true, since there are no notes to check."
    • addedInput schema / properties / count_only / description
      Added value: +"True counts the notes inside Live and returns the number without transferring them, which is the way to ask about a large clip."
    • addedInput schema / properties / from_time / description
      Added value: +"First beat of the window to read, clip-local, where 0 is the clip start. Omit to read from the beginning."
    • addedInput schema / properties / slot / description
      Added value: +"Clip slot index in track.clip_slots, counted from 0. A slot index is the scene the clip sits in, so slot 2 is the third scene down."
    • addedInput schema / properties / time_span / description
      Added value: +"Length of the window in beats, not the beat it ends on: beats 24 to 32 is from_time=24, time_span=8. Omit to read to the end."
    • addedInput schema / properties / track / description
      Added value: +"Track index in song.tracks, counted from 0."
  3. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive), the description discloses several critical behaviors: times are clip-local beats, muted notes are included with a mute:true flag, notes are sorted by time then pitch (and explains why Live's pitch-first order is problematic), and the effect of count_only on validation. It also explains the 57k character limitation and how count_only solves it. This is rich behavioral context that annotations alone cannot provide.

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?

The description is long but well-organized: a one-line purpose, a Returns section, then a Note section for caveats. It is dense with useful information and each sentence earns its place. The structure is clear (purpose, returns, behavioral notes) and front-loads the main purpose. While it's not terse, the complexity of the tool (9 params, large-clip pitfalls, ordering quirks) justifies the length. Slight deduction for not being more scannable, but it's well-structured.

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 complexity, the description covers all essential context: the large-clip size problem and the count_only workaround, pitch windowing for oversized reads, sorting behavior and why it matters, validation interactions, and the alternative tool for Live's ordering. An output schema exists, so return values don't need elaboration. An agent can call this tool correctly across all edge cases after reading this description. Nothing critical is missing.

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 input schema covers all 9 parameters with detailed descriptions (100% coverage), so the baseline is 3. The description adds value beyond the schema by explaining the rationale and usage context for key parameters: count_only for large clips, pitch_min/max for narrowing, and time_span semantics (length, not end beat). It doesn't re-explain each parameter but adds the 'why' and 'when' that the schema lacks. This pushes it to 4.

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 clear, specific verb-resource pair: 'Read MIDI notes of a Session clip, query a specific window, or count notes.' It immediately distinguishes three modes of operation. It also names the alternative tool (get_notes_extended via lom_call) that provides opaque handles, making it obvious this tool returns readable notes. This exceeds the minimum and clearly differentiates from siblings like write_clip_notes.

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

Usage Guidelines5/5

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

The description gives explicit guidance on when to use each mode: count_only for large clips that would exceed the result cap, pitch_min/max to narrow the read for large clips, and when to prefer get_notes_extended (when you need Live's native ordering or are okay with opaque handles). It also explains the interaction between count_only and check, and that a window makes check see the window not the clip. This is exemplary usage guidance.

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