Skip to main content
Glama
davehenke

rekordbox-mcp

get_most_played_tracks

Retrieve your most frequently played tracks from the rekordbox DJ database to analyze performance trends and identify popular selections.

Instructions

Get the most played tracks in the library.

Args: limit: Maximum number of tracks to return

Returns: List of most played tracks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler decorated with @mcp.tool(). Ensures database connection, calls the database helper method, serializes Track models to dicts, and returns the list of most played tracks.
    @mcp.tool()
    async def get_most_played_tracks(limit: int = 20) -> List[Dict[str, Any]]:
        """
        Get the most played tracks in the library.
        
        Args:
            limit: Maximum number of tracks to return
            
        Returns:
            List of most played tracks
        """
        if not db:
            raise RuntimeError("Database not initialized.")
        
        tracks = await db.get_most_played_tracks(limit)
        return [track.model_dump() for track in tracks]
  • Database class method that fetches all active content from pyrekordbox database, sorts by DJPlayCount descending, converts top limit contents to Track models using _content_to_track, and returns the list.
    async def get_most_played_tracks(self, limit: int = 20) -> List[Track]:
        """Get the most played tracks."""
        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]
        # Sort by play count descending
        sorted_content = sorted(active_content, key=lambda x: getattr(x, 'DJPlayCount', 0) or 0, reverse=True)
        
        return [self._content_to_track(content) for content in sorted_content[:limit]]
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool retrieves data ('Get'), implying it's a read operation, but doesn't disclose behavioral traits such as whether it requires authentication, how it handles empty libraries, if it's cached or real-time, or potential rate limits. The description adds minimal context beyond the basic action.

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 appropriately sized and front-loaded with the core purpose in the first sentence. The 'Args' and 'Returns' sections are structured clearly, with no wasted words. However, the lack of usage guidelines or additional context slightly reduces efficiency, but it remains concise overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 somewhat complete. It covers the basic purpose and parameter semantics adequately. However, without annotations and with minimal behavioral transparency, it leaves gaps in understanding how the tool behaves in practice, making it just viable.

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?

The description adds meaning for the 'limit' parameter by explaining it's the 'Maximum number of tracks to return,' which clarifies its purpose beyond the schema's basic type and default. However, schema description coverage is 0%, and the description doesn't cover other potential implicit parameters (e.g., sorting order or time range), so it partially compensates but not fully.

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: 'Get the most played tracks in the library.' It specifies the verb ('Get') and resource ('most played tracks'), distinguishing it from siblings like 'get_top_rated_tracks' or 'get_unplayed_tracks' by focusing on play count. However, it doesn't explicitly differentiate from all siblings (e.g., 'get_history_stats' might overlap), so it's not a perfect 5.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether a library must be loaded), exclusions, or comparisons to siblings like 'get_history_stats' or 'get_library_stats', which might offer similar data. This leaves the agent to infer usage from the purpose alone.

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