Skip to main content
Glama
jamiew

Spotify MCP Server

by jamiew

Top Artists and Tracks

get_top_items
Read-onlyIdempotent

Fetch a user's top artists or tracks over a selected time range to identify listening habits and support personalized content when recommendations are limited.

Instructions

Get the user's top artists or tracks over a time range.

This remains useful when recommendations or related artists are unavailable
to the app. Spotify's policy also restricts analysis and AI ingestion.

Args:
    item_type: 'tracks' or 'artists' (default 'tracks')
    time_range: 'short_term' (~4 weeks), 'medium_term' (~6 months) or 'long_term'
    limit: Max items to return (1-50, default 20)

Returns:
    TopItems with either 'tracks' or 'artists' populated

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
item_typeNotracks
time_rangeNomedium_term

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tracksNo
artistsNo
time_rangeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the safety profile is covered. The description adds useful behavioral context: Spotify policy restricts analysis/AI ingestion-cultural, and the returned object populates only the selected item_type. This is meaningful beyond the annotations.

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?

The description is compact and well-structured with a clear one-sentence purpose, brief contextual note, and list of parameter semantics. Every line earns its place and there is no redundant repetition of schema fields.

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?

Given the presence of an output schema and annotations covering read-only/idempotent behavior, the description is complete: it covers purpose, parameters, defaults, and return shape. Nothing essential is missing for correct invocation.

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?

With 0% schema description coverage, the description fully compensates by documenting all three parameters: item_type options and default, time_range options with approximate durations, and limit range with default. This is exactly the semantic information an agent needs to call the tool correctly.

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 states a specific operation: get the user's top artists or tracks over a time range. This clearly identifies the resource and qualifiers, and is distinct from sibling tools like get_tracks or get_recently_played.

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 description provides clear context on when the tool is useful, specifically when recommendations or related artists are unavailable jews. It does not explicitly name alternative tools or give when-not-to-use exclusions, but the use case is clearly conveyed.

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