Skip to main content
Glama
NotoriousArnav

EventHorizon MCP Server

health_check

Verify EventHorizon API connectivity and authentication status to ensure reliable platform operations.

Instructions

Check the connection to the EventHorizon API and verify authentication.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Executes the health_check tool: retrieves the API client, performs a health check via API call to verify authentication, and returns a formatted success or error response.
    async () => { try { const apiClient = getClient(); const isHealthy = await apiClient.healthCheck(); if (isHealthy) { return { content: [{ type: 'text', text: `EventHorizon API is healthy and authenticated.\nConnected to: ${apiClient.getBaseURL()}` }] }; } else { return { content: [{ type: 'text', text: 'EventHorizon API connection failed.' }], isError: true }; } } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } }
  • Empty input schema (no parameters) for the health_check tool.
    {},
  • src/index.ts:392-392 (registration)
    Registers the health_check tool with the MCP server, providing the tool name, description, schema, and handler.
    server.tool(
  • API client method that performs the actual health check by attempting to fetch the current user profile; returns true if successful (authenticated), false otherwise, or throws specific auth error.
    async healthCheck(): Promise<boolean> { try { await this.client.get('/accounts/api/me/'); return true; } catch (error) { if (axios.isAxiosError(error) && error.response?.status === 401) { throw new Error('Authentication failed: Invalid or expired Knox token'); } return false; } }
  • Lazy-initializes and returns the singleton EventHorizonClient instance, validating config first. Used by the health_check handler to get the API client.
    function getClient(): EventHorizonClient { if (!client) { const errors = validateConfig(); if (errors.length > 0) { throw new Error(`Configuration errors: ${errors.join('; ')}`); } client = new EventHorizonClient(); } return client; }

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/NotoriousArnav/EventHorizon-MCP'

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