Skip to main content
Glama
davehenke

rekordbox-mcp

search_tracks_by_filename

Find tracks in your rekordbox DJ database by searching for specific filenames or partial filename matches to locate music files quickly.

Instructions

Search for tracks by filename.

Args: filename: Filename to search for (partial match)

Returns: List of tracks matching the filename

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler decorated with @mcp.tool(), serving as both handler and registration. Validates DB connection and delegates to database helper, serializing Track models to dicts.
    @mcp.tool()
    async def search_tracks_by_filename(filename: str) -> List[Dict[str, Any]]:
        """
        Search for tracks by filename.
        
        Args:
            filename: Filename to search for (partial match)
            
        Returns:
            List of tracks matching the filename
        """
        if not db:
            raise RuntimeError("Database not initialized.")
        
        tracks = await db.search_tracks_by_filename(filename)
        return [track.model_dump() for track in tracks]
  • Database class method implementing filename search logic: filters active content, performs case-insensitive substring match on Location field, converts to Track models.
    async def search_tracks_by_filename(self, filename: str) -> List[Track]:
        """Search tracks by filename."""
        if not self.db:
            raise RuntimeError("Database not connected")
        
        all_content = list(self.db.get_content())
        active_content = [c for c in all_content if getattr(c, 'rb_local_deleted', 0) == 0]
        filename_lower = filename.lower()
        
        matching_tracks = []
        for content in active_content:
            file_path = content.Location or ""
            if filename_lower in file_path.lower():
                matching_tracks.append(self._content_to_track(content))
        
        return matching_tracks
Behavior2/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 mentions that the search uses partial matching, which is useful context beyond basic functionality. However, it lacks details on permissions, rate limits, pagination, or error handling, leaving gaps for a search operation.

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 front-loaded with the core purpose, followed by structured sections for args and returns. It avoids unnecessary words, but the 'Args' and 'Returns' labels could be more integrated into the flow. 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.

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 (one parameter) and the presence of an output schema (which handles return values), the description is reasonably complete. It covers the purpose, parameter semantics, and return type. However, it could benefit from more behavioral context, such as search scope or limitations.

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 schema description coverage is 0%, so the description must compensate. It adds meaning by explaining that 'filename' is for partial matching, which clarifies the parameter's behavior beyond the schema's basic type definition. Since there's only one parameter, this is sufficient to elevate the score above baseline.

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 as 'Search for tracks by filename' with a specific verb ('search') and resource ('tracks'), and it distinguishes from generic 'search_tracks' by specifying the search criterion. However, it doesn't explicitly differentiate from other filename-related tools like 'get_track_file_path' beyond the search action.

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?

No guidance is provided on when to use this tool versus alternatives like 'search_tracks' (which likely searches by other criteria) or 'get_track_file_path' (which retrieves a specific file path). The description only states what it does, not when it's appropriate compared to sibling tools.

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/davehenke/rekordbox-mcp'

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