Skip to main content
Glama
miyamamoto

JVLink MCP Server

by miyamamoto

check_update

Check if the JVLink MCP Server has available updates to maintain functionality for analyzing Japanese horse racing data.

Instructions

サーバーの最新バージョンを確認する。アップデートがあるか確認します。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'check_update' MCP tool handler. It calls 'check_for_updates' and returns the update information.
    def check_update() -> dict:
        """サーバーの最新バージョンを確認する。アップデートがあるか確認します。"""
        info = check_for_updates()
        if info is None:
            return {"error": "アップデートの確認に失敗しました。ネットワーク接続を確認してください。"}
        return info
  • The implementation of 'check_for_updates' which interacts with the GitHub API to check for new releases or tags.
    def check_for_updates() -> Optional[dict]:
        """Check GitHub for latest release.
    
        Returns dict with latest_version, current_version, update_available, html_url
        or None on failure.
        """
        import urllib.request
        import urllib.error
    
        current = get_current_version()
    
        # Try releases/latest first
        try:
            url = f"{GITHUB_API_URL}/releases/latest"
            req = urllib.request.Request(
                url,
                headers={"Accept": "application/vnd.github.v3+json", "User-Agent": GITHUB_REPO},
            )
            with urllib.request.urlopen(req, timeout=10) as resp:
                data = json.loads(resp.read().decode("utf-8"))
                latest = data.get("tag_name", "unknown")
                return {
                    "latest_version": latest,
                    "current_version": current,
                    "update_available": _version_newer(latest, current),
                    "html_url": data.get("html_url", ""),
                    "release_name": data.get("name", ""),
                    "body": data.get("body", ""),
                }
        except urllib.error.HTTPError as e:
            if e.code != 404:
                logger.debug("GitHub API error: %s", e.code)
                return None
        except Exception as e:
            logger.debug("Failed to check releases: %s", e)
            return None
    
        # Fallback: check tags
        try:
            url = f"{GITHUB_API_URL}/tags?per_page=1"
            req = urllib.request.Request(
                url,
                headers={"Accept": "application/vnd.github.v3+json", "User-Agent": GITHUB_REPO},
            )
            with urllib.request.urlopen(req, timeout=10) as resp:
                data = json.loads(resp.read().decode("utf-8"))
                if data:
                    latest = data[0].get("name", "unknown")
                    return {
                        "latest_version": latest,
                        "current_version": current,
                        "update_available": _version_newer(latest, current),
                        "html_url": f"https://github.com/{GITHUB_OWNER}/{GITHUB_REPO}/releases",
                        "release_name": "",
                        "body": "",
                    }
        except Exception as e:
            logger.debug("Failed to check tags: %s", e)
    
        return None

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