Skip to main content
Glama

playlist_swap_positions

Reorder a playlist by swapping the items at two 1-based positions. Provide the playlist and positions to preview or apply the change.

Instructions

Swap the items at two 1-based positions — e.g. flip tracks 3 and 7. Positions may be any two distinct slots in the playlist. Written as one atomic replace. Quota: 🟢 2 GETs + 1 PUT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoPreview only: perform the read side and return a PLAN without changing anything. Pass false to commit. Default true
position_aYesFirst position (1-based)
position_bYesSecond position (1-based)
max_resultsNoMax items to return (default: SPOTIFY_MCP_MAX_ITEMS env or 50)
playlist_idYesPlaylist to edit, as ID or spotify:playlist: URI
response_formatNo'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API objectconcise
Behavior4/5

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

With no annotations provided, the description carries the full burden—and it does well: it reveals the operation is an atomic replace and gives an operational quota ('🟢 2 GETs + 1 PUT'). It does not cover failure modes or side effects, but the atomicity and cost are meaningful behavioral traits beyond the schema. No contradiction with annotations exists.

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 compact sentences, each earning its place: the first defines the operation, the second resolves ambiguity about position constraints, and the third adds atomicity and quota context. No filler or repetition of schema fields.

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

Completeness3/5

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

The description is mostly sufficient for a simple two-position swap, but it omits a crucial behavioral detail: the schema's dry_run parameter defaults to true, meaning the tool only returns a PLAN unless dry_run=false is explicitly set. The description's 'Swap' language could mislead an agent into thinking an actual mutation occurs by default. With no output schema, it also does not describe the return value, leaving some invocation uncertainty.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds value by clarifying the positions must be 'any two distinct slots'—a constraint not enforced in the schema—and provides a concrete example. This helps the agent understand valid invocations beyond the schema's 1-based definitions.

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 highly specific verb and resource: 'Swap the items at two 1-based positions' with a concrete example ('flip tracks 3 and 7'). This makes the action unmistakable and distinguishes it from nearby siblings like reorder_playlist_items or playlist_move_block, which handle different rearrangement semantics.

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 implies clear usage: use this when you want to exchange exactly two items at known positions. It adds context with 'Positions may be any two distinct slots' and 'Written as one atomic replace,' but it does not explicitly list alternatives or state when not to use it. Still, the context is clear enough for an agent to decide.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NovaLux12/spotify-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server