Skip to main content
Glama
miyamamoto

JVLink MCP Server

by miyamamoto

get_table_info

Retrieve schema details for JVLink horse racing data tables, including column information, table descriptions, and query hints to support analysis.

Instructions

指定テーブルのスキーマ情報を取得(詳細説明付き)

Args:
    table_name: テーブル名

Returns:
    カラム情報、テーブル説明、クエリヒントを含む辞書

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYes

Implementation Reference

  • The `get_table_info` tool implementation in the MCP server, which retrieves schema and column details for a specified table.
    def get_table_info(table_name: str) -> dict:
        """指定テーブルのスキーマ情報を取得(詳細説明付き)
    
        Args:
            table_name: テーブル名
    
        Returns:
            カラム情報、テーブル説明、クエリヒントを含む辞書
        """
        with DatabaseConnection() as db:
            schema_df = db.get_table_schema(table_name)
            
            # カラム情報に説明を追加
            columns_with_desc = []
            for _, row in schema_df.iterrows():
                col_name = row["column_name"]
                col_info = {
                    "name": col_name,
                    "type": row["column_type"],
                    "description": get_column_description(table_name, col_name)
                }
                columns_with_desc.append(col_info)
            
            # テーブル説明を取得
            table_desc = get_table_description(table_name)
            
            return {
                "table_name": table_name,
                "table_description": table_desc.get("description", ""),
                "target_equivalent": table_desc.get("target_equivalent", ""),
                "primary_keys": table_desc.get("primary_keys", []),
                "total_columns": len(columns_with_desc),
                "columns": columns_with_desc,
                "query_hints": QUERY_GENERATION_HINTS if table_name in ["NL_RA", "NL_SE"] else ""
            }

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