Skip to main content
Glama
RuoJi6

Memory Shell Detector MCP

by RuoJi6

check_network

Checks network connectivity to the tool download server before downloading the detection tool. If network is unavailable, manual download or network configuration is required.

Instructions

检测网络连通性

测试是否能访问工具下载服务器,用于在下载检测工具前确认网络状态。 如果网络不通,需要手动下载 jar 包或检查网络配置。

Returns: available: 网络是否可用 message: 状态描述信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool 'check_network' is registered using the @mcp.tool() decorator. This is a tool that checks network connectivity by calling the check_network_available helper function.
    @mcp.tool()
    def check_network() -> dict:
        """
        检测网络连通性
        
        测试是否能访问工具下载服务器,用于在下载检测工具前确认网络状态。
        如果网络不通,需要手动下载 jar 包或检查网络配置。
        
        Returns:
            available: 网络是否可用
            message: 状态描述信息
        """
        return check_network_available()
  • The handler function for 'check_network': returns the result of check_network_available() which tests connectivity to the download server.
    @mcp.tool()
    def check_network() -> dict:
        """
        检测网络连通性
        
        测试是否能访问工具下载服务器,用于在下载检测工具前确认网络状态。
        如果网络不通,需要手动下载 jar 包或检查网络配置。
        
        Returns:
            available: 网络是否可用
            message: 状态描述信息
        """
        return check_network_available()
  • Helper function 'check_network_available' that performs the actual network connectivity check by running a curl/wget command and returning availability status.
    def check_network_available(test_url: str = "https://xget.xi-xu.me") -> dict:
        """检测网络是否可用"""
        system = platform.system().lower()
        
        if system == "windows":
            cmd = f'curl -s -o nul -w "%{{http_code}}" --connect-timeout 10 "{test_url}" || powershell -Command "(Invoke-WebRequest -Uri \'{test_url}\' -TimeoutSec 10 -UseBasicParsing).StatusCode"'
        else:
            cmd = f'curl -s -o /dev/null -w "%{{http_code}}" --connect-timeout 10 "{test_url}" 2>/dev/null || wget -q --spider --timeout=10 "{test_url}" && echo "200"'
        
        result = execute_local_command(cmd, timeout=30)
        
        if result["success"] or "200" in result["stdout"]:
            return {"available": True, "message": "网络连接正常"}
        else:
            return {"available": False, "message": f"网络连接失败: {result['stderr']}"}
Behavior4/5

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

No annotations provided, but the description implies a read-only check. It does not explicitly state that it has no side effects, but the nature of testing connectivity is inherently non-destructive. Returns status without changing state.

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 concise and well-structured: it states the purpose, usage context, fallback instructions, and return format. Every sentence adds value with no fluff.

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

Completeness5/5

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

Given no parameters and a simple output (available, message), the description fully covers the tool's purpose, use case, and output. It even provides troubleshooting steps, making it contextually complete.

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?

Tool has 0 parameters, so schema coverage is 100%. Baseline 4 applies. Description adds context about what the tool checks, but no parameters to elaborate on.

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 network connectivity to a specific server ('工具下载服务器'). It distinguishes from siblings like 'download_detector_tools' or 'execute_command' by specifying it's a network test, not a download or command.

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

Usage Guidelines5/5

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

It explicitly mentions when to use: 'before downloading detection tools'. It also provides guidance on what to do if network is unreachable: manually download jar or check configuration. This suggests not to use it for other purposes.

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/RuoJi6/memory-shell-mcp'

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