Skip to main content
Glama

health_check

Verify system health by checking database connections, S3/MinIO storage access, and required database extensions for academic literature management.

Instructions

检查系统健康状态

验证数据库连接、S3/MinIO 存储桶访问以及必要的数据库扩展是否正常。

Returns: 健康状态信息,包含: - ok: 整体状态是否正常 - db: 数据库连接状态 - s3: S3/MinIO 存储状态

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'health_check' tool. It checks the database connection using check_connection(), S3 storage using check_bucket(), computes an overall health status, and returns a dictionary with the results.
    def health_check() -> dict[str, Any]:
        """检查系统健康状态
        
        验证数据库连接、S3/MinIO 存储桶访问以及必要的数据库扩展是否正常。
        
        Returns:
            健康状态信息,包含:
            - ok: 整体状态是否正常
            - db: 数据库连接状态
            - s3: S3/MinIO 存储状态
        """
        # 检查数据库
        db_status = check_connection()
        
        # 检查 S3
        s3_status = check_bucket()
        
        # 综合判断
        ok = (
            db_status.get("connected", False) 
            and db_status.get("vector_enabled", False)
            and s3_status.get("accessible", False)
        )
        
        return {
            "ok": ok,
            "db": db_status,
            "s3": s3_status,
        }
  • The registration function that defines and registers the health_check tool using the @mcp.tool() decorator on the FastMCP instance.
    def register_health_tools(mcp: FastMCP) -> None:
        """注册健康检查工具"""
    
        @mcp.tool()
        def health_check() -> dict[str, Any]:
            """检查系统健康状态
            
            验证数据库连接、S3/MinIO 存储桶访问以及必要的数据库扩展是否正常。
            
            Returns:
                健康状态信息,包含:
                - ok: 整体状态是否正常
                - db: 数据库连接状态
                - s3: S3/MinIO 存储状态
            """
            # 检查数据库
            db_status = check_connection()
            
            # 检查 S3
            s3_status = check_bucket()
            
            # 综合判断
            ok = (
                db_status.get("connected", False) 
                and db_status.get("vector_enabled", False)
                and s3_status.get("accessible", False)
            )
            
            return {
                "ok": ok,
                "db": db_status,
                "s3": s3_status,
            }
  • The top-level call in the MCP server entrypoint that registers the health tools, including health_check, by invoking register_health_tools(mcp).
    register_health_tools(mcp)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool performs read-only verification checks (database connection, S3/MinIO access, extensions) and returns health status information. However, it doesn't mention behavioral aspects like rate limits, authentication requirements, or whether it's safe to run frequently, which would be helpful for a diagnostic tool.

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 efficiently structured: a clear purpose statement, specific components being checked, and a well-formatted returns section. Every sentence adds value without redundancy, and the information is front-loaded with the most important details first.

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?

Given that this is a diagnostic tool with 0 parameters and an output schema exists, the description provides good context about what health checks are performed and what information is returned. The only minor gap is lack of guidance about when to use this versus other status-checking tools in the sibling list.

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 0 parameters with 100% schema description coverage. The description appropriately doesn't discuss parameters since none exist. It focuses instead on what the tool checks and what it returns, which is the correct emphasis for a parameterless tool.

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's purpose: '检查系统健康状态' (check system health status) with specific components to verify: database connection, S3/MinIO bucket access, and necessary database extensions. It distinguishes itself from sibling tools like 'graph_health_check' by focusing on broader system health rather than graph-specific status.

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 usage for system health verification but doesn't explicitly state when to use this tool versus alternatives like 'graph_health_check' or 'ingest_status'. No exclusions or prerequisites are mentioned, leaving the agent to infer appropriate contexts from the tool's purpose alone.

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/h-lu/paperlib-mcp'

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