Skip to main content
Glama
miyamamoto

JVLink MCP Server

by miyamamoto

keiba_data_search

Search and analyze Japanese horse racing data using SQL queries to access race results, odds, pedigrees, and training information for custom analysis.

Instructions

SQLで競馬データを自由に検索・分析できる万能ツール

人気別成績、騎手成績などの専用ツールでカバーできない分析はこのツールで実行できます。
レース結果、オッズ、血統、調教など、あらゆる競馬データにアクセス可能です。

Args:
    sql_query: 実行するSQLクエリ(SELECTのみ)

Returns:
    クエリ実行結果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sql_queryYes

Implementation Reference

  • The tool "keiba_data_search" is implemented as the `execute_safe_query` function, which accepts a SQL query, performs auto-correction, executes it against the database, and returns the result.
    @mcp.tool(name="keiba_data_search")
    def execute_safe_query(sql_query: str) -> dict:
        """SQLで競馬データを自由に検索・分析できる万能ツール
    
        人気別成績、騎手成績などの専用ツールでカバーできない分析はこのツールで実行できます。
        レース結果、オッズ、血統、調教など、あらゆる競馬データにアクセス可能です。
    
        Args:
            sql_query: 実行するSQLクエリ(SELECTのみ)
    
        Returns:
            クエリ実行結果
        """
        try:
            # Auto-correct query (zero-padding etc.)
            corrected_sql, corrections = auto_correct_query(sql_query)
            
            with DatabaseConnection() as db:
                result_df = db.execute_safe_query(corrected_sql)
    
                result = {
                    "success": True,
                    "rows": len(result_df),
                    "columns": result_df.columns.tolist(),
                    "data": result_df.head(100).to_dict(orient="records"),
                    "note": "最大100行まで表示" if len(result_df) > 100 else None
                }
                
                # Notify if auto-corrections were made
                if corrections:

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