The DJ MCP Server exhibits consistent structural issues across all 18 tools. While tool naming is generally verb-forward and parameter schemas are visible with type definitions, critical gaps significantly impact quality. Most tool descriptions are in Japanese and extremely brief (10-30 chars), falling well below the 50-200 char production baseline and failing to explain WHEN to use each tool or what it returns. Output schemas are completely undocumented, no tool shows what fields are returned. Parameter descriptions exist but are minimal and lack guidance on valid ranges, constraints, or dependencies. Error handling is absent from all visible definitions. The facade pattern (SpotifyTools delegating to feature managers) is sound architecturally, but tool definitions lack the detail required for reliable LLM selection and reasoning.
All tool descriptions are under 30 characters in Japanese with no English translations. Examples: 'ユーザーのプレイリスト一覧を取得' (9 words, ~21 chars). These descriptions lack WHEN to use the tool, dependencies, or what is returned. LLMs cannot reliably select tools based on this signal.
No tool shows output schema documentation. The source code shows method signatures and docstrings with return type annotations (e.g., 'List[Playlist]', 'Dict[str, Any]'), but the MCP tool definitions themselves do not document what fields are present in the response. An LLM cannot know whether a returned Playlist contains 'id', 'uri', 'owner', or 'tracks', it must guess. This breaks downstream chaining (e.g., passing a playlist_id to add_tracks_to_playlist).
Recommendations
CRITICAL: Translate all tool descriptions to English and expand to 50-150 characters. Include WHEN to use (e.g., 'Call this to retrieve all playlists created by or followed by the authenticated user. Returns playlist IDs, names, and URIs for chaining to get_playlist_tracks.') and WHAT is returned.
CRITICAL: Document output schemas for every tool. For example, get_playlists should declare: {type: 'array', items: {type: 'object', properties: {id: {type: 'string'}, name: {type: 'string'}, uri: {type: 'string'}, owner: {type: 'object', properties: {id: {type: 'string'}, display_name: {type: 'string'}}}}}}. Without this, LLMs cannot chain tools.
CRITICAL: Remove or server-side inject the 'sp' (Spotify) parameter. MCP tools should not expose authentication objects. If Spotify is pre-authenticated, the parameter is unnecessary. If not, use standard OAuth/token patterns with server-side injection via environment variables or a credentials service.
HIGH: Add error handling guidance to every tool description. Example for create_playlist: 'Returns 400 if the user lacks permissions to create playlists. Returns 429 if rate-limited by Spotify (retry after 60 seconds). Returns 500 if Spotify is unavailable (check Spotify status page).'
HIGH: Add a 'dry_run' boolean parameter (default false) to all destructive operations (create_playlist, add_tracks_to_playlist, reorder_track, play, pause, next_track). When true, validate but do not execute. This prevents accidental deletions/modifications.
MEDIUM: Add min/max constraints to numeric parameters. Example: limit in get_playlist_tracks should be {type: 'integer', minimum: 1, maximum: 50, default: 50}, and offset should be {type: 'integer', minimum: 0}.
Parameter 'sp' (Spotify client) is marked as type 'Spotify', a custom type, not a JSON Schema primitive. JSON Schema does not recognize 'Spotify' as a valid type. The input schema appears to use a non-standard type declaration. This violates the MCP input schema format requirement. Either 'sp' should be a string (API key or token, server-side injected) or this parameter should be hidden from the tool interface entirely and injected server-side.
No error handling guidance in any tool definition. Destructive operations (create_playlist, add_tracks_to_playlist, play, pause, next_track, reorder_track) do not document what failures are possible, which are retryable, or how to recover. An LLM will not know if a 'Network timeout' is retriable or if it should ask the user.
Destructive operations (create_playlist, add_tracks_to_playlist, play, pause, next_track, reorder_track) lack any confirmation or dry-run mechanism. An LLM could accidentally delete or reorder the user's playlist without warning. The tool definitions should support a 'dry_run' parameter or a separate 'confirm_' step.
Numeric parameters lack constraints. Examples: get_playlist_tracks accepts limit (int) with default 50 but no min/max documented; offset (int) with default 0 but no max documented. Per production baseline (p10=1, p90=8 on param count), numeric params should declare min/max to prevent absurd LLM-generated values (e.g., limit=999999).
search_with_filters exposes six optional string parameters (track, artist, album, year, genre) with no validation rules or examples. An LLM does not know the expected format for 'year' (e.g., '2021' vs '2021-01-01'), or whether 'genre' is a Spotify-specific enum.
Tool naming contains some ambiguity: 'reorder_track' is vague, does it move one track, or a range? The description says 'プレイリスト内のトラック順序を変更' (change track order in playlist), but parameters show range_start, range_length, insert_before. A clearer name like 'reorder_playlist_tracks' or 'move_playlist_track_range' would self-document the behavior.
The parameter 'sp' (Spotify client) appears in every tool signature, suggesting these are Python method docstrings, not MCP tool definitions. The source code shows a facade class (SpotifyTools) wrapping feature managers, but the actual MCP tool registration (likely in src/main.py, not shown) is not visible.
MEDIUM: Expand search_with_filters parameter descriptions with examples and validation. Example for 'year': '{type: 'string', pattern: '^\d{4}$', description: 'Release year as 4-digit string (e.g., "2021"). Spotify does not support year ranges; provide a single year.'}' and for 'genre': 'Spotify genre name (case-insensitive). Common values: pop, rock, hip-hop, jazz, classical. Call search_tracks with the genre in the query string if unsure which are available.'
MEDIUM: Rename 'reorder_track' to 'reorder_playlist_tracks' to clarify that it operates on a range, not a single track. Update description to explicitly state: 'Moves one or more consecutive tracks within a playlist. Specify range_start (index of first track), range_length (how many to move, default 1), and insert_before (index where they land).'
MEDIUM: Verify the actual MCP tool registration in src/main.py (not shown). Ensure tools are explicitly registered via fastapi-mcp decorator or manager.add_tool(), not inferred from Python method signatures. If inferred, all per-tool scores cap at 50.
LOW: Add pagination guidance to tools that return lists. Example for get_playlists: 'By default, returns up to 50 playlists. Use the limit and offset parameters to paginate. The response includes total count; call repeatedly with offset += limit until offset >= total.'
LOW: Document whether tool calls are idempotent. Example: 'Creating a playlist with the same name twice results in two different playlists (non-idempotent). Agents should not retry create_playlist on network failures.' vs 'Getting a playlist by ID is idempotent, retrying safely returns the same result.'