Skip to main content
Glama

split_playlist_by_duration

Split any Spotify playlist into consecutive parts matching a target runtime, previewing the plan before creating new playlists.

Instructions

Split a playlist greedily into consecutive parts of a target runtime (e.g. 60-minute commute blocks), each written to a NEW playlist — dry_run defaults to TRUE. Quota: 🟡 GET + N creates + chunked adds when committing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prefixNoNew playlist name prefix. Default: "<original name> — Part"
publicNoPublic visibility for a newly created playlist. Default: private
dry_runNoPreview only: perform the read side and return a PLAN without changing anything. Pass false to commit. Default true
max_resultsNoMax items to return (default: SPOTIFY_MCP_MAX_ITEMS env or 50)
playlist_idYesPlaylist to split (ID or spotify:playlist: URI)
tolerance_secNoA part may run over by up to this many seconds. Default 30
target_minutesYesTarget runtime per part, in minutes
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 of behavioral disclosure. It does well by revealing the dry_run default (TRUE), the cost model ('GET + N creates + chunked adds when committing'), and that outputs are new playlists. It stops short of explicitly stating that the source playlist is never modified, though 'NEW playlist' implies it.

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 dense sentences with no filler. The core purpose and algorithm are front-loaded, the dry-run safety default is highlighted, and the quota summary is packed efficiently into a short suffix.

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?

Given the tool has 8 parameters, no annotations, and no output schema, the description covers the most critical facts: purpose, algorithm, output destination, dry-run safety, and commit-time cost. It does not detail the shape of the returned plan in dry_run mode, but the schema's dry_run description already mentions returning a PLAN, and this omission is minor.

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 8 parameters. The description adds some context by giving a concrete target-runtime example and stating the dry_run default, but it does not materially deepen understanding of parameters beyond what the schema provides.

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 states a specific verb ('Split') applied to a specific resource (a playlist), the algorithm ('greedily'), the criterion ('target runtime'), and the output behavior ('each written to a NEW playlist'). This clearly differentiates it from siblings like split_playlist_by_count, which splits by item count rather than duration.

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?

The example of '60-minute commute blocks' and the 'target runtime' phrasing imply the intended use case, but the description does not explicitly state when to choose this tool over alternatives such as split_playlist_by_count, playlist_trim_to_duration, or filter_playlist_by_duration. Usage context is present but not contrasted with siblings.

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