Skip to main content
Glama
spotify-mcp

spotify-mcp

by codebyotto

Get my recently played tracks

get_recently_played
Read-onlyIdempotent

List the signed-in user's recently played Spotify tracks to review listening history or collect track URIs for playlist additions.

Instructions

List the signed-in user's recently played tracks (Spotify keeps only the last ~50 plays).

Each uri can be passed to add_tracks_to_playlist.track_uris. Read-only. For "what does the user listen to over the last weeks", prefer get_my_top_tracks.

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_recently_played"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of plays to return (1-50).
beforeNoUnix ms cursor: the `before` value from a previous call, to get older plays.

Output Schema

NameRequiredDescriptionDefault
beforeYesPass as `before` to get older plays; null if Spotify reports no more.
tracksYesMost recent first. A track can appear more than once.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the description correctly reinforces "Read-only" rather than restating the whole safety profile. It adds genuinely useful context the annotations cannot carry: Spotify retains only the last ~50 plays, which bounds what any result set can contain. It stops short of describing how the `before` cursor chains results across calls, leaving that to the schema.

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, zero filler, with the definition and retention caveat front-loaded before the routing advice. Every sentence carries distinct information: scope, downstream usage, and alternative selection.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so the description needn't explain return values, and the two parameters plus safety profile are fully covered by schema and annotations. For a read-only, zero-required-parameter list tool, nothing an agent needs in order to call it correctly is missing.

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 both `limit` and `before` are already documented in the schema and the baseline is 3. The description adds indirect context — the ~50-play retention explains why `limit` maxes at 50 — but gives no extra detail on the cursor format or paging loop.

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 recently played tracks") and immediately scopes it with the Spotify ~50-play cap. It explicitly distinguishes itself from get_my_top_tracks, so an agent can choose without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit exclusions rule: for "what does the user listen to over the last weeks", prefer get_my_top_tracks. It also names a concrete downstream path (each `uri` can be passed to add_tracks_to_playlist.track_uris), which tells the agent how this tool composes with a sibling.

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