Skip to main content
Glama

playlist_intersect

Compute the set intersection of 2–10 Spotify playlists: preview common tracks read-only, or commit replacing a target playlist's contents atomically.

Instructions

Keep only the tracks present in ALL of 2–10 playlists, written as one atomic replace — the missing set op (union/subtract/XOR exist). Without a target it reports the intersection read-only. Quota: 🟢 N GETs + 1 PUT when committing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dedupeNoDedupe within the RESULT sequence: keep the first or last occurrence, or none. Default nonenone
dry_runNoPreview only: perform the read side and return a PLAN without changing anything. Default true — pass false to commit.
max_resultsNoMax items to return (default: SPOTIFY_MCP_MAX_ITEMS env or 50)
response_formatNo'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API objectconcise
target_playlist_idNoExisting playlist (ID or spotify:playlist: URI) to ATOMICALLY OVERWRITE with the result. Omit to compute read-only.
source_playlist_idsYesPlaylists to intersect, as IDs or spotify:playlist: URIs (2–10)
Behavior5/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 does substantial work: it discloses that writes are a single atomic replace, that omitting the target yields a read-only report (dry-run safety), and it quantifies the cost (N GETs + 1 PUT when committing). This goes well beyond the schema, which only labels the target as 'ATOMICALLY OVERWRITE'.

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 sentences, zero filler. The core operation and atomicity are front-loaded first, the read-only mode second, and the quota note last. Every sentence earns its place, and the emoji-quota shorthand is compact while still informative.

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?

For a 6-parameter tool with commit capability, no annotations, and no output schema, the description covers the operation, the safety mode, and the cost model, with the schema handling parameter detail. Remaining gaps are the unaddressed 'playlist_intersection' sibling and no explicit description of the PLAN/report return shape beyond the schema's dry_run mention.

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 six parameters, including dry_run's commit semantics, target_playlist_id's overwrite behavior, and the dedupe/response_format enums. The description adds contextual color (quota tied to committing, read-only when target omitted) but no parameter-level syntax beyond the schema, matching the baseline-3 rule.

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 and resource ('Keep only the tracks present in ALL of 2–10 playlists') and clarifies its role as a set operation that complements union/subtract/XOR, within a clear 2–10 playlist constraint. The atomic-write and read-only modes are also stated, so an agent can grasp the operation without opening the schema. Minor caveat: a near-named sibling 'playlist_intersection' exists and is not addressed, but the core purpose remains unmistakable.

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 positions this as 'the missing set op' alongside existing union/subtract/XOR tools, which tells an agent when the operation is intended, and it explains the two invocation modes (read-only without a target, commit with a target). However, it never states when NOT to use it, and it does not acknowledge the similarly named sibling 'playlist_intersection', leaving a potential routing ambiguity.

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