Skip to main content
Glama
zas

MusicBrainz MCP Server

by zas

get_work_details

Retrieve detailed information about musical works including composers, lyricists, and related metadata from the MusicBrainz database.

Instructions

Get details about a musical work (composers, lyricists, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
work_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for 'get_work_details' tool, which fetches musical work information from MusicBrainz API and formats it into a readable string.
    def get_work_details(work_id: str) -> str:
        """Get details about a musical work (composers, lyricists, etc.)."""
        res = musicbrainzngs.get_work_by_id(
            work_id,
            includes=["artist-rels", "tags", "ratings"],
        )
        w = res["work"]
        tags = [t["name"] for t in w.get("tag-list", [])]
        genres = ", ".join(tags) if tags else ""
    
        creators = []
        for rel in w.get("artist-relation-list", []):
            rtype = rel["type"]
            artist = rel["artist"]["name"]
            creators.append(f"  - {rtype.capitalize()}: {artist}")
    
        parts = [
            f"Title: {w['title']}",
            f"Type: {w.get('type', 'Unknown')}",
            f"Genres: {genres or 'None listed'}",
            f"MBID: {work_id}",
            "\nCreators:",
            *(creators or ["  - No creators listed"]),
        ]
        return "\n".join(parts)
  • The registration of the 'get_work_details' function as an MCP tool, also decorated with a caching mechanism.
    @mcp.tool()
    @cached_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 of behavioral disclosure. It only states what the tool does ('Get details'), without mentioning permissions, rate limits, error handling, or response format. For a read operation with no annotation coverage, this is insufficient to inform the agent about behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose with no wasted words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 simplicity (one parameter, output schema provided), the description is minimally adequate. However, it lacks context about when to use it versus siblings and doesn't address behavioral aspects like permissions or errors, which are important even with an output schema. It meets the baseline but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no information about the 'work_id' parameter beyond what the input schema provides (a required string). With 0% schema description coverage, the description does not compensate by explaining what a 'work_id' is, its format, or where to obtain it. However, since there is only one parameter and an output schema exists, the baseline is met.

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 details about a musical work' with specific examples of the types of details (composers, lyricists, etc.). It uses a specific verb ('Get') and resource ('musical work'), though it doesn't explicitly differentiate from sibling tools like 'get_artist_details' or 'get_release_details' beyond mentioning 'musical work'.

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 prerequisites, context, or compare it to sibling tools like 'get_artist_details' or 'search_entities', leaving the agent to infer usage based on the tool name alone.

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/zas/mcp-musicbrainz'

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