Skip to main content
Glama

save_playlist

Add user-created Spotify playlists to your library for offline access, follow collaborative playlists, and organize personal collections.

Instructions

Save a user-created playlist to your Spotify library (follow playlist).

🎯 USE CASES: • Add user-created playlists to your library for offline access • Follow collaborative playlists from friends • Organize personal playlists into collections • Follow community-created playlists

📝 WHAT IT RETURNS: • Confirmation of successful playlist save/follow • Updated library status • Playlist URL for easy sharing and access • Error details for any failed saves

🔍 EXAMPLES: • "Save this collaborative playlist my friend created" • "Follow this user-generated workout playlist" • "Add this personal playlist to my library"

💡 SAVE FEATURES: • Works with user-created playlists • Maintains playlist order and structure • Perfect for following collaborative playlists • Enables offline access to followed playlists

🚫 LIMITATIONS (as of November 27, 2024): • Cannot save Spotify's official/editorial playlists • Cannot follow algorithmic playlists (Discover Weekly, etc.) • Only works with playlists created by users • Spotify-owned playlists are restricted

🔧 TROUBLESHOOTING: • If you get 404 error: The playlist might be Spotify-owned • Try with user-created playlists instead • Check if playlist is public and accessible

⚠️ REQUIREMENTS: • Valid Spotify access token with playlist-modify-public scope • Playlist must be user-created (not Spotify-owned) • Playlist must be public or accessible to your account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesSpotify access token for authentication
playlistIdYesSpotify playlist ID or URI

Implementation Reference

  • Handler function that executes the core logic of the 'save_playlist' MCP tool by extracting arguments and delegating to SpotifyService.savePlaylist.
    handler: async (args: any, spotifyService: SpotifyService) => {
      const { token, playlistId } = args;
      return await spotifyService.savePlaylist(token, playlistId);
    },
  • Zod-based input schema validation for the 'save_playlist' tool, requiring Spotify access token and playlist ID.
    schema: createSchema({
      token: commonSchemas.token(),
      playlistId: commonSchemas.spotifyId("playlist"),
    }),
  • Supporting utility in SpotifyService that implements the playlist save operation via Spotify API call to follow the playlist.
    async savePlaylist(token: string, playlistId: string): Promise<void> {
      const id = this.extractId(playlistId);
      return await this.makeRequest<void>(
        `playlists/${id}/followers`,
        token,
        {},
        "PUT"
      );
    }
  • Registration of the playlistTools (containing 'save_playlist') into the central allTools registry used by ToolRegistrar for MCP server.
    export const allTools: ToolsRegistry = {
      ...albumTools,
    
      ...artistTools,
    
      ...trackTools,
    
      ...playlistTools,
    
      ...playbackTools,
    
      ...userTools,
    
      ...searchTools,
    };
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: it's a write operation (implied by 'save'), requires specific authentication ('Valid Spotify access token with playlist-modify-public scope'), has limitations on playlist types, and mentions error handling ('Error details for any failed saves'). It doesn't cover rate limits or idempotency, but provides substantial context beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (use cases, returns, examples, etc.), but is overly verbose with repetitive information. Sections like 'SAVE FEATURES' and 'TROUBLESHOOTING' contain content already covered elsewhere. While organized, it could be more concise by eliminating redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (write operation with authentication requirements), no annotations, and no output schema, the description provides comprehensive context. It covers purpose, usage, limitations, requirements, and troubleshooting. The main gap is the lack of explicit output details beyond high-level descriptions, but overall it's quite complete for agent understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, providing clear documentation for both parameters (token for authentication, playlistId for identification). The description adds minimal parameter-specific semantics beyond the schema, mainly reinforcing that 'playlist must be user-created' relates to playlistId validation. This meets the baseline expectation when schema coverage is complete.

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 clearly states the tool's purpose with specific verbs ('save', 'follow') and resource ('user-created playlist to your Spotify library'). It distinguishes from siblings like 'create_playlist' (makes new) and 'unsave_playlist' (removes), and explicitly differentiates from 'save_tracks' (individual tracks vs. entire playlists).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool (e.g., 'Add user-created playlists to your library for offline access', 'Follow collaborative playlists') and when not to use it (e.g., 'Cannot save Spotify's official/editorial playlists', 'Only works with playlists created by users'). It also implicitly suggests alternatives like using 'save_tracks' for individual tracks or 'get_playlist' for read-only access.

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

Install Server

Other Tools

Latest Blog Posts

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/latiftplgu/Spotify-OAuth-MCP-server'

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