Skip to main content
Glama
zas

MusicBrainz MCP Server

by zas

search_entities_fuzzy

Find music entities with typo-tolerant search. Handles misspellings by trying exact matches first, then fuzzy matching for artists, releases, recordings, labels, and works in the MusicBrainz database.

Instructions

Typo-tolerant fuzzy search. Tries an exact search first, then falls back to fuzzy matching if no results are found. Supports 'artist', 'release', 'recording', 'label', and 'work'. Use when the query may contain misspellings (e.g., 'Bjork' -> 'Björk').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_typeYes
queryYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `search_entities_fuzzy` tool implementation, which wraps `search_entities` with fuzzy query formatting.
    @mcp.tool()
    @cached_tool()
    def search_entities_fuzzy(entity_type: str, query: str, limit: int = 5) -> str:
        """
        Typo-tolerant fuzzy search. Tries an exact search first, then falls back to
        fuzzy matching if no results are found.
        Supports 'artist', 'release', 'recording', 'label', and 'work'.
        Use when the query may contain misspellings (e.g., 'Bjork' -> 'Björk').
        """
        # Try exact search first
        exact = search_entities(entity_type=entity_type, query=query, limit=limit)
        if not exact.startswith("Found 0"):
            return exact
    
        # Fall back to fuzzy matching
        fuzzy_query = " ".join([f"{word}~" for word in query.split()])
        return search_entities(entity_type=entity_type, query=fuzzy_query, limit=limit)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the search behavior (exact first, then fuzzy fallback) and lists supported entity types, which adds useful context. However, it lacks details on permissions, rate limits, or response format, leaving gaps for a tool with mutation-like search operations.

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 front-loaded with the core purpose, followed by behavioral details and usage guidelines in three concise sentences. Each sentence adds value without redundancy, making it efficiently structured and easy to parse.

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 moderate complexity (3 parameters, no annotations, but with an output schema), the description is fairly complete. It covers purpose, behavior, and usage well, but lacks details on parameters like 'limit' and behavioral aspects like error handling. The output schema mitigates some gaps, but not fully.

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?

Schema description coverage is 0%, so the schema provides no parameter details. The description mentions 'artist', 'release', 'recording', 'label', and 'work' as supported entity types, which clarifies the 'entity_type' parameter, and implies 'query' is for search terms. However, it doesn't explain 'limit' or provide full semantics for all parameters, resulting in partial compensation.

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 tool performs 'typo-tolerant fuzzy search' with a specific fallback mechanism (exact search first, then fuzzy matching). It distinguishes itself from sibling tools like 'search_entities' by emphasizing its tolerance for misspellings, making the purpose specific and differentiated.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: 'Use when the query may contain misspellings (e.g., 'Bjork' -> 'Björk').' It also lists the supported entity types, providing clear context for its application without needing to specify exclusions or alternatives, as the misspelling focus inherently guides usage.

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