Skip to main content
Glama

Save edited bars

write_bars
Destructive

Replace up to 16 bars of one part at its exact saved revision, using edited ABC or MusicXML. Other bars stay and undo restores the change. No credits. Written rhythm can change playback; verify it.

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": {
      "score_id": "<score_id>",
      "revision": "<revision>",
      "measures": "<measures>"
    },
    "name": "write_bars"
  }
}

Input Schema

NameRequiredDescriptionDefault
abcNoEdited ABC with its header, voices and every selected bar; use this or musicxml, not both.
part_idNoThe part ID returned with the bars.
measuresYesThe same bars as read, in score order: "1-4" or "1,5-8".
musicxmlNoEdited measure elements, same numbers and order, with retained note IDs; instead of abc.
revisionYesThe current saved revision, from the latest read or edit.
score_idYesThe score, from a result or the score list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior5/5

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

The annotations already flag destructiveHint=true and idempotentHint=false, and the description still adds material context: only the selected bars are replaced while 'other bars stay,' undo restores the change, the call consumes no credits, and written rhythm can alter playback so the result should be verified. It also surfaces the reconciliation requirement ('exact saved revision'), which explains why a mutation is non-idempotent. None of this is recoverable from the annotations alone.

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?

Three short, front-loaded sentences plus a terse 'No credits.' fragment; the destructive scope is stated first, which is the right ordering. The clipped fragment style is efficient here, though 'No credits.' reads slightly telegraphic and could be phrased more explicitly.

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 destructive, non-idempotent mutation with no output schema, the description covers the essentials an agent needs before calling: input formats, bar limit, revision pinning, blast radius, undo, cost, and the playback side effect. The main remaining gap is what the tool returns or what happens on a stale revision.

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 schema already defines all six parameters, making 3 the baseline. The description still adds meaning: the 16-bar ceiling on 'measures' appears nowhere in the schema, and 'at its exact saved revision' clarifies that 'revision' is an optimistic-concurrency token rather than just a version label.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: 'Replace up to 16 bars of one part at its exact saved revision, using edited ABC or MusicXML.' That is far more precise than the bare name 'write_bars' and conveys scope (one part, max 16 bars) plus accepted input formats. It does not explicitly contrast itself with siblings such as edit_score or save_score_edits, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: you use it to push edited bars back at the revision you read, and the closing 'verify it' hints at a post-write check. There is no explicit when-to-use/when-not guidance and no named alternative for cases like saving a whole score or making a non-bar edit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources