Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

add_track_to_favorites

Save a track to your TIDAL favorites list. Use this tool to mark songs you enjoy for easy access and personalized recommendations.

Instructions

Add a track to user's favorites (like a track).

Args: track_id: ID of the track to add to favorites

Returns: Success status and confirmation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYesOperation status (success/error)
item_idYesID of the item added to favorites
messageYesStatus message
item_typeYesType of item (track/album/artist)

Implementation Reference

  • Handler function decorated with @mcp.tool() which registers and implements the tool. Calls TIDAL API to add track to user favorites.
    @mcp.tool()
    async def add_track_to_favorites(track_id: str) -> AddToFavoritesResult:
        """
        Add a track to user's favorites (like a track).
    
        Args:
            track_id: ID of the track to add to favorites
    
        Returns:
            Success status and confirmation
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        try:
            track_id_int = int(track_id)
            await anyio.to_thread.run_sync(
                session.user.favorites.add_track, track_id_int
            )
    
            return AddToFavoritesResult(
                status="success",
                item_id=track_id,
                item_type="track",
                message=f"Track {track_id} added to favorites",
            )
        except ValueError:
            raise ToolError(f"Invalid track ID format: {track_id}")
        except Exception as e:
            raise ToolError(f"Failed to add track to favorites: {str(e)}")
  • Pydantic model for the tool's output schema, defining the structure of the success response.
    class AddToFavoritesResult(BaseModel):
        """Result of adding an item to favorites."""
    
        status: str = Field(description="Operation status (success/error)")
        item_id: str = Field(description="ID of the item added to favorites")
        item_type: str = Field(description="Type of item (track/album/artist)")
        message: str = Field(description="Status message")
  • Tool mentioned in server instructions, part of the MCP server description for tool discovery.
    - add_track_to_favorites: Like a track
    - remove_track_from_favorites: Unlike a track
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 ('add to favorites') but lacks details on permissions required, whether it's idempotent, what happens if the track is already favorited, or any side effects. The mention of 'Success status and confirmation' in returns is minimal and doesn't compensate for the missing behavioral context.

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 well-structured and front-loaded with the core purpose, followed by Args and Returns sections. It's concise with no wasted words, though the 'like a track' parenthetical is slightly redundant. Overall, it's efficient and easy to parse.

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

Completeness3/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 write operation with one parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and incomplete behavioral details, it doesn't fully prepare the agent for safe and effective use, especially for a mutation tool.

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 description adds meaningful context for the single parameter: 'track_id: ID of the track to add to favorites.' Since schema description coverage is 0% (the schema only specifies type 'string'), this clarifies the parameter's purpose beyond the bare schema. However, it doesn't specify the ID format or source, leaving some ambiguity.

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 tool's purpose: 'Add a track to user's favorites (like a track).' It specifies the verb ('add') and resource ('track to user's favorites'), making the action unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'remove_track_from_favorites' beyond the obvious opposite action, which is why it's not a 5.

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. For example, it doesn't mention prerequisites (e.g., user must be logged in), when it's appropriate compared to 'add_tracks_to_playlist' or 'get_favorite_tracks', or any constraints like rate limits. This leaves the agent without context for selection.

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/keenanbb/tidal-mcp'

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