Skip to main content
Glama

replace_playlist_items

Destructive

Replace all items in a Spotify playlist with a new ordered list of track or episode URIs, overwriting existing content. Handles lists over 100 items via internal chunking and offers dry-run preview.

Instructions

Replace ALL items in a playlist with the supplied URIs, overwriting the current contents. Lists longer than 100 URIs are sent in chunks internally (replace + appends).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urisYesComplete ordered list of track or episode URIs the playlist should contain
dry_runNoPreview only: validate inputs and describe exactly what would change without performing it
playlist_idYesPlaylist ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.31.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  2. Addedv1.26.1

TDQS

A4.2/5.0
Behavior4/5

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

The annotations include destructiveHint=true, which already signals the destructive nature. The description adds valuable behavioral context beyond that: it explicitly states that current contents are overwritten, and it discloses the internal chunking behavior for lists longer than 100 URIs. This is exactly the kind of behavioral detail that helps an agent understand side effects and limits. It doesn't mention reversibility or permissions, but the destructive annotation plus the overwrite statement cover the critical risk.

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 sentences, zero filler. The first sentence states the core operation and its destructive effect. The second sentence adds the important chunking behavior. Every word earns its place, and the most critical information (replace + overwrite) is front-loaded.

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 mutation tool with no output schema, the description covers the essential operational facts: what it does, what it overwrites, and how it handles large inputs. The dry_run parameter is documented in the schema. The only minor gap is that it doesn't state what the response/return value is, but with no output schema and a clear operation, this is a small omission. The description is complete enough for an agent to call it correctly.

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 three parameters. The description adds the crucial semantic that the uris array is the complete replacement set, not an incremental addition, and that the order is preserved. This adds meaning beyond the schema's 'Complete ordered list' phrasing, but the schema already carries most of the parameter documentation burden. The dry_run parameter is self-explanatory in the schema and the description doesn't add to it.

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 ('Replace'), a specific resource ('ALL items in a playlist'), and the exact effect ('overwriting the current contents'). It also distinguishes itself from related playlist mutation tools by emphasizing the full-replacement semantics, which is the key differentiator among siblings like add_to_playlist, remove_from_playlist, reorder_playlist_items, and batch_add_to_playlist.

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: when the caller wants the playlist to contain exactly the supplied URIs and nothing else. It doesn't explicitly name alternatives or state when not to use it, but the 'Replace ALL items' phrasing makes the usage context unambiguous. It also explains the internal chunking behavior for long lists, which helps the agent understand that large inputs are handled automatically.

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