Skip to main content
Glama
types.ts2.66 kB
// Spotify API Response Types export interface SpotifyImage { url: string; height: number | null; width: number | null; } export interface SpotifyArtist { id: string; name: string; uri: string; href: string; external_urls: { spotify: string; }; } export interface SpotifyAlbum { id: string; name: string; album_type: string; artists: SpotifyArtist[]; images: SpotifyImage[]; release_date: string; total_tracks: number; uri: string; href: string; external_urls: { spotify: string; }; } export interface SpotifyTrack { id: string; name: string; artists: SpotifyArtist[]; album: SpotifyAlbum; duration_ms: number; explicit: boolean; popularity: number; track_number: number; uri: string; href: string; external_urls: { spotify: string; }; } export interface SearchResponse { tracks?: { items: SpotifyTrack[]; total: number; limit: number; offset: number; }; artists?: { items: SpotifyArtist[]; total: number; limit: number; offset: number; }; albums?: { items: SpotifyAlbum[]; total: number; limit: number; offset: number; }; } export interface PlaybackDevice { id: string; is_active: boolean; is_private_session: boolean; is_restricted: boolean; name: string; type: string; volume_percent: number | null; } export interface PlaybackState { device: PlaybackDevice; shuffle_state: boolean; repeat_state: "off" | "track" | "context"; timestamp: number; progress_ms: number | null; is_playing: boolean; item: SpotifyTrack | null; currently_playing_type: "track" | "episode" | "ad" | "unknown"; actions: { disallows: Record<string, boolean>; }; } export interface Playlist { id: string; name: string; description: string | null; public: boolean; collaborative: boolean; images: SpotifyImage[]; owner: { id: string; display_name: string; }; tracks: { total: number; href: string; }; uri: string; href: string; external_urls: { spotify: string; }; } export interface UserPlaylistsResponse { items: Playlist[]; total: number; limit: number; offset: number; } // Token Management Types export interface TokenData { access_token: string; token_type: string; expires_in: number; refresh_token?: string; scope: string; expires_at: number; // Timestamp when token expires } export interface TokenStorage { token_data?: TokenData; } // Auth Flow Types export interface PKCEPair { verifier: string; challenge: string; } export interface AuthCallbackParams { code?: string; error?: string; state?: string; }

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/nicklaustrup/mcp-spotify'

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