Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

get_artist

Retrieve detailed artist information including biography from TIDAL music streaming service by providing the artist ID.

Instructions

Get detailed information about an artist including biography.

Args: artist_id: ID of the artist

Returns: Artist details including name, URL, and biography

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
artist_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bioNoArtist biography text
artistYesArtist basic information
statusYesOperation status (success/error)

Implementation Reference

  • The handler function for the 'get_artist' tool. It authenticates if needed, fetches the artist object using tidalapi, attempts to retrieve the biography, constructs an ArtistDetails object, and returns it. Registered via @mcp.tool() decorator.
    @mcp.tool()
    async def get_artist(artist_id: str) -> ArtistDetails:
        """
        Get detailed information about an artist including biography.
    
        Args:
            artist_id: ID of the artist
    
        Returns:
            Artist details including name, URL, and biography
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        try:
            artist = await anyio.to_thread.run_sync(session.artist, artist_id)
            if not artist:
                raise ToolError(f"Artist with ID '{artist_id}' not found")
    
            # Try to get biography
            bio = None
            try:
                bio = await anyio.to_thread.run_sync(artist.get_bio)
            except Exception:
                pass  # Bio may not be available for all artists
    
            return ArtistDetails(
                status="success",
                artist=Artist(
                    id=str(artist.id),
                    name=artist.name,
                    url=f"https://tidal.com/browse/artist/{artist.id}",
                ),
                bio=bio,
            )
        except ToolError:
            raise
        except Exception as e:
            raise ToolError(f"Failed to get artist: {str(e)}")
  • Pydantic model defining the output schema for the get_artist tool response, including status, nested Artist object, and optional biography.
    class ArtistDetails(BaseModel):
        """Detailed artist information including biography."""
    
        status: str = Field(description="Operation status (success/error)")
        artist: Artist = Field(description="Artist basic information")
        bio: Optional[str] = Field(None, description="Artist biography text")
  • Pydantic model for the Artist entity used within ArtistDetails schema.
    class Artist(BaseModel):
        """Structured representation of a TIDAL artist."""
    
        id: str = Field(description="Unique TIDAL artist ID")
        name: str = Field(description="Artist name")
        url: str = Field(description="TIDAL web URL for the artist")
  • Initialization of the FastMCP server instance where all @mcp.tool() decorated functions are automatically registered as MCP tools.
    mcp = FastMCP(
        name=SERVER_NAME,
        instructions=SERVER_INSTRUCTIONS,
    )
  • Shared helper function used by get_artist (and all tools) to ensure authentication before API calls.
    async def ensure_authenticated() -> bool:
        """
        Check if user is authenticated with TIDAL.
        Automatically loads persisted session if available.
        """
        if await anyio.Path(SESSION_FILE).exists():
            try:
                async with await anyio.open_file(SESSION_FILE, "r") as f:
                    content = await f.read()
                    data = json.loads(content)
    
                # Load OAuth session
                result = await anyio.to_thread.run_sync(
                    session.load_oauth_session,
                    data["token_type"]["data"],
                    data["access_token"]["data"],
                    data["refresh_token"]["data"],
                    None,  # expiry time
                )
    
                if result:
                    is_valid = await anyio.to_thread.run_sync(session.check_login)
                    if not is_valid:
                        await anyio.Path(SESSION_FILE).unlink()
                    return is_valid
                return False
            except Exception:
                await anyio.Path(SESSION_FILE).unlink()
                return False
    
        return await anyio.to_thread.run_sync(session.check_login)
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 states the tool retrieves information (implying read-only) and lists return fields, but lacks details on error handling (e.g., invalid artist_id), rate limits, authentication needs, or data freshness. For a tool with no annotation coverage, this leaves significant behavioral gaps.

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, starting with the core purpose. The 'Args' and 'Returns' sections are structured but slightly verbose for a single parameter; it could be more concise by integrating parameter details into the main sentence. Overall, it's efficient with minimal waste.

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 low complexity (one parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and multiple sibling tools, it lacks context on usage scenarios and behavioral traits, leaving room for improvement in guiding the agent effectively.

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 'artist_id' by specifying it's the 'ID of the artist', which clarifies its purpose beyond the schema's type declaration. With 0% schema description coverage and only one parameter, this adequately compensates, though it could benefit from format examples (e.g., numeric vs. string ID).

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 with a specific verb ('Get') and resource ('detailed information about an artist including biography'). It distinguishes from siblings like 'search_artists' by focusing on retrieving details for a specific artist rather than searching. However, it doesn't explicitly contrast with 'get_artist_albums' or 'get_artist_top_tracks', which are more specific sibling tools.

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 doesn't mention when to choose 'get_artist' over 'search_artists' (for known IDs vs. search queries) or 'get_artist_albums' (for albums vs. general details). There are no prerequisites, exclusions, or context for usage beyond the basic parameter requirement.

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