get_artist_details
Retrieve comprehensive artist information including aliases, genres, tags, and discography from the MusicBrainz database using the artist's MBID.
Instructions
Get comprehensive info about an artist including aliases, tags, genres, and their discography (Release Groups) with MBIDs. Shows first 10 release groups; use get_artist_discography for the full paged list.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| artist_id | Yes |
Implementation Reference
- mcp_musicbrainz/server.py:333-381 (handler)The 'get_artist_details' function is a tool decorated with @mcp.tool() and @cached_tool(). It fetches artist details from MusicBrainz, including aliases, tags, and a list of release groups, returning a formatted string.
@mcp.tool() @cached_tool() def get_artist_details(artist_id: str) -> str: """ Get comprehensive info about an artist including aliases, tags, genres, and their discography (Release Groups) with MBIDs. Shows first 10 release groups; use get_artist_discography for the full paged list. """ res = musicbrainzngs.get_artist_by_id( artist_id, includes=[ "aliases", "tags", "ratings", "release-groups", "url-rels", ], ) a = res["artist"] tags = [t["name"] for t in a.get("tag-list", [])] genres = ", ".join(tags) if tags else "" aliases = ", ".join(al["alias"] for al in a.get("alias-list", [])[:10]) urls = "\n".join( f" - {r['type']}: {r['target']}" for r in a.get("url-relation-list", []) ) rg_list = sorted( a.get("release-group-list", []), key=lambda rg: rg.get("first-release-date", "9999"), ) albums = [] for rg in rg_list: rtype = rg.get("type", "Unknown") date = rg.get("first-release-date", "????") albums.append( f" - {rg['title']} ({date}) [{rtype}] | release-group ID: {rg['id']}" ) lifespan = a.get("life-span", {}) begin = lifespan.get("begin", "?") end = lifespan.get("end", "present") rating = a.get("rating", {}) rating_str = ( f"{rating['rating']}/5 ({rating.get('votes-count', 0)} votes)" if rating.get("rating") else "N/A" ) parts = [