Skip to main content
Glama

write_notes

Destructive

Replace all notes in a MIDI clip with a supplied list of pitches, start times, durations, and velocities. To edit existing notes, read them first and send the full modified list.

Instructions

Replace ALL notes in the clip with these notes. To edit existing notes, read_notes first and send the full changed list. Times and durations are in beats (1.0 = one quarter note). For a Drum Rack, take pitches from drum_pads in get_set_overview. The result's notes_outside_clip counts notes that start at or after the clip length; they never play (assumes the loop starts at beat 0).

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": {
      "track": "<track>",
      "slot": "<slot>",
      "notes": "<notes>"
    },
    "name": "write_notes"
  }
}

Input Schema

NameRequiredDescriptionDefault
slotYes
notesYes
trackYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and openWorldHint=false, so the safety profile is covered. The description adds real value beyond that: beat-based units, drum-rack pitch sourcing, and the meaning of the returned notes_outside_clip field, which matters because no output schema exists. However, it never mentions recovery (undo_last is a sibling) or that existing notes are permanently lost beyond the word 'Replace'.

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?

Four sentences, no filler, and the destructive whole-replacement warning is front-loaded ahead of units and edge cases. The final sentence about notes_outside_clip is denser than it needs to be, packing the loop-assumption caveat into a trailing clause, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter destructive write with no output schema and no per-property schema documentation, the description covers the high-risk unknowns: replacement scope, time units, pitch sourcing, and one return field. Remaining gaps are the track/slot identity, velocity semantics, and how clip length is determined for the notes_outside_clip calculation.

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 description coverage is 0%, so the description must carry the load, and it does for the hard parts: times and durations are in beats with '1.0 = one quarter note', pitches for Drum Racks come from drum_pads in get_set_overview, and start times at or beyond clip length never play. It leaves track and slot unexplained (the description says 'the clip' without mapping that to the track/slot pair) and says nothing about velocity's default of 100, so the gain is substantial but incomplete.

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 with explicit scope: 'Replace ALL notes in the clip with these notes.' The 'ALL' makes the whole-replacement semantics unmistakable and separates it from read_notes, which it names directly.

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?

Gives an explicit workflow for the edit case ('read_notes first and send the full changed list'), which is the main way an agent would misuse this tool by sending a partial diff. It still doesn't distinguish the tool from other note-writing siblings like create_drum_pattern, create_bassline, or create_chord_progression, so an agent must infer when to prefer a generator over a raw write.

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