nar_favorite_performance
Analyze win rates by popularity ranking for NAR local horse racing. Filter by venue, year, and distance to evaluate favorite performance trends.
Instructions
NAR地方競馬の人気別成績を分析
大井、船橋、川崎、浦和、名古屋、園田など地方競馬場の人気別勝率を調べられます。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ninki | No | ||
| venue | No | ||
| year_from | No | ||
| distance | No |
Implementation Reference
- src/jvlink_mcp_server/server.py:575-590 (handler)MCP tool handler for 'nar_favorite_performance'. Wraps the import aliased _get_nar_favorite_performance with DatabaseConnection context manager.
@mcp.tool(name="nar_favorite_performance") def analyze_nar_favorite_performance( ninki: int = 1, venue: Optional[str] = None, year_from: Optional[str] = None, distance: Optional[int] = None ) -> dict: """NAR地方競馬の人気別成績を分析 大井、船橋、川崎、浦和、名古屋、園田など地方競馬場の人気別勝率を調べられます。 """ with DatabaseConnection() as db: return _get_nar_favorite_performance( db, venue=venue, ninki=ninki, year_from=year_from, distance=distance ) - NAR-specific high-level API function that delegates to the shared _favorite_performance_impl with source='nar'.
def get_nar_favorite_performance( db_connection, venue: Optional[str] = None, ninki: int = 1, year_from: Optional[str] = None, distance: Optional[int] = None ) -> Dict[str, Any]: """NAR地方競馬の人気別成績を取得(JRA版に委譲)""" return _favorite_performance_impl( db_connection, venue=venue, ninki=ninki, year_from=year_from, distance=distance, source='nar' ) - src/jvlink_mcp_server/server.py:575-576 (registration)Registration of the tool via @mcp.tool decorator with name 'nar_favorite_performance'.
@mcp.tool(name="nar_favorite_performance") def analyze_nar_favorite_performance( - Shared implementation (JRA/NAR) that builds a SQL query from parameters (ninki, venue, grade, year_from, distance) and computes win/place rates. For NAR, it uses NL_SE_NAR and NL_RA_NAR tables.
def _favorite_performance_impl( db_connection, venue: Optional[str] = None, ninki: int = 1, grade: Optional[str] = None, year_from: Optional[str] = None, distance: Optional[int] = None, source: str = 'jra' ) -> Dict[str, Any]: - src/jvlink_mcp_server/server.py:32-41 (registration)Imports get_nar_favorite_performance from high_level_api, aliased as _get_nar_favorite_performance.
from .database.high_level_api import ( get_favorite_performance as _get_favorite_performance, get_jockey_stats as _get_jockey_stats, get_frame_stats as _get_frame_stats, get_horse_history as _get_horse_history, get_sire_stats as _get_sire_stats, get_nar_favorite_performance as _get_nar_favorite_performance, get_nar_jockey_stats as _get_nar_jockey_stats, get_nar_horse_history as _get_nar_horse_history, )