get_user_profile
Retrieve Spotify user profile details, including display name, account status, preferences, and demographics, to personalize music experiences, verify identity, and build recommendation systems.
Instructions
Retrieve comprehensive information about the current Spotify user's profile, preferences, and account details.
🎯 USE CASES: • Display user information in music applications and dashboards • Personalize music experiences based on user demographics • Verify user identity and account status for features • Build user profiles for music recommendation systems • Create personalized greetings and user interfaces
📝 WHAT IT RETURNS: • User display name, real name, and profile images • Country/market information for content availability • Follower count and public profile statistics • Account type (free, premium) and subscription status • External URLs and social media links • User preferences and privacy settings
🔍 EXAMPLES: • "Show me my Spotify profile information" • "Get my account details and subscription status" • "What's my display name and profile picture?" • "Check my country setting and follower count"
👤 PROFILE INSIGHTS: • Essential for personalizing user experiences • Helps tailor content and recommendations • Useful for subscription-based feature access • Perfect for building user identity systems • Great for social features and sharing
💡 PERSONALIZATION OPPORTUNITIES: • Customize interfaces based on user preferences • Adjust content recommendations by market/country • Display appropriate subscription features • Build social connections using profile information • Create personalized music discovery experiences
🔒 PRIVACY CONSIDERATIONS: • Respects user privacy settings and preferences • Shows only publicly available information • Account for different privacy levels across users • Some information may be limited based on settings
⚠️ REQUIREMENTS: • Valid Spotify access token with user-read-private scope • User must have an active Spotify account
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Spotify access token for authentication |
Implementation Reference
- src/mcp/tools/user.ts:57-60 (handler)MCP tool handler for 'get_user_profile' that extracts the token from args and delegates to SpotifyService.getUserProfile.handler: async (args: any, spotifyService: SpotifyService) => { const { token } = args; return await spotifyService.getUserProfile(token); },
- src/mcp/tools/user.ts:54-56 (schema)Input schema for the 'get_user_profile' tool, defining the required 'token' parameter using common token schema.schema: createSchema({ token: commonSchemas.token(), }),
- src/mcp/tools/index.ts:32-35 (registration)Registration of userTools (containing 'get_user_profile') into the central allTools registry used by ToolRegistrar....userTools, ...searchTools,
- src/spotify.ts:281-283 (helper)Helper method in SpotifyService that performs the actual API call to fetch the user's profile from Spotify's /me endpoint.async getUserProfile(token: string): Promise<SpotifyUser> { return await this.makeRequest<SpotifyUser>("me", token); }
- src/spotify.ts:3-11 (schema)TypeScript interface defining the structure of the Spotify user profile data returned by the tool.export interface SpotifyUser { id: string; display_name: string; email?: string; followers: { total: number }; country?: string; product?: string; images?: SpotifyImage[]; }