Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

remove_track_from_favorites

Remove a track from your TIDAL favorites list to unlike songs and manage your music preferences.

Instructions

Remove a track from user's favorites (unlike a track).

Args: track_id: ID of the track to remove from 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 removed from favorites
messageYesStatus message
item_typeYesType of item (track/album/artist)

Implementation Reference

  • Handler function that authenticates if needed and calls tidalapi's session.user.favorites.remove_track(track_id_int) to unlike the track, returning a structured RemoveFromFavoritesResult.
    @mcp.tool()
    async def remove_track_from_favorites(track_id: str) -> RemoveFromFavoritesResult:
        """
        Remove a track from user's favorites (unlike a track).
    
        Args:
            track_id: ID of the track to remove from 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.remove_track, track_id_int
            )
    
            return RemoveFromFavoritesResult(
                status="success",
                item_id=track_id,
                item_type="track",
                message=f"Track {track_id} removed from favorites",
            )
        except ValueError:
            raise ToolError(f"Invalid track ID format: {track_id}")
        except Exception as e:
            raise ToolError(f"Failed to remove track from favorites: {str(e)}")
  • Pydantic model defining the output schema for the remove_track_from_favorites tool, used as the return type annotation.
    class RemoveFromFavoritesResult(BaseModel):
        """Result of removing an item from favorites."""
    
        status: str = Field(description="Operation status (success/error)")
        item_id: str = Field(description="ID of the item removed from favorites")
        item_type: str = Field(description="Type of item (track/album/artist)")
        message: str = Field(description="Status message")
  • FastMCP decorator that automatically registers the remove_track_from_favorites function as an MCP tool.
    @mcp.tool()
Behavior2/5

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

No annotations are provided, so the description carries the full burden. While it states the action is to 'remove' and 'unlike', it does not disclose behavioral traits such as whether this requires authentication, if it's reversible, what happens if the track isn't in favorites, or any rate limits. For a mutation tool with zero annotation coverage, this is a significant gap.

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 appropriately sized and front-loaded with the core purpose in the first sentence. The Args and Returns sections are structured but slightly verbose; every sentence earns its place, though it could be more concise by integrating the parameter explanation into the main text.

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 complexity (simple mutation with one parameter), no annotations, and the presence of an output schema (which handles return values), the description is mostly complete. It covers the purpose and parameter semantics adequately, but lacks behavioral details like authentication needs or error handling, which are important 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 meaning beyond the input schema by explaining that 'track_id' is 'ID of the track to remove from favorites', which clarifies the parameter's purpose. With schema description coverage at 0% (no schema descriptions), this compensates well, though it doesn't specify the ID format or constraints.

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 specific action ('Remove a track from user's favorites') and the resource involved ('track'), distinguishing it from sibling tools like 'remove_album_from_favorites' and 'add_track_to_favorites'. The parenthetical 'unlike a track' adds helpful clarification of the operation's effect.

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

Usage Guidelines4/5

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

The description implies usage context (removing from favorites, unlike a track) but does not explicitly state when to use this tool versus alternatives like 'remove_tracks_from_playlist' or 'add_track_to_favorites'. It clearly indicates the tool's purpose but lacks explicit guidance on exclusions or prerequisites.

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