Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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
            };
        }
    }
  • 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
                };
            }
        }
    });
  • Defines the input schema for the 'system-health-check' tool as an empty object (no parameters required).
    inputSchema: z.object({}),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PuroDelphi/mcpFirebird'

If you have feedback or need assistance with the MCP directory API, please join our Discord server