Skip to main content
Glama

create_smart_playlist

Generate a Spotify playlist from your own listening data—top tracks, recently played, or saved tracks—with optional artist filters and one-track-per-artist control. Preview with dry_run before creating.

Instructions

Create a playlist from rules over your own listening data: top tracks (by time range), recently played, or saved tracks — with optional artist-name filtering and a one-track-per-artist toggle. When source=saved_tracks the pool is the newest N saved tracks (N=scan_cap, default fetchAllCap=500) and truncation is reported. No deprecated recommendations endpoints involved. Every source has a pool ceiling (top_tracks 100, recently_played 50, saved_tracks scan_cap), reported as pool_capped with pool_cap — a capped pool is a floor, not a complete scan. dry_run previews the exact track list without creating anything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPlaylist name
limitNoHow many tracks the playlist should hold (after filters). Default 30.
publicNoWhether the playlist is public
sourceNoWhere candidates come from: your top tracks by time_range, your recently played history, or your saved (liked) tracks.top_tracks
dry_runNoPreview only: validate inputs and describe exactly what would change without performing it
scan_capNoHow many saved tracks to scan when source=saved_tracks; default SPOTIFY_MCP_FETCH_ALL_CAP (500). Reports truncation when hit.
time_rangeNo~4 weeks / ~6 months / all time. Default: medium_term
descriptionNoPlaylist description
artist_filterNoOnly include tracks whose artist name contains any of these substrings (case-insensitive), e.g. ["Radiohead", "Miles Davis"].
unique_artistsNoKeep at most one track per primary artist. Default false.
response_formatNo'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API objectconcise

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. Changed1 schema field changedv1.28.0
    • addedInput schema / properties / response_format
      Added value: +{
      +  "default": "concise",
      +  "description": "'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API object",
      +  "enum": [
      +    "concise",
      +    "detailed",
      +    "json"
      +  ],
      +  "type": "string"
      +}
  3. Addedv1.26.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only carry destructiveHint=false, which is thin. The description compensates by disclosing real behavioral traits: pool ceilings per source, truncation reporting, the fact that a capped pool is 'a floor, not a complete scan', and that dry_run creates nothing. It also warns about truncation for saved_tracks. The one small gap: it doesn't state what happens to an existing playlist of the same name, or whether this mutates user state (creation is implied). Still, this is well beyond the annotation floor, so a 4 is fair.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense paragraph that front-loads the core purpose and then packs in constraints. It earns its sentences; every clause adds information. It could be split for readability, but there's no waste. Slightly long for a one-liner but appropriate for the tool's complexity (11 params, 3 sources). A 4 for tight content, minor ding for lack of visual structure.

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?

Given 11 parameters, 3 enum-based sources, no output schema, and sparse annotations, the description carries the full burden. It covers: what the tool creates, each source's behavior, pool ceilings, truncation, the dry_run preview, and the exclusion of deprecated endpoints. The parameter semantics dimension covers the rest. Nothing an agent needs to decide whether to call it or how to call it correctly is missing.

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 meaning above the schema: it explains that limit applies 'after filters', clarifies that saved_tracks pool is the 'newest N saved tracks' with scan_cap defaulting to fetchAllCap=500, and defines source-specific pool ceilings. It also frames dry_run as 'previews the exact track list'. This is genuine added value beyond the property descriptions, so a 4.

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 ('Create') and resource ('a playlist from rules over your own listening data'), then enumerates the exact rule dimensions (source, artist filter, unique artists). It clearly differentiates from the many playlist-creation siblings (e.g. create_playlist, taste_to_playlist, playlist_template_apply) by anchoring on rule-based creation from personal listening data and explicitly ruling out deprecated recommendations endpoints. An agent can tell this apart from siblings without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit 'when to use' context by naming the three data sources and their semantics, and it adds a crucial exclusion: 'No deprecated recommendations endpoints involved,' which tells the agent this is the modern replacement for a legacy flow. It also explains when dry_run is appropriate ('previews the exact track list without creating anything'). Combined with the sibling list (save_smart_playlist_rule, refresh_smart_playlist), an agent can select this over alternatives.

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