Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

get_album_tracks

Retrieve all tracks and album metadata from a TIDAL album using its ID to access complete track listings.

Instructions

Get all tracks from a specific album.

Args: album_id: ID of the album

Returns: List of tracks in the album with album metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
album_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of tracks returned
artistYesAlbum artist name
statusYesOperation status (success/error)
tracksYesList of track objects
album_idYesID of the album
album_titleYesTitle of the album

Implementation Reference

  • The main async handler function for the 'get_album_tracks' tool. It authenticates if needed, fetches the album using tidalapi.session.album(album_id), retrieves its tracks, maps them to Track models, and returns an AlbumTracks response.
    @mcp.tool()
    async def get_album_tracks(album_id: str) -> AlbumTracks:
        """
        Get all tracks from a specific album.
    
        Args:
            album_id: ID of the album
    
        Returns:
            List of tracks in the album with album metadata
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        try:
            album = await anyio.to_thread.run_sync(session.album, album_id)
            if not album:
                raise ToolError(f"Album with ID '{album_id}' not found")
    
            album_tracks = await anyio.to_thread.run_sync(album.tracks)
    
            tracks = []
            for track in album_tracks:
                tracks.append(
                    Track(
                        id=str(track.id),
                        title=track.name,
                        artist=track.artist.name if track.artist else "Unknown Artist",
                        album=album.name,
                        duration_seconds=track.duration,
                        url=f"https://tidal.com/browse/track/{track.id}",
                    )
                )
    
            return AlbumTracks(
                status="success",
                album_title=album.name,
                album_id=album_id,
                artist=album.artist.name if album.artist else "Unknown Artist",
                count=len(tracks),
                tracks=tracks,
            )
        except ToolError:
            raise
        except Exception as e:
            raise ToolError(f"Failed to get album tracks: {str(e)}")
  • Pydantic BaseModel defining the structured output schema for the get_album_tracks tool response, including album metadata and list of Track objects.
    class AlbumTracks(BaseModel):
        """Tracks from a specific album."""
    
        status: str = Field(description="Operation status (success/error)")
        album_title: str = Field(description="Title of the album")
        album_id: str = Field(description="ID of the album")
        artist: str = Field(description="Album artist name")
        count: int = Field(description="Number of tracks returned")
        tracks: List[Track] = Field(description="List of track objects")
  • The tool is listed in the SERVER_INSTRUCTIONS string, which provides documentation and context for the MCP server's capabilities, including this tool.
    - get_album_tracks: Get all tracks from an album
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 of behavioral disclosure. It mentions that the tool returns a list of tracks with album metadata, which adds some context about output. However, it does not cover important behavioral aspects such as whether this is a read-only operation, potential rate limits, authentication requirements, error handling, or pagination for large albums. The description is minimal and lacks depth for a tool with no annotation support.

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 main purpose stated first in a clear sentence. The additional 'Args' and 'Returns' sections are structured but slightly verbose for such a simple tool; they could be integrated more seamlessly. Overall, it is efficient with minimal waste, though not perfectly concise.

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 low complexity (1 parameter) and the presence of an output schema (which handles return value documentation), the description is reasonably complete. It covers the basic purpose, parameter semantics, and return content. However, it lacks behavioral context (e.g., read-only nature, error cases) and usage guidelines, which are minor gaps in an otherwise adequate description for a simple retrieval 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 'album_id' is the 'ID of the album', which clarifies the parameter's purpose. With schema description coverage at 0% (the schema has no descriptions for properties), this compensation is valuable. However, it does not provide details on the format or constraints of the album_id (e.g., whether it's a numeric or string ID, examples, or validation rules), leaving some gaps.

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: 'Get all tracks from a specific album.' It specifies the verb ('Get') and resource ('tracks from a specific album'), making it easy to understand what the tool does. However, it does not explicitly distinguish this tool from sibling tools like 'get_playlist_tracks' or 'get_album', which might retrieve different data, so it lacks full sibling differentiation.

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. It does not mention sibling tools like 'get_album' (which might return album metadata without tracks) or 'get_playlist_tracks' (for playlist-specific tracks), nor does it specify prerequisites or exclusions. Usage is implied only by the purpose statement, with no explicit 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