UNPKG

@utaba/ucm-mcp-server

Version:

Universal Context Manager MCP Server - AI-native artifact management

56 lines 1.77 kB
import { BaseToolController } from '../base/BaseToolController.js'; export class HealthCheckController extends BaseToolController { constructor(ucmClient, logger, publishingAuthorId) { super(ucmClient, logger, publishingAuthorId); } get name() { return 'mcp_ucm_health_check'; } get description() { return 'Check MCP server and UCM API connectivity status'; } get inputSchema() { return { type: 'object', properties: {}, required: [] }; } async handleExecute(_params) { try { // Check UCM API connectivity const ucmHealth = await this.ucmClient.healthCheck(); return { status: 'healthy', mcpServer: { status: 'running', timestamp: new Date().toISOString(), uptime: process.uptime() }, ucmApi: { status: 'connected', response: ucmHealth }, config: { defaultRepository: 'main', author: this.publishingAuthorId } }; } catch (error) { return { status: 'unhealthy', mcpServer: { status: 'running', timestamp: new Date().toISOString(), uptime: process.uptime() }, ucmApi: { status: 'disconnected', error: error instanceof Error ? error.message : String(error) } }; } } } //# sourceMappingURL=HealthCheckController.js.map