Skip to main content
Glama

write_notes

Add MIDI notes to a clip with per-note pitch, timing, velocity, and probability. Existing notes stay and every note is validated before writing.

Instructions

Add MIDI notes to a clip (additive: existing notes stay). Each note: pitch (0-127), start_time and duration (beats, duration > 0) and optionally velocity (1-127, default 100), mute, probability (0-1, default 1), velocity_deviation (-127..127, default 0), release_velocity (0-127, default 64). Every note is validated before anything is written, so a bad note rejects the whole call (up to 5000 notes per call). Live never lets notes of one pitch overlap: a new note shortens an earlier note of that pitch that runs into it, and one starting at exactly the same time replaces it, so note_count in the result can be lower than expected. Returns the new note ids. One undo step. To replace or change existing notes use edit_notes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesYesNotes to add
expectNoGuard: {"name": "..."} must match the clip
addressYesA MIDI clip

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.3

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, idempotent=false, destructive=false) by disclosing validation atomicity ('a bad note rejects the whole call'), the 5000-note cap, same-pitch overlap behavior that can shorten or replace earlier notes (lowering note_count), the returned note ids, and single-undo semantics. This is exactly the domain-specific conduct an agent needs and cannot infer from the flags.

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 with the core action and scope, and every clause carries real information (ranges, atomicity, overlap, undo). It is dense as a single paragraph; splitting the per-note field list from the behavioral notes would read more cleanly, but nothing is wasted.

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?

Despite having no output schema, it describes return values (new note ids, note_count) and edge cases. For a nested-object mutation tool with 100% schema coverage and full annotations, this leaves no material gap for correct invocation.

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

Parameters5/5

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

The schema fields carry only thin descriptions ('Notes to add'), so the description compensates richly: it documents pitch range (0-127), beats-unit start_time/duration with duration>0, and defaults for velocity (100), probability (1), velocity_deviation (0), and release_velocity (64). This adds substantial meaning beyond the structured fields.

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+resource ('Add MIDI notes to a clip') and immediately clarifies scope ('additive: existing notes stay'). It explicitly distinguishes itself from the sibling 'edit_notes', so an agent can route correctly without opening a schema.

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?

Gives an explicit alternative and the condition that selects it: 'To replace or change existing notes use edit_notes.' The additive semantics are stated up front ('existing notes stay'), removing the main ambiguity about when this tool applies.

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