Skip to main content
Glama

playlist_subtract

Remove tracks from a base playlist that also appear in other playlists by rewriting it with only the remaining tracks.

Instructions

Remove tracks of B..N from A by REWRITING A: one PUT replaces every row with the ones that survive, so any row of A absent from the union is DELETED, and the rows that remain are re-written in order. Subtracting every track empties A via one PUT with an empty uris array (Spotify's documented clear); a reply with no snapshot_id reports unconfirmed, not ok. Quota: N GETs + PUT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoSource page size, 1–100. Default: 100
dry_runNoPreview only: validate inputs and describe exactly what would change without performing it
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
base_playlist_idYesBase playlist ID, URI, or URL. Required; list only the subtraction sources in playlists.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv3.0.1
    • changedInput schema / properties / base_playlist_id / description
      Previous value: -"Base playlist ID, URI, or URL. Optional only for the deprecated positional form, where playlists[0] is the base."New value: +"Base playlist ID, URI, or URL. Required; list only the subtraction sources in playlists."
    • 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 / subtract_playlist_ids
      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"
      -}
    • addedInput schema / required
      Added value: +[
      +  "base_playlist_id"
      +]
  2. Changed14 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 / base_playlist_id / description
      Added value: +"Base playlist ID, URI, or URL. Optional only for the deprecated positional form, where playlists[0] is the base."
    • addedInput schema / properties / base_playlist_id / minLength
      Added value: +1
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Source page size, 1–100. Default: 100",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / max_results
      Added value: +{
      +  "description": "Max items to return (default: SPOTIFY_MCP_MAX_ITEMS env or 50)",
      +  "exclusiveMinimum": 0,
      +  "maximum": 2000,
      +  "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 / 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"
      +}
    • 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"
      +}
    • addedInput schema / properties / subtract_playlist_ids / description
      Added value: +"Deprecated one-release alias supported through v2.0; removed in v2.1. Provide this complete alias or canonical playlists."
    • addedInput schema / properties / subtract_playlist_ids / 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 / subtract_playlist_ids / items / minLength
      Added value: +1
    • addedInput schema / properties / subtract_playlist_ids / maxItems
      Added value: +10
    • removedInput schema / required
      Removed value: -[
      -  "base_playlist_id",
      -  "subtract_playlist_ids"
      -]
  3. Addedv1.26.1

TDQS

B3.1/5.0
Behavior1/5

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

The description states in caps that rows of A absent from the union are DELETED and that subtracting everything empties A via a documented clear, which is destructive mutation behavior. The annotation declares destructiveHint=false, i.e. additive-only, which directly contradicts the described deletion semantics.

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?

The core operation is front-loaded in the first clause and each sentence carries real information (rewrite semantics, empty-clear edge case, snapshot_id meaning, quota). It is dense and somewhat run-on, especially the second sentence, but there is little filler.

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 7-parameter mutation tool with no output schema, the description supplies the missing behavioral context: destructive rewrite semantics, empty-subtraction edge case, snapshot_id/confirmation semantics, and a quota estimate. Coverage is strong, though the contradiction with the annotation undercuts trust in the safety picture.

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 every parameter (limit, scan_cap, dry_run, playlists, max_results, response_format, base_playlist_id) is already documented in the schema. The description adds only the semantics of the empty-uris clear case and does not enrich any individual parameter beyond the schema.

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?

The description names a precise verb+resource+scope: remove tracks belonging to playlists B..N from playlist A, and it spells out the rewrite mechanism that distinguishes this set-subtraction from a plain row-by-row removal. It stops short of naming sibling alternatives (e.g., playlist_union, remove_from_playlist), so it is clear rather than sibling-routing.

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?

Usage is implied by the operation described (a set-difference edit) and the quota note hints at cost trade-offs, but there is no explicit when-to-use / when-not-to-use guidance and no alternative tool is named. The schema's dry_run field carries most of the 'preview before committing' guidance.

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