Skip to main content
Glama
nlevy

Spotify MCP Server

by nlevy

get_user_top_tracks

Retrieve your most played tracks on Spotify over a specified time period. Customize results with time range, limit, and offset options.

Instructions

Get user's top tracks from Spotify

Arguments: time_range (str, optional): Time period for top tracks (default: "medium_term") - "short_term": Last 4 weeks - "medium_term": Last 6 months - "long_term": Several years limit (int, optional): Maximum number of tracks to return (default: 20, max: 50) offset (int, optional): Index of the first track to return (default: 0)

Returns: Dict[str, Any]: - success (bool): Whether the operation was successful - tracks (List[Dict]): List of track objects containing: - id (str): Spotify track ID - name (str): Track name - album (Dict): Album info with id, name, images - artists (List[Dict]): List of artists with id, name - popularity (int): Track popularity score (0-100) - duration_ms (int): Track duration in milliseconds - spotify_url (str): Spotify track URL - time_range (str): Time range used for the query - total_tracks (int): Number of tracks returned - message (str): Success message - error (str, optional): Error message if failed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
time_rangeNomedium_term
limitNo
offsetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description clearly details the return structure including success/error handling, but does not mention authentication requirements or rate limits. However, since no annotations are provided, the description carries full burden and is largely transparent.

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?

The description is well-structured with clear sections for arguments and returns, but it is somewhat lengthy due to including the full return schema. However, this is justified as there is no output schema in the tool definition.

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?

Given no annotations and no output schema, the description provides a comprehensive picture including return structure. Missing authentication context, but overall completeness is high for a data retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, but the tool description fully compensates by defining each parameter, defaults, options for time_range, and constraints on limit/offset. This adds significant meaning beyond the 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?

The description clearly states 'Get user's top tracks from Spotify' with a specific verb and resource. It distinguishes from sibling tools like 'get_user_top_artists' (different resource) and 'get_artist_top_tracks' (different scope).

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

Usage Guidelines3/5

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

The description does not explicitly guide when to use this tool versus alternatives like 'get_artist_top_tracks' or 'get_user_top_artists'. Usage is implied by the purpose, but no exclusions or context for when-not-to-use are given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nlevy/spotify-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server