Skip to main content
Glama
spotify-mcp

spotify-mcp

by codebyotto

Get my top tracks

get_my_top_tracks
Read-onlyIdempotent

Lists the signed-in user's most played Spotify tracks for a chosen time range, ranked by Spotify, with paging and playlist-ready URIs.

Instructions

List the signed-in user's most played tracks for a time range, ranked by Spotify.

Each uri can be passed to add_tracks_to_playlist.track_uris. Read-only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_my_top_tracks"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of tracks (1-50).
offsetNoIndex of the first track; use `next_offset` to page.
time_rangeNoshort_term: about the last 4 weeks; medium_term: about 6 months; long_term: about a year.short_term

Output Schema

NameRequiredDescriptionDefault
totalYesTotal top tracks Spotify has for this time range.
tracksYesThe user's most played tracks, rank 1 = most played.
time_rangeYes
next_offsetYesPass as `offset` to get the next page; null if there are no more.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, so "Read-only." is a restatement with no added value. What the description does add is ordering semantics (ranking is Spotify's, not caller-controlled) and the interoperability note about reusing `uri` values; it does not mention paging behavior or result shape, though the latter is covered by the output schema.

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?

Two sentences, front-loaded with the core capability before the interop hint; no filler. Slightly fragmented structure (a one-line "Read-only." tacked on) that duplicates annotations rather than informing the caller.

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 3-param, fully documented, output-schema-backed read tool, the definition covers what it returns conceptually (ranked tracks with uris) and how to consume the output. Pagination is handled by the schema's offset/next_offset text, so its absence here is minor.

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 time_range enum already spells out the four-week/six-month/one-year windows, so there is little room to add. The description's "for a time range" only signals that the parameter exists and is the primary scoping control, which matches the baseline for a fully documented schema.

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 ("List the signed-in user's most played tracks") plus the selection scope (time range) and ordering semantics ("ranked by Spotify"). This distinguishes it from history-style siblings like get_recently_played without naming them.

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 phrase "most played tracks for a time range, ranked by Spotify" implicitly scopes usage to top-N/affinity queries rather than raw listening history or search. It also gives a concrete downstream path ("Each `uri` can be passed to add_tracks_to_playlist.track_uris"), but never states when to prefer a sibling such as get_recently_played or search_tracks, so no explicit exclusions.

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