Skip to main content
Glama

merge_playlists

Merge multiple Spotify playlists into one, removing duplicate tracks in first-seen order. Append to an existing playlist or create a new one.

Instructions

Merge multiple playlists into one. Deduplicates tracks across sources (first-seen order wins) and adds them in batches of 100. Pass target_playlist_id to append to an existing playlist (it is NOT cleared) or new_name to create a fresh playlist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoSource page size, 1–100. Default: 100
publicNoVisibility of a NEW playlist. Default: false
dry_runNoPreview only: validate inputs and describe exactly what would change without performing it
new_nameNoName for a newly created target playlist
scan_capNoMaximum source rows to scan; bounded by SPOTIFY_MCP_FETCH_ALL_CAP
playlistsNoCanonical ordered playlists (1–10)
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
target_playlist_idNoExisting playlist to APPEND into (never cleared)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.0.1
    • changedInput schema / properties / playlists / description
      Previous value: -"Canonical ordered playlists (1–10), or provide the complete documented legacy alias accepted by this tool"New value: +"Canonical ordered playlists (1–10)"
    • removedInput schema / properties / sources
      Removed value: -{
      -  "description": "Deprecated one-release alias supported through v2.0; removed in v2.1. Provide this complete alias or canonical playlists.",
      -  "items": {
      -    "description": "Playlist ID, spotify:playlist: URI, or Spotify playlist URL; use this reference in the canonical or documented legacy field",
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  "maxItems": 10,
      -  "minItems": 1,
      -  "type": "array"
      -}
  2. Changed12 schema fields changedv1.31.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Source page size, 1–100. Default: 100",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / playlists
      Added value: +{
      +  "description": "Canonical ordered playlists (1–10), or provide the complete documented legacy alias accepted by this tool",
      +  "items": {
      +    "description": "Playlist ID, spotify:playlist: URI, or Spotify playlist URL; use this reference in the canonical or documented legacy field",
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 10,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / scan_cap
      Added value: +{
      +  "description": "Maximum source rows to scan; bounded by SPOTIFY_MCP_FETCH_ALL_CAP",
      +  "maximum": 10000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / sources / description
      Previous value: -"Source playlists as IDs or spotify:playlist: URIs"New value: +"Deprecated one-release alias supported through v2.0; removed in v2.1. Provide this complete alias or canonical playlists."
    • addedInput schema / properties / sources / items / description
      Added value: +"Playlist ID, spotify:playlist: URI, or Spotify playlist URL; use this reference in the canonical or documented legacy field"
    • addedInput schema / properties / sources / items / minLength
      Added value: +1
    • addedInput schema / properties / sources / maxItems
      Added value: +10
    • changedInput schema / properties / target_playlist_id / description
      Previous value: -"Existing playlist to APPEND into (never cleared), as ID or spotify:playlist: URI"New value: +"Existing playlist to APPEND into (never cleared)"
    • addedInput schema / properties / target_playlist_id / minLength
      Added value: +1
    • removedInput schema / required
      Removed value: -[
      -  "sources"
      -]
  3. Addedv1.26.1

TDQS

A4/5.0
Behavior5/5

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

Annotations only declare destructiveHint=false; the description carries the real behavioral burden and does so well. It discloses the dedup rule (first-seen order wins), batching (100 per request), and crucially that an existing target playlist is appended to and NOT cleared – exactly the safety-relevant fact an agent needs before a mutation.

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 tight sentences with zero filler. The core action is front-loaded, followed by dedup/ordering behavior and then the two target modes – a logical, scannable order.

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 only a minimal annotation and no output schema, the description covers the essential operation, dedup semantics, and append-vs-create safety behavior well enough to invoke it correctly. Minor gaps remain around failure modes (e.g., duplicate IDs, exceeding source caps) and what the operation returns.

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 description coverage is 100%, so the schema already documents all nine parameters, establishing a baseline of 3. The description reinforces the target_playlist_id/new_name distinction but adds no semantics beyond what the schema fields already state (append, never cleared).

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 specific verb and resource (merge multiple playlists into one) plus its distinctive semantics: cross-source deduplication with first-seen ordering and batched adds. It does not name or contrast with near-neighbours like playlist_union or copy_playlist, so an agent can't fully disambiguate from siblings without opening schemas.

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?

It clearly explains the two operating modes (append via target_playlist_id vs create via new_name) and that the target is not cleared, which is useful conditional guidance. But it never says when to prefer this tool over alternatives such as playlist_union, batch_add_to_playlist, or copy_playlist, and gives no exclusions.

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