Skip to main content
Glama

undo_mutation

Destructive

Reverse a specific Spotify library or playlist mutation using its receipt ID: adds/saves are removed, removals are re-added. Preview by default, then execute with confirmation.

Instructions

Undo a specific mutation by receipt ID. Inverts the recorded direction: an add/save is undone by removing, a removal by re-adding (playlist items or library). A playlist add undo removes only the rows it created, refusing when no row positions are recorded. The result reflects the refetched post-state. Non-reversible kinds return not reversible. Executing needs confirmation and is refused when the client cannot prompt (SPOTIFY_MCP_CONFIRM=never bypasses).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoPreview only, and the default: pass dry_run: false to execute the rollback.
receipt_idYesReceipt ID to undo
response_formatNo'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API objectconcise

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.1.2
    • addedInput schema / properties / dry_run / default
      Added value: +true
    • changedInput schema / properties / dry_run / description
      Previous value: -"Preview only: validate inputs and describe exactly what would change without performing it"New value: +"Preview only, and the default: pass dry_run: false to execute the rollback."
  2. Changed2 schema fields changedv1.31.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed1 schema field changedv1.28.0
    • addedInput schema / properties / response_format
      Added value: +{
      +  "default": "concise",
      +  "description": "'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API object",
      +  "enum": [
      +    "concise",
      +    "detailed",
      +    "json"
      +  ],
      +  "type": "string"
      +}
  4. Addedv1.26.1

TDQS

A4.1/5.0
Behavior5/5

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

Annotations carry only destructiveHint=true, and the description goes well beyond it: it discloses the inversion semantics (add undone by remove, removal by re-add), the partial-rollback guarantee for playlist adds, the refusals, the confirmation requirement, and the SPOTIFY_MCP_CONFIRM escape hatch. That is exactly the mutation-risk context an agent needs.

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?

Five dense sentences, front-loaded with the core action and receipt key before the refusal and confirmation caveats. Efficient, though the clause-heavy style ('an add/save is undone by removing, a removal by re-adding') costs some readability.

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?

No output schema exists, so the description must cover behavior, and it does: reversibility semantics, refusal cases, confirmation gating, and the fact that results reflect the refetched post-state. Combined with a fully covered schema, an agent has what it needs to call this correctly and safely.

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

Parameters3/5

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

Schema coverage is 100%, so receipt_id, dry_run, and response_format are already documented in the schema, and the description only echoes dry_run implicitly via 'Executing needs confirmation'. With the schema doing the heavy lifting, baseline 3 is appropriate; response_format is not touched by the description at all.

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?

States a precise verb and resource ('Undo a specific mutation') plus the scoping key ('by receipt ID'), which implicitly separates it from the sibling undo_last_mutation. It does not name that sibling outright, so the differentiation is inferable rather than explicit.

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 operating conditions: non-reversible kinds return 'not reversible', playlist-add undos refuse when no row positions are recorded, and execution requires confirmation. It stops short of telling the agent when to prefer this over undo_last_mutation or verify_receipt, so alternatives are left implicit.

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

Deploy Server

Other Tools