Skip to main content
Glama

read_clip_notes

Read-onlyIdempotent

Read MIDI notes from a Session or Arrangement clip, filtered by time or pitch, or count large clips without returning every note. Validate returned notes when needed.

Instructions

Read MIDI notes of a Session or Arrangement clip, a window of them, or their count.

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``.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "read_clip_notes"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoLOM path to the clip, as an alternative to track and slot: a Session clip (song.tracks[N].clip_slots[M]) or an Arrangement clip (song.tracks[N].arrangement_clips[i]). For an Arrangement clip the answer also says where it sits in the song.
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

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / path / description
      Previous value: -"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."New value: +"LOM path to the clip, as an alternative to track and slot: a Session clip (song.tracks[N].clip_slots[M]) or an Arrangement clip (song.tracks[N].arrangement_clips[i]). For an Arrangement clip the answer also says where it sits in the song."
  2. 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"
      -]
  3. 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."
  4. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses return shape, clip-local beat coordinates, muted-note inclusion, result-size failure mode, count_only semantics, check interactions, and the critical sorted-by-time-then-pitch ordering with a concrete pitfall. This is substantial behavioral context not available from annotations alone.

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 front-loaded with purpose and return summary, and the note block covers genuinely important caveats. It is dense and somewhat long, with a lengthy ordering example, but most sentences earn their place as behavioral warnings.

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?

For a read tool with nine optional parameters, output schema, and several edge cases, the definition covers purpose, windowing, count-only behavior, validation scope, muted notes, result limits, and ordering alternatives. Nothing essential for correct invocation appears missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameter meanings are already supplied in the schema; the description largely restates count_only, check, and pitch-window behavior rather than adding new syntax or constraints. It does reinforce why pitch windows matter, but that rationale is also present in the schema, so baseline 3 is appropriate.

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 opening sentence names a precise verb (Read) and resource (MIDI notes), and delimits scope to Session or Arrangement clips, a window, or a count. It distinguishes full reads from count-only and names the lom_call alternative for Live's native ordering, so an agent can place it without opening the schema.

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?

It gives concrete usage conditions: count_only for large clips, pitch_min/pitch_max for narrowing, check ignored under count_only, and lom_call for Live's order. It does not explicitly state when not to use it or cover all sibling alternatives such as write_clip_notes, but the key routing guidance is present.

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