gepa_recovery_status
Monitor and evaluate disaster recovery status and system health with detailed metrics for optimized AI prompt performance and reliability.
Instructions
Get comprehensive disaster recovery status and health information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| includeMetrics | No | Include detailed metrics in response |
Implementation Reference
- src/mcp/server.ts:1603-1660 (handler)The primary handler for the 'gepa_recovery_status' tool. It initializes the disaster recovery system, performs a health check, retrieves the recovery dashboard, and formats a comprehensive status report as MCP content.private async getRecoveryStatus(params: { includeMetrics?: boolean; }): Promise<{ content: { type: string; text: string; }[] }> { const { includeMetrics = true } = params; try { await this.disasterRecovery.initialize(); const health = await this.disasterRecovery.performHealthCheck(); const dashboard = await this.disasterRecovery.getRecoveryDashboard(); return { content: [ { type: 'text', text: `# Disaster Recovery Status ## Overall System Health: ${health.overall.toUpperCase()} ### System Components ${Object.entries(health.systems).map(([system, systemHealth]) => `- **${system}**: ${systemHealth.status.toUpperCase()} (Last check: ${systemHealth.lastCheck.toISOString()})` ).join('\n')} ### Recovery Dashboard - **System Status**: ${dashboard.systemStatus.overall.toUpperCase()} - **Active Recoveries**: ${dashboard.systemStatus.activeRecoveries} - **Recent Failures**: ${dashboard.systemStatus.recentFailures} - **Total Executions**: ${dashboard.recoveryHistory.totalExecutions} - **Success Rate**: ${(dashboard.recoveryHistory.successRate * 100).toFixed(1)}% ### Metrics - **Backups Available**: ${dashboard.metrics.backupsAvailable} - **Quarantined Items**: ${dashboard.metrics.quarantinedItems} - **Critical Components**: ${dashboard.metrics.criticalComponents} - **Last Backup Age**: ${dashboard.metrics.lastBackupAge} minutes ${dashboard.recommendations.length > 0 ? `### Recommendations ${dashboard.recommendations.map(rec => `- ${rec}`).join('\n')}` : ''} ${dashboard.alerts.length > 0 ? `### Active Alerts ${dashboard.alerts.map(alert => `🚨 **${alert.title}** (${alert.severity}): ${alert.description}`).join('\n')}` : ''} ${includeMetrics ? `### Detailed Metrics ${Object.entries(health.systems).map(([system, systemHealth]) => `#### ${system.charAt(0).toUpperCase() + system.slice(1)} ${Object.entries(systemHealth.metrics || {}).map(([key, value]) => ` - ${key}: ${value}`).join('\n')}` ).join('\n\n')}` : ''}`, }, ], }; } catch (error) { throw new Error(`Failed to get recovery status: ${error instanceof Error ? error.message : 'Unknown error'}`); } } /** * Recover specific component
- src/mcp/server.ts:313-324 (schema)The input schema definition for the tool, specifying the optional 'includeMetrics' parameter.name: 'gepa_recovery_status', description: 'Get comprehensive disaster recovery status and health information', inputSchema: { type: 'object', properties: { includeMetrics: { type: 'boolean', default: true, description: 'Include detailed metrics in response' } } }
- src/mcp/server.ts:593-596 (registration)The tool registration in the MCP server's CallToolRequestSchema handler switch statement, dispatching to the getRecoveryStatus method.case 'gepa_recovery_status': return await this.getRecoveryStatus(args as { includeMetrics?: boolean; });