health_check
Verify the Redmine MCP Server's operational status to ensure it can manage projects, track issues, and perform searches effectively.
Instructions
健康檢查工具,確認服務器正常運作
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/redmine_mcp/server.py:32-45 (handler)The health_check tool handler function. It checks the connection to the Redmine server using get_client() and test_connection(), returning a status message indicating if the server is healthy and connected.@mcp.tool() def health_check() -> str: """健康檢查工具,確認服務器正常運作""" try: config = get_config() client = get_client() # 測試連線 if client.test_connection(): return f"✓ 服務器正常運作,已連接到 {config.redmine_domain}" else: return f"✗ 無法連接到 Redmine 服務器: {config.redmine_domain}" except Exception as e: return f"✗ 服務器異常: {str(e)}"
- src/redmine_mcp/server.py:32-32 (registration)The @mcp.tool() decorator registers the health_check function as an MCP tool.@mcp.tool()