Skip to main content
Glama

remove_duplicate_playlist_items

Destructive

Remove duplicate tracks from a Spotify playlist by keeping the first occurrence. Choose uri, name_artist, or name matching, and preview changes with dry_run.

Instructions

Remove duplicate items from a playlist: keeps the first occurrence of each track and removes later repeats, under the match_by rule the other duplicate tools use — uri (default, exact repeats), name_artist (same name and credited artists, catching remasters and relinks under a new URI) or name (same title only). The rule applied is echoed as match_by. Supports dry_run; removals of 10+ items ask for confirmation via elicitation. See the duplicate-matching vocabulary in SPEC section 4.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoPreview only: validate inputs and describe exactly what would change without performing it
match_byNoWhich rule decides that two items are the same: `uri` (exact URI, the default), `name_artist` (case-insensitive name + credited artists, catches relinks/remasters), or `name` (case-insensitive name only). The rule applied is echoed in the result as `match_by`.
playlist_idYesPlaylist ID
include_relinkedNoDeprecated alias for `match_by`, kept for one release: true is `name_artist` and false is `uri`. It cannot express the `name` rule, which is why `match_by` replaced it. Sending both, where they mean different rules, is an error rather than a silent choice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv3.0.1
    • removedInput schema / properties / include_relinked / default
      Removed value: -false
    • changedInput schema / properties / include_relinked / description
      Previous value: -"Also collapse same-song duplicates under different URIs (relinks/remasters). Default false — only exact URI repeats are removed."New value: +"Deprecated alias for `match_by`, kept for one release: true is `name_artist` and false is `uri`. It cannot express the `name` rule, which is why `match_by` replaced it. Sending both, where they mean different rules, is an error rather than a silent choice."
    • addedInput schema / properties / match_by
      Added value: +{
      +  "description": "Which rule decides that two items are the same: `uri` (exact URI, the default), `name_artist` (case-insensitive name + credited artists, catches relinks/remasters), or `name` (case-insensitive name only). The rule applied is echoed in the result as `match_by`.",
      +  "enum": [
      +    "uri",
      +    "name_artist",
      +    "name"
      +  ],
      +  "type": "string"
      +}
  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. Addedv1.26.1

TDQS

A4.1/5.0
Behavior4/5

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

With only destructiveHint=true in annotations, the description carries most of the burden and does well: it discloses what is kept vs removed, that a match rule determines equality, that dry_run previews, and that removals of 10+ items trigger elicitation confirmation. It stops short of stating irreversibility or undo behavior.

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-loaded with the core action and the match_by rules, which is efficient. The sentences are long and partially duplicate the schema's match_by and include_relinked text, costing a little density.

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?

No output schema exists, and the description notes that the applied rule is echoed as match_by, covering the key return expectation. Combined with the dry_run and confirmation disclosures, it is complete enough for a moderately complex mutation tool.

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 every parameter, including the full match_by enum and the include_relinked deprecation error case. The description restates the match_by rules rather than adding new syntax or constraints, so the baseline 3 is appropriate.

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+resource ('Remove duplicate items from a playlist') and immediately specifies the semantics: first occurrence kept, later repeats removed. The matching-rule mechanics distinguish it from siblings like find_duplicates_in_playlist and clean_all_playlists.

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 clear context — deduplicate a single playlist under a chosen match rule — and mentions dry_run and the 10+ confirmation gate. It references 'the other duplicate tools use' but never explicitly says when to pick this over find_duplicates_in_playlist or clean_all_playlists.

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