An MCP server that provides tools to fetch top tracks from Spotify, both for specific artists in different countries and for the authenticated user
This Spotify server has solid naming and decent parameter schemas, but suffers from incomplete output documentation and missing error guidance. Both tools are well-named (get_* verbs), have reasonable descriptions, and include typed input parameters with defaults. However, output schemas are not formally documented, the descriptions state what fields are returned (track_name, artist_name, album; song, artist) but there's no structured schema definition for LLM consumption. Error handling is present (ValueError, RuntimeError) but lacks recovery guidance for the LLM, e.g., when artist not found, the tool just raises an error rather than suggesting search strategies. The tool definitions are explicit in the source code (@mcp.tool decorators), so no inference penalty applies. This is a C+ server: competent implementation with functional tools, but missing production-grade refinements around output schemas and error recovery.
Returns the top tracks for 'artist_name' in the specified country. 'country' can be: - ISO alpha-2 code like 'DE' or 'de' - full country name like 'Germany'. Must be the country name in English Returns: list of dicts, each with keys: track_name, artist_name, and album
Fetch the current user's top tracks and return a list of dictionaries with: - 'song' : track name (string) - 'artist' : comma-separated artist names (string)
Output schemas not formally documented. Tool descriptions state what fields are returned (e.g., 'list of dicts, each with keys: track_name, artist_name, and album') but no structured output schema is provided. LLMs need machine-parseable output schemas to plan downstream tool calls and extract data reliably.
Error messages lack recovery guidance. When artist_name not found (ValueError: 'Artist not found on Spotify'), the error tells the LLM what went wrong but not what to do next. Should suggest: 'Artist not found. Try a partial name or check spelling.' This prevents LLM dead-end and guides retry strategy.
No input validation error messages for time_range in get_user_top_tracks. Parameter description lists valid values ('short_term', 'medium_term', 'long_term') but the tool doesn't validate or document what happens if an invalid value is passed. Should return: 'Invalid time_range: {value}, must be one of: short_term, medium_term, long_term'
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 54 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 43 | - | v1 |
No idempotency guarantees or retry guidance. Both tools are read-only (safe to retry) but this is not declared. Tool descriptions should state: 'This is a read-only operation and is safe to retry.' This helps LLMs know when to retry on transient failures.
Country parameter accepts both codes and names but lacks validation examples. Description says 'ISO alpha-2 code like DE or de' and 'full country name like Germany' but doesn't clarify: case-insensitive? Hyphenated names? Accented characters? Should include: 'Case-insensitive; e.g., DE, de, Germany, germany all work. Multi-word names: type the full English name (e.g., United Kingdom, not UK).'