Skip to main content
Glama
fborello

MCP Spotify Server

by fborello

spotify_next

Skip to the next track in your Spotify playback queue. Use this tool to advance music playback and control your listening experience.

Instructions

Pula para a próxima música

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idNoID do dispositivo (opcional)

Implementation Reference

  • Executes the spotify_next tool by skipping to the next track using the Spotify API's skipToNext method, handling optional device_id and returning success/error messages.
    async next(deviceId?: string) {
      try {
        await this.spotifyAuth.ensureValidToken();
        const spotifyApi = this.spotifyAuth.getSpotifyApi();
    
        const options = deviceId ? { device_id: deviceId } : {};
        await spotifyApi.skipToNext(options);
    
        return {
          content: [
            {
              type: 'text',
              text: '⏭️ Pulou para a próxima música',
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `❌ Erro ao pular música: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
        };
      }
    }
  • Defines the input schema and metadata for the spotify_next tool in the list of available tools.
    {
      name: 'spotify_next',
      description: 'Pula para a próxima música',
      inputSchema: {
        type: 'object',
        properties: {
          device_id: {
            type: 'string',
            description: 'ID do dispositivo (opcional)',
          },
        },
      },
    },
  • src/index.ts:280-281 (registration)
    Registers and dispatches the spotify_next tool call to the SpotifyTools.next() method.
    case 'spotify_next':
      return await spotifyTools.next(args.device_id);
Behavior2/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 states the action ('skip to the next song') but does not mention side effects (e.g., if it advances playback queue, requires active playback, or affects shuffle/repeat modes), permissions needed, or error conditions. This leaves significant gaps in understanding the tool's behavior beyond the basic action.

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

Conciseness5/5

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

The description is a single, direct sentence in Portuguese that efficiently conveys the core action without any fluff or unnecessary details. It is front-loaded and appropriately sized for a simple tool, with every word earning its place.

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

Completeness2/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 (a playback control action with one optional parameter) and lack of annotations or output schema, the description is incomplete. It does not address behavioral aspects like side effects, error handling, or interaction with sibling tools, leaving the agent with insufficient context for reliable use.

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?

The input schema has 100% description coverage, with the single parameter 'device_id' documented as optional and for device identification. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for adequate coverage without extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Pula para a próxima música' (Portuguese for 'Skip to the next song') clearly states the tool's action (skip) and resource (next song), making the purpose immediately understandable. It does not explicitly differentiate from sibling tools like 'spotify_previous' or 'spotify_pause', but the verb 'skip' implies forward navigation in playback.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as 'spotify_previous', 'spotify_pause', or 'spotify_resume'. It lacks context about prerequisites (e.g., whether playback must be active) or exclusions, leaving usage decisions to inference from the tool name alone.

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/fborello/MCPSpotify'

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