Skip to main content
Glama

undo_mutation

Revert a Spotify change using its receipt ID, converting playlist additions to removals and library saves to removals. Supports dry-run previews.

Instructions

Undo a specific mutation by receipt ID. Inverts: playlist_items add→remove, library save→remove. Non-reversible kinds return not reversible. Supports dry_run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoPreview only: validate inputs and describe exactly what would change without performing it
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. 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"
      +}
  2. Addedv1.26.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden and does disclose that the tool mutates, handles non-reversible kinds, and supports dry-run previews. However, it does not describe side effects, response content beyond errors, or what happens when a receipt is unknown or expired.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short, front-loaded sentences: purpose, scope with concrete inverse examples, and a limitation/preview note. No filler or redundant restating of the tool name.

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

Completeness3/5

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

Given no output schema and no annotations, the description could do more to explain what the caller receives, especially for successful undo operations. It covers the main inputs and a key error case, but leaves gaps around unknown receipts and how it relates to undo_preview.

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 the baseline is 3. The description adds context that receipt_id refers to a logged mutation and that dry_run previews, but it does not add syntax, formatting, or default behavior beyond what the schema already states.

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 ('Undo'), a specific resource ('mutation by receipt ID'), and explicit inverse mappings. This distinguishes it from siblings like undo_last_mutation and mutation_log_export without needing to open 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 Guidelines3/5

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

The 'by receipt ID' requirement and 'Non-reversible kinds return not reversible' imply when the tool is usable, but the description never names alternatives like undo_last_mutation, undo_preview, or receipt_lookup. Usage context is mostly left to inference.

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