Skip to main content
Glama

lom_batch

Batch-execute raw LOM get, set, and call operations in one round trip to return ordered results and reduce repeated requests when reading or changing Ableton Live state.

Instructions

Execute multiple raw LOM operations (get, set, call) in a single round trip.

Returns:
    Dictionary containing ordered results for each operation.

Note:
    A batch runs inside one handler call, synchronously on Live's main thread, and is
    capped at 1000 operations (max_ops=1000): a larger one is rejected upfront and never
    truncated. Measured 2026-09-16 against Live 12.4.5 (macOS 26.6.2, four-track set):
    one request costs about 400 ms whatever its size, with 200 ops at 500 ms, 1600 mixed
    reads at 1506 ms and 3200 song.tempo gets at 1718 ms, error_count 0 throughout; past
    the 200-op point the marginal cost is about 0.72 ms per mixed real read and 0.44 ms
    per song.tempo get. Write and call ops were not measured and cost more.

    Nothing Live recomputes between operations is visible to a later operation in the
    same batch: a read after a transport jump still reports the position from before the
    move, and four jumps interleaved with four reads returned four identical pre-jump
    values and no error. That is the failure shape to expect here. It does not raise. It
    returns a clean set of numbers that look like a measurement of a parameter which
    never changes, and the conclusion drawn from them is wrong. Sample a moving
    transport with one call per position, never inside a batch.

    An end_marker write on an Arrangement clip is refused here rather than sent: on an
    unlooped clip it reads back and the clip still ends at loop_end (docs/limits.md,
    'Start and end of an Arrangement clip'). One ``song.undo`` takes back the whole
    batch. ``atomic`` stops at the first error but undoes nothing, so read the state
    back after a partial failure.
    Prefer a dedicated tool where one exists: get_session, get_track, get_devices and
    set_mix batch their own reads and verify, which this does not.

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": {
      "ops": "<ops>"
    },
    "name": "lom_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
opsYesThe operations to run, in order (at most 1000 operations). Each one declares its own op, path and payload; the item schema carries the field meanings.
atomicNoTrue stops at the first error, leaving the operations before it applied and the ones after it untried. False runs every operation and reports each result. Neither rolls anything back.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / ops / description
      Previous value: -"The operations to run, in order. Each one declares its own op, path and payload; the item schema carries the field meanings."New value: +"The operations to run, in order (at most 1000 operations). Each one declares its own op, path and payload; the item schema carries the field meanings."
  2. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / atomic / description
      Added value: +"True stops at the first error, leaving the operations before it applied and the ones after it untried. False runs every operation and reports each result. Neither rolls anything back."
    • addedInput schema / properties / ops / description
      Added value: +"The operations to run, in order. Each one declares its own op, path and payload; the item schema carries the field meanings."
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare non-read-only, non-destructive, non-idempotent; the description goes well beyond that with the 1000-op hard cap (rejected upfront, never truncated), synchronous execution on Live's main thread, the single-undo rollback scope, the end_marker refusal, and the stale-read semantics where later ops in the same batch see pre-mutation values. The only mild tension is destructiveHint=false alongside batch set/call support, but the stated undo behavior makes that defensible rather than contradictory.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The opening line is well front-loaded, but the middle section is bloated with dated benchmark measurements (specific OS and Live versions, per-op marginal milliseconds) that are far more detail than needed to decide whether to call the tool. The single most important warning — stale reads within a batch — is buried inside that long paragraph rather than given its own emphasis.

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 batched mutation tool with an output schema already covering return shape, the description supplies everything an agent needs: capacity limit, atomicity/rollback semantics, failure shape, and the specific write that is rejected. Nothing material to calling it correctly 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?

Schema coverage is 100%, so the baseline is 3, but the description adds operational meaning the schema lacks: the 1000-op cap ties directly to `ops`, and it clarifies that `atomic` stops at the first error yet rolls nothing back, so state must be re-read. It adds little about `ops` ordering beyond what the schema already states ('in order').

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?

States a specific verb and resource — executing multiple raw LOM operations (get/set/call) in a single round trip — and names the enumerated op types so an agent knows it covers the same surface as lom_get/lom_set/lom_call but batched. It also names concrete siblings (get_session, get_track, get_devices, set_mix) that should be preferred, which makes the boundary unambiguous.

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?

Explicitly says when not to use it ('Prefer a dedicated tool where one exists'), and gives a concrete prohibition: never sample a moving transport inside a batch, one call per position instead. It also explains which mode to pick for partial failure ('read the state back after a partial failure' when using atomic), which is real when-to-use guidance rather than inference.

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