Skip to main content
Glama

previous_track

Return to the previous song in your Spotify playback queue. Use this tool to navigate back through your listening history and replay tracks.

Instructions

Go back to previous track

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:50-53 (handler)
    MCP tool handler for 'previous_track', decorated with @mcp.tool() for automatic registration and FastMCP integration. Delegates execution to SpotifyClient.previous_track() method.
    @mcp.tool()
    async def previous_track() -> str:
        """Go back to previous track"""
        return await client.previous_track()
  • Implementation of previous_track in SpotifyClient class, which invokes the spotipy library's previous_track method to control Spotify playback.
    async def previous_track(self) -> str:
        """
        Skip to the previous track.
        """
        try:
            self.sp.previous_track()
            return "Skipped to previous track"
        except Exception as e:
            return f"Error skipping track: {str(e)}"
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Go back to previous track' implies a mutation (changing playback), but it doesn't specify if this requires specific permissions, what happens if no previous track exists, or if it affects queue/playlist state. This leaves significant gaps for a mutation tool.

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, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately clear without unnecessary elaboration.

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 this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain behavioral aspects like error conditions (e.g., no previous track), side effects, or return values, 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.

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter details, and it correctly implies no parameters are required, earning a baseline score above minimum viable.

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 'Go back to previous track' clearly states the action (go back) and target resource (previous track), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'next_track' or 'skip_tracks' beyond the directional implication, which prevents a perfect score.

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 'next_track' or 'skip_tracks', nor does it mention prerequisites such as requiring active playback. It simply states what the tool does without context for application.

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