Skip to main content
Glama

clean_all_playlists

Scan every playlist in your library for duplicate tracks and remove repeats when confirmed. Preview findings first, then clean up playlists to keep only the first occurrence of each song.

Instructions

Scan every playlist in your library for duplicate items (repeated URIs, and on opt-in same-song copies under different URIs). Reports per-playlist findings by default; pass apply=true to remove them (keeps the first occurrence of each group). Bulk removals ask for one confirmation before anything is deleted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applyNoDeprecated alias for dry_run — prefer dry_run. false (default): report only. true: execute the cleanup across all playlists with duplicates. If both are given, dry_run wins.
dry_runNoPreview only — when true, nothing is changed; when false via dry_run=false or apply=true, executes the cleanup
max_resultsNoMax items to return (default: SPOTIFY_MCP_MAX_ITEMS env or 50)
response_formatNo'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API objectconcise
include_relinkedNoAlso count/collapse same-song entries under different URIs (relinks/remasters).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.28.0
    • changedInput schema / properties / apply / description
      Previous value: -"false (default): report only — nothing is changed. true: execute the cleanup across all playlists with duplicates."New value: +"Deprecated alias for dry_run — prefer dry_run. false (default): report only. true: execute the cleanup across all playlists with duplicates. If both are given, dry_run wins."
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "description": "Preview only — when true, nothing is changed; when false via dry_run=false or apply=true, executes the cleanup",
      +  "type": "boolean"
      +}
  2. Addedv1.26.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses the destructive nature of apply=true, the keep-first-occurrence behavior, and the one-time confirmation prompt before deletions. This is strong safety disclosure for a mutation tool, though it stops short of describing response format or impact details.

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?

Two focused sentences cover function, default behavior, destructive mode, and confirmation. The key distinction (report vs. remove) is front-loaded, and no words are wasted.

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 multi-playlist mutation tool, the description covers the critical context: scope, default safe behavior, removal trigger, duplicate-group policy, and confirmation. The absence of an output schema means report structure is not fully specified, but 'per-playlist findings' plus response_format parameters give an agent enough to proceed.

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 schema already documents all five parameters. The description adds useful interpretive context around apply/dry_run and include_relinked, but this is supplementary rather than necessary because the schema carries the semantic weight.

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?

The description states a specific verb ('Scan') and resource ('every playlist in your library') and clearly distinguishes the all-library scope from per-playlist duplicate tools. It also explains both default reporting behavior and the opt-in removal mode.

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?

The description clearly implies when to use this tool: for library-wide duplicate detection and cleanup. It does not explicitly name sibling alternatives such as find_duplicates_in_playlist or find_duplicate_tracks_across_playlists, but the 'every playlist' framing provides clear scope context.

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