Skip to main content
Glama
davehenke

rekordbox-mcp

search_history_sessions

Search DJ history sessions in rekordbox using filters like date, track count, and keywords to find specific performances.

Instructions

Search DJ history sessions with various filters.

Args: query: Search query for session names year: Filter by year (e.g., "2025") month: Filter by month (e.g., "08" for August) min_tracks: Minimum number of tracks in session limit: Maximum number of results

Returns: List of matching history sessions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
yearNo
monthNo
min_tracksNo
limitNo

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the search_history_sessions tool. It connects to the database if needed, retrieves all history sessions, applies filtering logic for query, year, month, and minimum track count, sorts by date descending, and returns the top limited results as dictionaries.
    @mcp.tool()
    async def search_history_sessions(
        query: str = "",
        year: Optional[str] = None,
        month: Optional[str] = None,
        min_tracks: Optional[int] = None,
        limit: int = 50
    ) -> List[Dict[str, Any]]:
        """
        Search DJ history sessions with various filters.
        
        Args:
            query: Search query for session names
            year: Filter by year (e.g., "2025")
            month: Filter by month (e.g., "08" for August)
            min_tracks: Minimum number of tracks in session
            limit: Maximum number of results
            
        Returns:
            List of matching history sessions
        """
        await ensure_database_connected()
        
        sessions = await db.get_history_sessions(include_folders=False)
        
        # Apply filters
        filtered_sessions = []
        for session in sessions:
            # Text search
            if query and query.lower() not in session.name.lower():
                continue
                
            # Date filters
            if session.date_created:
                if year and not session.date_created.startswith(year):
                    continue
                if month and year:
                    month_str = f"{year}-{month.zfill(2)}"
                    if not session.date_created.startswith(month_str):
                        continue
            elif year or month:
                # Skip if date filters specified but no date available
                continue
                
            # Track count filter
            if min_tracks and session.track_count < min_tracks:
                continue
                
            filtered_sessions.append(session)
        
        # Sort by date, most recent first
        filtered_sessions.sort(key=lambda x: x.date_created or "", reverse=True)
        return [session.model_dump() for session in filtered_sessions[:limit]]

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