eq_ranking
Compare headphones using Harman preference scores to identify models that match listener preferences for sound quality.
Instructions
Get headphone rankings by Harman headphone listener preference score.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form_factor | No | Type: over-ear, in-ear | over-ear |
| limit | No | Number of entries |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- autoeq_mcp.py:855-883 (handler)The handler function `eq_ranking` queries the `headphones` table to retrieve and format headphone ranking data based on Harman preference scores.
async def eq_ranking( form_factor: str = Field(default="over-ear", description="Type: over-ear, in-ear"), limit: int = Field(default=20, description="Number of entries"), ) -> str: """Get headphone rankings by Harman headphone listener preference score.""" conn = get_db() rows = conn.execute( """SELECT name, source, form_factor, signature, score, std_db, slope FROM headphones WHERE score IS NOT NULL AND form_factor LIKE ? ORDER BY score DESC LIMIT ?""", (f"%{form_factor}%", min(limit, 50)), ).fetchall() conn.close() if not rows: return "No ranking data available." lines = [f"## Harman preference ranking ({form_factor}, top {len(rows)})"] lines.append(f"{'Rank':>4} {'Score':>5} {'STD':>5} {'Slope':>6} Model") lines.append(f"{'─'*4} {'─'*5} {'─'*5} {'─'*6} {'─'*30}") for i, r in enumerate(rows, 1): slope_mark = "↓" if (r["slope"] or 0) < -0.1 else ("↑" if (r["slope"] or 0) > 0.1 else "→") sig = f" ({r['signature']})" if r["signature"] else "" lines.append( f"{i:>4} {r['score']:>5.0f} {r['std_db']:>5.2f} {r['slope']:>+6.2f}{slope_mark} {r['name']}{sig}" ) return "\n".join(lines) - autoeq_mcp.py:845-854 (registration)Registration of the `eq_ranking` tool within the MCP server.
@mcp_server.tool( name="eq_ranking", annotations={ "title": "Harman preference ranking", "readOnlyHint": True, "destructiveHint": False, "idempotentHint": True, "openWorldHint": False, }, )