system-health-check
Check system health and database connectivity for Firebird SQL databases to identify issues and ensure reliable operation.
Instructions
Verifica el estado de salud del sistema y la conectividad de la base de datos
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/metadata.ts:184-223 (handler)The handler function for the 'system-health-check' tool. It collects system health information including status, timestamp, uptime, memory usage, environment details, and tool counts, then formats and returns it.handler: async () => { try { const healthInfo = { status: 'healthy', timestamp: new Date().toISOString(), uptime: process.uptime(), memory: { used: Math.round(process.memoryUsage().heapUsed / 1024 / 1024), total: Math.round(process.memoryUsage().heapTotal / 1024 / 1024), external: Math.round(process.memoryUsage().external / 1024 / 1024) }, environment: { nodeVersion: process.version, platform: process.platform, arch: process.arch }, tools: { database: databaseTools.size, metadata: tools.size, total: databaseTools.size + tools.size } }; return { content: [{ type: 'text', text: `Estado de salud del sistema:\n\n${formatForClaude(healthInfo)}` }] }; } catch (error) { logger.error('Error in health check:', { error }); return { content: [{ type: 'text', text: `Error en verificación de salud: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } }
- src/tools/metadata.ts:180-224 (registration)Registers the 'system-health-check' tool in the metadata tools Map, defining its title, description, empty input schema, and handler function.tools.set('system-health-check', { title: 'System Health Check', description: 'Verifica el estado de salud del sistema y la conectividad de la base de datos', inputSchema: z.object({}), handler: async () => { try { const healthInfo = { status: 'healthy', timestamp: new Date().toISOString(), uptime: process.uptime(), memory: { used: Math.round(process.memoryUsage().heapUsed / 1024 / 1024), total: Math.round(process.memoryUsage().heapTotal / 1024 / 1024), external: Math.round(process.memoryUsage().external / 1024 / 1024) }, environment: { nodeVersion: process.version, platform: process.platform, arch: process.arch }, tools: { database: databaseTools.size, metadata: tools.size, total: databaseTools.size + tools.size } }; return { content: [{ type: 'text', text: `Estado de salud del sistema:\n\n${formatForClaude(healthInfo)}` }] }; } catch (error) { logger.error('Error in health check:', { error }); return { content: [{ type: 'text', text: `Error en verificación de salud: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } });
- src/tools/metadata.ts:183-183 (schema)Defines the input schema for the 'system-health-check' tool as an empty object (no parameters required).inputSchema: z.object({}),