Skip to main content
Glama

get_tracks_by_key

Retrieve tracks filtered by a specific musical key from the rekordbox DJ database. Input the key (e.g., "5A", "12B") to receive a list of matching tracks for DJing or music organization.

Instructions

Get all tracks in a specific musical key.

Args: key: Musical key (e.g., "5A", "12B")

Returns: List of tracks in the specified key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes

Implementation Reference

  • The handler function for the get_tracks_by_key tool. It is registered via the @mcp.tool() decorator. The function checks if the database is initialized, creates a SearchOptions object with the provided key and a limit of 1000, searches the database for matching tracks, and returns them as a list of dictionaries.
    @mcp.tool() async def get_tracks_by_key(key: str) -> List[Dict[str, Any]]: """ Get all tracks in a specific musical key. Args: key: Musical key (e.g., "5A", "12B") Returns: List of tracks in the specified key """ if not db: raise RuntimeError("Database not initialized.") search_options = SearchOptions(key=key, limit=1000) tracks = await db.search_tracks(search_options) return [track.model_dump() for track in tracks]
  • The @mcp.tool() decorator registers the get_tracks_by_key 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