Skip to main content
Glama

health_check

Verify the operational status of the Coolify API to ensure system availability and connectivity for deployment management tasks.

Instructions

Check Coolify API health status. Note: This endpoint may not be available in all Coolify versions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'health_check' tool. Checks feature availability, calls Coolify's /healthcheck API endpoint, handles 404 and other errors gracefully by returning informative text responses.
    case 'health_check': // Check if health endpoint is available in this version if (!this.isFeatureAvailable('health_check')) { return { content: [{ type: 'text', text: `Health check endpoint not available in Coolify ${this.coolifyVersion?.version || 'this version'}.` }] }; } try { const healthResponse = await this.axiosInstance.get('/healthcheck'); return { content: [{ type: 'text', text: JSON.stringify(healthResponse.data, null, 2) }] }; } catch (error) { // Instead of throwing an error, return a message if (axios.isAxiosError(error) && error.response?.status === 404) { return { content: [{ type: 'text', text: `Health check endpoint not available in Coolify ${this.coolifyVersion?.version || 'this version'}.` }] }; } else { // For other errors, provide more details return { content: [{ type: 'text', text: "Error checking Coolify health: " + (axios.isAxiosError(error) ? error.response?.data?.message || error.message : 'Unknown error') }] }; } }
  • src/index.ts:136-145 (registration)
    Registration of the 'health_check' tool in the ListTools response. Defines name, description, and empty input schema (no parameters required).
    { name: 'health_check', description: 'Check Coolify API health status. Note: This endpoint may not be available in all Coolify versions.', inputSchema: { type: 'object', properties: {}, required: [], examples: [{}] } },
  • Input schema for health_check tool: accepts no parameters.
    inputSchema: { type: 'object', properties: {}, required: [], examples: [{}] }
  • Helper method isFeatureAvailable() that determines if 'health_check' is supported (always returns true). Used by the handler to check compatibility.
    private isFeatureAvailable(feature: string): boolean { if (!this.coolifyVersion) return true; // Assume available if version unknown const { major, minor, patch, beta } = this.coolifyVersion; // Define feature availability based on version switch (feature) { case 'health_check': return true; // Health endpoint is available in the API docs case 'execute_command': return beta ? beta >= 400 : major >= 4; // Available from beta.400+ case 'application_logs': return beta ? beta >= 380 : major >= 4; // Available from beta.380+ default: return true; // Assume other features are available } }

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/wrediam/coolify-mcp-server'

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