Skip to main content
Glama
miyamamoto

JVLink MCP Server

by miyamamoto

check_update

Verifies if a new version of the JVLink server is available and checks for pending updates.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'check_update'. It calls check_for_updates() from updater module and returns the result dict or an error message if network fails.
    @mcp.tool()
    def check_update() -> dict:
        """サーバーの最新バージョンを確認する。アップデートがあるか確認します。"""
        info = check_for_updates()
        if info is None:
            return {"error": "アップデートの確認に失敗しました。ネットワーク接続を確認してください。"}
        return info
  • The tool is registered as an MCP tool via the @mcp.tool() decorator on line 695.
    @mcp.tool()
    def check_update() -> dict:
        """サーバーの最新バージョンを確認する。アップデートがあるか確認します。"""
        info = check_for_updates()
        if info is None:
            return {"error": "アップデートの確認に失敗しました。ネットワーク接続を確認してください。"}
        return info
  • The core helper function check_for_updates() that queries the GitHub API for the latest release, compares versions, and returns update info.
    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
  • Helper function get_current_version() retrieves the current version via git describe --tags or pyproject.toml.
    def get_current_version() -> str:
        """Get current version from git tag or pyproject.toml."""
        try:
            result = subprocess.run(
                ["git", "describe", "--tags", "--abbrev=0"],
                capture_output=True, text=True, cwd=str(PROJECT_ROOT), timeout=5,
            )
            if result.returncode == 0:
                return result.stdout.strip()
  • The import statement that brings check_for_updates into server.py where the tool is defined.
    from .updater import check_for_updates, perform_update, startup_update_check
Behavior4/5

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

With no annotations, the description carries full burden. It states the tool checks version and update existence, implying a read-only operation. However, it does not disclose output format or potential side effects, though for a simple check, the behavior is fairly transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with no unnecessary words. It is front-loaded and efficient, earning its place.

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

Completeness4/5

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

For a simple parameterless tool, the description is mostly complete, but it lacks details on the output (e.g., whether it returns a version string, boolean, etc.). No output schema exists to compensate, so slightly incomplete.

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

Parameters4/5

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

The tool has zero parameters, and the input schema is empty. The description does not need to add parameter info. Baseline 4 is appropriate as the description adds no extra meaning beyond schema coverage (100%).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool checks the server's latest version and whether an update exists. It uses specific verbs ('確認する') and resources ('バージョン', 'アップデート'), and distinguishes itself from the sibling 'update_server' which would perform the update.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for checking updates, not performing them, but does not explicitly state when to use it versus alternatives like 'update_server'. No exclusion criteria or context are given.

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