Skip to main content
Glama
spotify-mcp

spotify-mcp

by codebyotto

Search Spotify tracks

search_tracks
Read-onlyIdempotent

Search the Spotify catalog for ranked, unique track entries with ready-to-use URIs for building playlists; read-only and does not modify the user's account.

Instructions

Search the Spotify catalog for tracks.

Returns unique, ranked, compact track entries. Each uri (spotify:track:…) can be passed directly to add_tracks_to_playlist.track_uris. Read-only; nothing in the user's account changes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_tracks"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of results to fetch (1-30). Ask for everything you need in one call instead of paging yourself; duplicates are removed within a call, so slightly fewer tracks may come back.
queryYesFree-text search, e.g. 'bohemian rhapsody queen'. Field filters narrow results: artist:<name>, track:<title>, album:<name>, year:<YYYY or YYYY-YYYY>, genre:<name>.
offsetNoIndex of the first result; only needed to continue from `next_offset`.

Output Schema

NameRequiredDescriptionDefault
queryYes
totalYesTotal matches as reported by Spotify (approximate; can include duplicates).
tracksYesUnique tracks in Spotify's ranking order.
next_offsetYesPass as `offset` to continue after these results; null if there are no more.
duplicates_removedYesTracks Spotify returned more than once in this call, which were dropped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already carry readOnly/openWorld/idempotent/non-destructive, so the bar is lower; the description still adds that results are unique, ranked and compact, which tells the agent how to interpret the list. The read-only restatement is mildly redundant, and nothing is said about ranking signals or failure behavior.

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 short sentences, front-loaded with the purpose, then result nature, then the chaining hint. No filler or restated title text.

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 an output schema present, the description needn't enumerate return fields, and annotations cover the safety profile; the chaining hint and uniqueness/ranking note cover what an agent needs to act. Minor gaps: no mention of empty-result behavior or how ranking relates to the query filters.

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% and the field-filter syntax (artist:, track:, album:, year:, genre:) plus limit/offset semantics are all documented in the schema. The description itself adds no parameter detail beyond pointing at downstream uri usage, so the baseline 3 applies.

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+resource ("Search the Spotify catalog for tracks") and the scope word "catalog" implicitly separates it from library-scoped siblings like get_my_top_tracks and get_recently_played. The follow-on sentence naming add_tracks_to_playlist further pins down its role in the tool graph.

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?

Gives clear downstream usage ("Each uri can be passed directly to add_tracks_to_playlist.track_uris") and the limit parameter steers agents to one large call rather than manual paging. It does not explicitly say when to prefer this over the user-library siblings, so it stops short of full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.