Skip to main content
Glama

search_tracks_by_filename

Locate tracks in the rekordbox DJ database by searching with a filename or partial filename. Returns a list of matching tracks for quick and precise results.

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

Implementation Reference

  • MCP tool handler for search_tracks_by_filename. This is the main execution function decorated with @mcp.tool(), which also serves as registration. It delegates to the database helper.
    @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 helper method that implements the core search logic by iterating over tracks and matching filename in the file path.
    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
  • The @mcp.tool() decorator registers this function as an MCP tool.
    @mcp.tool()

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