Skip to main content
Glama

write_automation

Write automation envelopes into Session clips, then verify the stored curve matches the intended breakpoints.

Instructions

Write an automation envelope into a Session clip and verify the read-back.

Turns a handful of breakpoints into a written curve, then reads it back so the
result reports the stored envelope rather than the requested one.

Returns:
    Dictionary reporting the write, how many points were laid down, and the
    comparison between the stored curve and the generated one.

Note:
    Automation lives in Session clips. There is no way to write an Arrangement
    envelope directly here: write it into the Session clip and then copy the clip
    onto the timeline with arrange, which carries the envelope with it.

    A verified write proves the stored curve, never that it is audible. An
    envelope on a parameter of a device that is switched off, or on a muted
    track, reads back exactly as written and changes nothing anyone can hear.

    With ``clear_first=False`` a repeated call layers points onto the ones
    already there, so a retry after an unclear result can leave a curve that
    matches neither attempt. Read it with read_automation before writing again.
    To explicitly clear an envelope without writing new points, use clear_automation.

    Playing the clip leaves the parameter at the value this curve last reached, and
    stopping does not restore it. Capture the statics you care about before the first
    playthrough: once a curve has run, nothing reports the value it covered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slotYesClip 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.
trackYesTrack index in song.tracks, counted from 0.
pointsYesThe breakpoints, as [[beat, value], ...] in clip-local beats where 0 is the clip start. Values are in the parameter own normalised units, the same ones set_parameter takes, so read min and max with ``describe`` rather than assuming 0..1.
verifyNoTrue samples the stored envelope back and compares it against the curve that was generated, at the cost of one extra read.
exponentNoHow hard the non-linear shapes bend. 1.0 is effectively linear and higher is steeper. Ignored by 'linear' and 'hold'.
parameterYesLOM path to the DeviceParameter the envelope belongs to, e.g. 'song.tracks[0].mixer_device.volume' for track volume or 'song.tracks[0].devices[1].parameters[3]' for a device knob.
resolutionNoStep in beats at which the curve is written out between breakpoints, so 0.0625 lays a point every sixteenth of a beat. Finer follows the shape more closely and writes more points; ignored for 'hold', which needs no intermediate points.
clear_firstNoTrue resets the parameter envelope before writing, so the result matches ``points`` exactly. False overlays new breakpoints onto earlier points and mixes the two.
interpolationNoShape between consecutive breakpoints. 'linear' ramps straight, 'hold' steps at each breakpoint and stays flat between them, and the other three bend the ramp using ``exponent``.linear

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.1.4
    • changedInput schema / properties / clear_first / description
      Previous value: -"True removes the existing envelope for that parameter before writing, which is what makes the result match ``points`` exactly. False leaves earlier points in place and mixes the two."New value: +"True resets the parameter envelope before writing, so the result matches ``points`` exactly. False overlays new breakpoints onto earlier points and mixes the two."
  2. Changed10 schema fields changedv0.1.1
    • addedInput schema / properties / clear_first / description
      Added value: +"True removes the existing envelope for that parameter before writing, which is what makes the result match ``points`` exactly. False leaves earlier points in place and mixes the two."
    • addedInput schema / properties / exponent / description
      Added value: +"How hard the non-linear shapes bend. 1.0 is effectively linear and higher is steeper. Ignored by 'linear' and 'hold'."
    • addedInput schema / properties / interpolation / description
      Added value: +"Shape between consecutive breakpoints. 'linear' ramps straight, 'hold' steps at each breakpoint and stays flat between them, and the other three bend the ramp using ``exponent``."
    • addedInput schema / properties / interpolation / enum
      Added value: +[
      +  "linear",
      +  "hold",
      +  "exponential",
      +  "ease_in",
      +  "ease_out"
      +]
    • addedInput schema / properties / parameter / description
      Added value: +"LOM path to the DeviceParameter the envelope belongs to, e.g. 'song.tracks[0].mixer_device.volume' for track volume or 'song.tracks[0].devices[1].parameters[3]' for a device knob."
    • addedInput schema / properties / points / description
      Added value: +"The breakpoints, as [[beat, value], ...] in clip-local beats where 0 is the clip start. Values are in the parameter own normalised units, the same ones set_parameter takes, so read min and max with ``describe`` rather than assuming 0..1."
    • addedInput schema / properties / resolution / description
      Added value: +"Step in beats at which the curve is written out between breakpoints, so 0.0625 lays a point every sixteenth of a beat. Finer follows the shape more closely and writes more points; ignored for 'hold', which needs no intermediate points."
    • 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 / track / description
      Added value: +"Track index in song.tracks, counted from 0."
    • addedInput schema / properties / verify / description
      Added value: +"True samples the stored envelope back and compares it against the curve that was generated, at the cost of one extra read."
  3. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With only false-valued annotations, the description carries the full burden of behavioral disclosure, and it excels: it reveals that verification compares stored vs generated curves, that audible output is not guaranteed on disabled devices or muted tracks, that clear_first=False layers points and can create mixed curves, and that playing leaves the parameter at the curve's last value. This is rich, honest, and actionable.

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 long but every section earns its place: a one-line summary, a return-value note, and focused warnings about audible verification, retry behavior, and playhead side effects. The most important scoping statement is front-loaded, and the notes are grouped for skimmability.

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 complex 9-parameter tool with side effects and no meaningful annotation context, this description is remarkably complete. It covers purpose, return behavior, alternatives, retry dangers, audibility caveats, and playback side effects, while an output schema exists to handle return-value details.

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 meaningful behavior around specific parameters: it explains the consequence of clear_first=False in terms of failed retries, and it clarifies the verify read-back semantics by stating the result reports the stored envelope rather than the requested one. This goes beyond the schema's per-parameter descriptions.

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 specific verb and resource: 'Write an automation envelope into a Session clip and verify the read-back.' It clearly distinguishes itself from siblings like read_automation and clear_automation by describing the write-and-verify workflow rather than merely restating the tool name.

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 when-to-use and when-not-to-use guidance: it explains that Arrangement envelopes cannot be written directly and must go through a Session clip plus arrange, and it names clear_automation for clearing and read_automation for inspecting before retrying. This is strong routing behavior beyond what the schema or annotations provide.

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

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/romanstark/live-maestro'

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