Skip to main content
Glama
libsonare-mcp

libsonare-mcp

Official
by libraz

Edit a project

project_edit
Destructive

Apply a batch of track, clip, mixer, tempo, and automation edits to a project file atomically: all ops succeed or nothing is written, and later ops can reference earlier results.

Instructions

Applies a batch of ops to a project file: tracks (addTrack, removeTrack, renameTrack, setTrack, setTrackRoute, setInstrument, setPartRig), clips (addAudioClip, addMidiClip, setClipSource, moveClip, trimClip, splitClip, duplicateClip, removeClip, setClip, setProgram, setOverlapPolicy), sources (relinkSource), the mixer scene (setMixerScene, suggestMix, setStrip, addBus, removeBus, addSend, removeSend, addVcaGroup, removeVcaGroup, setSidechain), tempo and meter (setTempoSegments, setTimeSignatures), annotations (annotateKeys, annotateChords, annotateSections, setMarker) and automation (addAutomationLane, editAutomationLane, removeAutomationLane, automationFromMidiCc). All ops succeed or nothing is written; an op can address what an earlier op created as {"op": n}, and the response lists created ids. The file is updated in place; pass 'output' or 'dry_run' to keep it. Notes are written with midi_write or midi_compose and placed with addMidiClip; read results with project_read. Example: {"path": "song.sonare.json", "ops": [{"op": "addTrack", "kind": "midi", "name": "bass"}, {"op": "addMidiClip", "track": {"op": 0}, "path": "bass.mid"}, {"op": "setTrack", "track": "bass", "gain_db": -6}]}.

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

Input Schema

NameRequiredDescriptionDefault
opsYes1-64 ops applied in order; all or none take effect.
pathYesThe project file (.sonare.json) to edit.
detailNo'concise' returns the summary and the most useful fields; 'full' returns all.concise
outputNoWrite the result to this .sonare.json file instead of updating 'path'.
dry_runNoApply the ops to a scratch copy and report; write nothing.
overwriteNoReplace an existing 'output' file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds critical behavior the annotations cannot convey: all-or-nothing batch atomicity, that earlier ops can be referenced via {"op": n}, that the response lists created ids, and that the file is updated in place unless output/dry_run is used. This is exactly the mutation-risk context an agent needs before invoking.

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 purpose, then atomicity, then workflow routing, then a compact example — a sound structure. The long parenthetical op enumeration duplicates the schema's discriminated union and is the one segment that could be trimmed, though it does aid at-a-glance capability discovery.

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 39-op batch mutation tool with no output schema, the description covers atomicity, op cross-referencing, response contents (created ids), the 'detail' verbosity switch, and safe-write paths. Nothing an agent needs in order to call it correctly and safely 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; the description still adds meaning by explaining the op-reference mechanism and by demonstrating with a three-op example how track, clip and setTrack interplay. It says less about 'detail', 'overwrite' or ordering constraints beyond atomicity, keeping it short of a 5.

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?

"Applies a batch of ops to a project file" gives a specific verb and resource, then enumerates the op families (tracks, clips, sources, mixer scene, tempo/meter, annotations, automation) so the agent knows the full capability surface without opening the schema. It is clearly distinguishable from project_read, midi_write and midi_compose, which it names.

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 routes the agent: notes are written with midi_write or midi_compose and then placed with addMidiClip, and results are read with project_read. It also states when to use 'output' or 'dry_run' to avoid mutating the file in place, giving concrete conditional guidance rather than implied usage.

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