Skip to main content
Glama

Edit draft

edit_draft

Apply multiple track-list edits atomically—add, remove, reorder, filter, or update metadata—and undo changes, using expectedRevision to prevent edits to unseen drafts.

Instructions

Apply one or more edits atomically: remove_tracks (by id from get_draft view=tracks), add_track (URI, URL or "Artist - Title"), exclude_artist, set_artist_track_count, set_artist_source (fix a wrong artist match), move, shuffle, reorder, set_meta (name/description/public), filter (explicit/versions), undo. Pass expectedRevision from the last get_draft so edits never apply to a list the user has not seen. While the draft is still building only exclude_artist, set_artist_track_count, set_artist_source, filter and set_meta are allowed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opsYes
draftIdYes
expectedRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=false, idempotent=false. The description adds substantive behavior beyond them: edits apply atomically as a batch, optimistic concurrency via expectedRevision prevents edits against an unseen list, and the allowed-op set narrows while the draft is still building. Return shape/revision feedback is not described.

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-loads the atomic-edit purpose and the op catalog, then adds the two critical constraints (expectedRevision, building-state restriction) in follow-on sentences. Dense but every clause carries information; the op list is long but earns its place as the primary semantic content.

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 mutation tool with no output schema, the description covers atomicity, concurrency control, and state-dependent op availability — the main things an agent needs to call it correctly. It does not state what the call returns (e.g., updated revision), which is a minor gap given there is no output schema to cover it.

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?

Top-level schema coverage is 0%, so the description must compensate, and it does: it explains expectedRevision's purpose (guard against stale edits) and maps each ops[].op value to its meaning, including the set_artist_source 'fix a wrong artist match' case. Per-op field-level details (from/to, seed, mode) are left to the schema, so it is not exhaustive.

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 (edit) and resource (draft) and enumerates the exact operations the tool performs, which cleanly separates it from siblings like update_playlist, get_draft, and export_draft. An agent can tell what this does without opening the schema.

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 concrete routing guidance: track ids come from get_draft view=tracks, and expectedRevision must come from the last get_draft. It also states the state-dependent restriction (only exclude_artist, set_artist_track_count, set_artist_source, filter, set_meta while building). It never contrasts itself against update_playlist, so it stops short of full when-not guidance.

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