Skip to main content
Glama
Spotify MCP Server

Spotify MCP Server

by jamiew

Recently Played

get_recently_played
Read-onlyIdempotent

Retrieve recently played tracks in reverse chronological order with an optional 1–50 limit to review listening history or build recent-play context.

Instructions

Get recently played tracks, most recent first.

Args:
    limit: Max tracks to return (1-50, default 20)

Returns:
    RecentlyPlayed with each track's played_at timestamp

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
limitNo

Output Schema

NameRequiredDescriptionDefault
itemsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.8.1
    • addedOutput schema / $defs / Track / properties / show
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Show"
      +}
    • addedOutput schema / $defs / Track / properties / show_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Show Id"
      +}
    • addedOutput schema / $defs / Track / properties / type
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Type"
      +}
  2. Addedv0.6.1

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so safety and idempotency are covered. The description adds useful behavior beyond that: the result ordering and the presence of a played_at timestamp per track. It is silent on auth requirements and on whether only the current user's history is returned, which would matter for an open-world read.

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?

Short and front-loaded: the core behavior is in the first sentence, with Args/Returns following in a scannable structure. The docstring-style formatting is slightly verbose for one parameter but nothing is wasted.

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

Completeness3/5

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

For a one-parameter read tool with an output schema, most of the essentials are present — scope, ordering, parameter bounds. The gaps are the lack of any routing guidance among the many sibling read tools and no mention of whose history is returned or whether results are capped by a time window.

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 description coverage is 0% and the schema only supplies a default of 20, so the description carries the burden — and it does, documenting the range (1-50) and the default explicitly. Only a single parameter, and it is fully characterized.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Get recently played tracks") plus an ordering guarantee ("most recent first"), which an agent can distinguish from list/get tools. It does not explicitly differentiate itself from near-neighbors like get_top_items or get_playback_state, so it falls short of 5.

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

Usage Guidelines2/5

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

There is no when-to-use guidance at all — nothing says whether this is for building a history view versus get_top_items (aggregate favorites) or get_playback_state (currently playing). The agent must infer the selection rule from the names alone.

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