Skip to main content
Glama

add_to_queue

Add a Spotify track to your playback queue using its track ID to control music flow during listening sessions.

Instructions

Add a track to the queue
Args:
    track_id: Spotify track ID to add

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_idYes

Implementation Reference

  • Core handler function in SpotifyClient that adds a track to the Spotify playback queue by calling the Spotify API.
    async def add_to_queue(self, track_id: str) -> str:
        """
        Add a track to the user's queue.
        - track_id: Spotify track ID to add
        """
        try:
            self.sp.add_to_queue(uri=f"spotify:track:{track_id}")
            return "Track added to queue successfully"
        except Exception as e:
            return f"Error adding track to queue: {str(e)}"
  • main.py:129-136 (registration)
    MCP tool registration using @mcp.tool() decorator. This thin wrapper delegates to the SpotifyClient handler and defines the tool schema via signature and docstring.
    @mcp.tool()
    async def add_to_queue(track_id: str) -> str:
        """
        Add a track to the queue
        Args:
            track_id: Spotify track ID to add
        """
        return await client.add_to_queue(track_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 but lacks critical details: it doesn't specify if this requires authentication, affects playback state, has rate limits, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is insufficient.

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

Conciseness4/5

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

The description is brief and front-loaded with the main action, followed by a simple parameter list. It avoids unnecessary words, though the 'Args:' section could be integrated more smoothly. Overall, it's efficient but could be slightly more polished.

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 complexity (a mutation with no annotations or output schema) and low schema coverage, the description is incomplete. It misses behavioral details like side effects, error handling, and usage context, making it inadequate for safe and effective tool invocation.

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 schema description coverage is 0%, so the description must compensate. It adds minimal semantics by naming the parameter ('track_id') and indicating it's a 'Spotify track ID', but doesn't explain format, validation, or examples. This provides basic context but falls short of fully documenting the single parameter.

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 clearly states the action ('Add a track') and target ('to the queue'), which is specific and distinguishes it from siblings like 'add_to_playlist' or 'reorder_queue'. However, it doesn't explicitly differentiate from all siblings, such as 'start_playback_track', which might also involve adding tracks in some contexts.

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 like 'start_playback_track' or 'reorder_queue', nor does it mention prerequisites such as needing active playback. It only states the basic action without context.

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

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