Skip to main content
Glama
miyamamoto

JVLink MCP Server

by miyamamoto

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

TableJSON Schema
NameRequiredDescriptionDefault
ninkiNo
venueNo
year_fromNo
distanceNo

Implementation Reference

  • 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'
        )
  • 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]:
  • 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,
    )
Behavior2/5

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

No annotations provided, so description must carry the burden. It mentions analyzing and checking win rates, but does not disclose any behavioral traits: no mention of read-only nature, data source, update frequency, or limitations. For a tool with no annotations, this is insufficient.

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?

Two concise sentences, front-loaded with purpose. No unnecessary words. However, the brevity sacrifices completeness; a slightly longer description could add needed parameter context without becoming verbose.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (4 parameters, no output schema, no annotations), the description is far from complete. It does not explain input parameters, return format, or filtering capabilities. The agent would lack context to invoke the tool correctly for most use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and description does not explain any of the four parameters. The term 'ninki' (popularity) is hinted but not defined; venue, year_from, and distance are not mentioned at all. The description adds no meaningful information beyond what the schema provides.

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?

Description clearly states it analyzes performance by popularity for NAR local horse racing, listing example venues (Oi, Funabashi, etc.). It distinguishes from the sibling 'favorite_performance' which likely covers JRA central racing, but does not explicitly differentiate.

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?

No guidance on when to use this tool versus alternatives like 'favorite_performance'. The description implies NAR local context, but does not state when to choose this over other racing analysis tools.

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/miyamamoto/jvlink-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server