Skip to main content
Glama

sample_playlist_tracks

Get a random subset of tracks from any playlist. Use a seed to make the same playlist produce the same sample every time.

Instructions

Draw a uniform random sample of N tracks from a playlist — deterministic when a seed is given (same seed + same playlist = same sample), read-only. Quota: 🟢 1–2 GETs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoSeed for reproducible sampling. Omit for a fresh random draw
countNoSample size (1–200). Default 10
max_resultsNoMax items to return (default: SPOTIFY_MCP_MAX_ITEMS env or 50)
playlist_idYesPlaylist to sample (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, the description carries the full behavioral burden and does well: it explicitly states read-only, highlights deterministic behavior with seeds, and discloses quota impact ('1–2 GETs'). It could add whether sampling is without replacement or what happens if count exceeds playlist length, but the core safety and determinism traits are clearly disclosed.

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?

One tightly packed sentence conveys purpose, randomness, determinism, read-only behavior, and quota cost. Every element earns its place, and the most decision-relevant traits appear first.

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 read-only sampling tool with a well-described schema, most needed operational context is present. The description omits edge-case behavior such as sampling more tracks than exist, but the schema and 100% parameter coverage mitigate this. Overall, an agent can invoke it correctly with confidence.

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 parameters are already documented. The description still adds meaning beyond the schema by framing count and seed in terms of 'uniform random sample' and reproducibility, clarifying what the seed controls. It does not repeat parameter details, which is appropriate.

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 names a specific verb ('draw'), a precise resource ('a playlist'), and a distinctive behavior ('uniform random sample of N tracks'). It also clarifies determinism with a seed and read-only semantics, which separates it from playlist mutation and shuffle tools.

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 description clearly implies when to use it — when a random, optionally reproducible sample of playlist tracks is needed — and explains seed behavior. However, it does not name alternatives or state when not to use it, leaving the agent to infer routing from among many similar playlist tools.

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