Skip to main content
Glama

search_within_playlist

Read-onlyIdempotent

Search within a single Spotify playlist for tracks or episodes matching a query by name, artist, album, or show. Narrow results by kind.

Instructions

Text search inside a single playlist: a client-side filter over the rows the walk read, cheaper than paging get_playlist_items yourself for a narrow query — but it can only see that window, so scanned_items/scan_cap/scan_truncated say how much of the playlist was actually read. Matches item name, artist, album and show name; kind narrows a mixed playlist to tracks only or episodes only. Quota: GET /playlists/{id}/items paged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoAlias for playlist_id, matching get_playlist_items
kindNoItem kinds to match: 'track', 'episode', or 'any' (default — both). Mixed playlists hold both row shapesany
queryYesSubstring to match against track/episode name, artist, album, show name
marketNoMarket for track relinking, e.g. 'US'
max_resultsNoMax items to return (default: SPOTIFY_MCP_MAX_ITEMS env or 50)
playlist_idNoPlaylist ID (or pass it as 'id')
response_formatNo'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API objectconcise

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv3.0.1
    • addedInput schema / properties / id
      Added value: +{
      +  "description": "Alias for playlist_id, matching get_playlist_items",
      +  "type": "string"
      +}
    • addedInput schema / properties / kind
      Added value: +{
      +  "default": "any",
      +  "description": "Item kinds to match: 'track', 'episode', or 'any' (default — both). Mixed playlists hold both row shapes",
      +  "enum": [
      +    "track",
      +    "episode",
      +    "any"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / playlist_id / description
      Previous value: -"Playlist ID"New value: +"Playlist ID (or pass it as 'id')"
    • removedInput schema / properties / playlist_id / minLength
      Removed value: -1
    • changedInput schema / properties / query / description
      Previous value: -"Substring to match against track/episode name, artist, album"New value: +"Substring to match against track/episode name, artist, album, show name"
    • changedInput schema / required
      Previous value: -[
      -  "playlist_id",
      -  "query"
      -]New value: +[
      +  "query"
      +]
  2. Changed2 schema fields changedv1.31.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed2 schema fields changedv1.28.0
    • changedInput schema / properties / market / description
      Previous value: -"Market for track relinking"New value: +"Market for track relinking, e.g. 'US'"
    • addedInput schema / properties / market / pattern
      Added value: +"^[A-Za-z]{2}$"
  4. Addedv1.26.1

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say readOnly/idempotent; the description goes well beyond by disclosing that the search is client-side over a partial walk, that results depend on that window, which fields report coverage (scanned_items/scan_cap/scan_truncated), and the underlying quota cost.

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?

Purpose and the alternative-tool comparison are front-loaded in the first clause, and every clause carries information; the single dense sentence with multiple em-dash asides is slightly heavy but not padded.

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?

With no output schema, the description usefully names the scan-status fields an agent should inspect, and covers matching scope, kind filtering and quota; it is nearly complete, though it leaves market/response_format semantics entirely to the schema.

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 coverage is 100%, so the baseline is 3. The description restates the match fields and kind semantics that the schema already documents, adding little parameter syntax or formatting detail beyond what is given there.

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?

States a specific verb and resource ('Text search inside a single playlist') plus the mechanism ('client-side filter over the rows the walk read'), which is enough to distinguish it from get_playlist_items and from the library-wide search siblings without opening a schema.

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 frames the use case against a named alternative ('cheaper than paging get_playlist_items yourself for a narrow query') and warns of the scan-window limitation, but it never states when NOT to use it (e.g. when a full or cross-playlist search is needed, point to search_deep/search).

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