Skip to main content
Glama

replace_playlist_tracks

Replace all tracks in a playlist with a specified list of track IDs or URIs, useful for reordering a playlist.

Instructions

Replace all tracks in a playlist with the given list, in order.

This is useful for reordering a playlist. First get the current tracks with get_playlist_tracks, reorder the IDs as desired, then pass the full ordered list here. The playlist will contain exactly these tracks in exactly this order.

Accepts track IDs or URIs. No limit on total tracks (batched internally).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_idsYes
playlist_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses key behaviors: replaces all tracks (destructive), accepts IDs or URIs, no total track limit (batched internally). With no annotations, this covers important traits. Lacks mention of permissions or reversibility.

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?

Concise three-paragraph structure: first sentence states purpose, second gives usage pattern, third adds details. No wasted words.

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?

Covers purpose, usage, and behavioral details adequately. With an output schema present, return values need no explanation. Missing error handling or prerequisites, but sufficient for a simple mutation.

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?

Although schema coverage is 0%, description adds meaning: track_ids accepts 'track IDs or URIs' and no limit. Playlist_id is self-explanatory. Provides context beyond the schema.

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?

Description clearly states 'Replace all tracks in a playlist with the given list, in order,' specifying the verb and resource. It distinguishes from siblings like add_tracks_to_playlist and remove_tracks_from_playlist by indicating this is a full replacement.

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?

Explicitly describes a usage pattern: first use get_playlist_tracks, reorder, then pass here. Implies when not to use (e.g., for adding a few tracks). However, no explicit mention of alternative tools like add_tracks_to_playlist.

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/obrien-matthew/mcp-spotify'

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