Skip to main content
Glama
jamiew

Spotify MCP Server

by jamiew

Reorder Playlist

reorder_playlist
Destructive

Move a contiguous block of tracks to a new position within a Spotify playlist using zero-based indices for range start and insertion point.

Instructions

Move a contiguous block of tracks to a new position within a playlist.

Args:
    playlist_id: Playlist ID
    range_start: Zero-based position of the first track to move
    insert_before: Zero-based position to insert the moved block before.
        Pass the playlist's total track count to move the block to the end.
    range_length: Number of consecutive tracks to move (default 1)
    snapshot_id: Optional playlist snapshot ID to guard against concurrent edits

Returns:
    ActionResult with the new snapshot_id

Note: Positions are zero-based. Example: move the first 3 tracks to just
before position 10 with range_start=0, range_length=3, insert_before=10.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
playlist_idYes
range_startYes
snapshot_idNo
range_lengthNo
insert_beforeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYes
messageYes
snapshot_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already indicate mutation and destructiveness; the description adds meaningful behavior details: tracks are moved as a contiguous block, positions are zero-based, range_length defaults to 1, and snapshot_id is an optional concurrency guard. It accurately represents a mutating operation without contradicting the destructiveHint.

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?

The description is well-structured with a one-sentence summary, compact Args list, Returns note, and illustrative example. Every sentence adds necessary information and there is no filler or repetition of the input schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter mutating tool, the description fully explains parameters, return value, positional conventions, and an edge case. The output schema covers return details, and annotations cover safety characteristics, so nothing essential is missing for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, and it succeeds. Every parameter is explained in Args, including required positional semantics, the insert_before end-of-playlist trick, the default for range_length, and the purpose of snapshot_id.

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 opens with a specific verb and resource: 'Move a contiguous block of tracks to a new position within a playlist.' This goes beyond the title by defining the exact behavior and scope, and it is clearly distinct from sibling operations like adding or removing tracks.

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 gives clear operational context, including how to move a block to the end by passing the playlist's total track count, and how snapshot_id guards against concurrent edits. It does not explicitly compare against add/remove alternatives, but the 'within a playlist' framing and contiguous-block requirement make the appropriate use case clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.