gepa_recovery_status
Check disaster recovery status and health information to monitor system resilience and operational continuity.
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:312-325 (registration)Tool registration in the TOOLS array, including name, description, and input schema.{ 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)Handler registration in the switch statement for tool calls.case 'gepa_recovery_status': return await this.getRecoveryStatus(args as { includeMetrics?: boolean; });
- src/mcp/server.ts:1603-1657 (handler)Main handler function that executes the tool logic by calling disaster recovery system's health check and dashboard methods, then formats and returns the status information.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'}`); } }
- src/mcp/server.ts:315-324 (schema)Input schema definition for the tool, specifying optional includeMetrics boolean parameter.inputSchema: { type: 'object', properties: { includeMetrics: { type: 'boolean', default: true, description: 'Include detailed metrics in response' } } }