Skip to main content
Glama
NotoriousArnav

EventHorizon MCP Server

health_check

Verify EventHorizon API connectivity and authentication status to ensure reliable integration with the event management platform.

Instructions

Check the connection to the EventHorizon API and verify authentication.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline async handler function for the 'health_check' MCP tool. It initializes the API client, performs a health check, and returns a success or error response based on the result.
    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 }; } }
  • src/index.ts:392-417 (registration)
    The server.tool() call that registers the 'health_check' tool with the MCP server, including name, description, empty input schema, and the handler function.
    server.tool( 'health_check', 'Check the connection to the EventHorizon API and verify authentication.', {}, 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 }; } } );
  • The EventHorizonClient.healthCheck() method invoked by the tool handler. It verifies API connectivity by fetching the current user profile and handles authentication failures.
    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; } }

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