system-health-check
Monitor system health and validate database connectivity for the Firebird SQL server in real-time, ensuring reliable performance and accessibility for LLM-driven data interactions.
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 inline asynchronous handler function for the 'system-health-check' tool. It collects system health metrics including status, timestamp, uptime, memory usage, Node.js environment details, and counts of available database and metadata tools. Returns a formatted text response using formatForClaude, or an error response if something fails.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)Registration of the 'system-health-check' tool within the setupMetadataTools function. Defines the tool's title, description, empty input schema (no parameters required), and references the inline handler.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)Zod schema for the tool input, which is an empty object since no parameters are required.inputSchema: z.object({}),