Skip to main content
Glama
NotoriousArnav

EventHorizon MCP Server

get_my_profile

Retrieve your user profile details from the EventHorizon platform to access personal information and manage your account settings.

Instructions

Get the current user's profile information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration and inline handler for 'get_my_profile'. Fetches the current user's profile using EventHorizonClient and formats it as a text response.
    server.tool( 'get_my_profile', 'Get the current user\'s profile information.', {}, async () => { try { const apiClient = getClient(); const profile = await apiClient.getCurrentProfile(); return { content: [{ type: 'text', text: `User Profile: Username: ${profile.username} Email: ${profile.email} Name: ${profile.first_name} ${profile.last_name} Bio: ${profile.profile.bio || 'Not set'} Location: ${profile.profile.location || 'Not set'} Phone: ${profile.profile.phone_number || 'Not set'} Joined: ${profile.date_joined}` }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } );
  • EventHorizonClient method that performs the actual API call to retrieve the current user's profile from '/accounts/api/me/'.
    async getCurrentProfile(): Promise<User & { profile: Profile }> { try { const response: AxiosResponse<User & { profile: Profile }> = await this.client.get('/accounts/api/me/'); return response.data; } catch (error) { throw new Error(`Failed to get user profile: ${getErrorMessage(error)}`); } }
  • TypeScript interfaces defining the structure of User and Profile data used by the get_my_profile tool.
    export interface User { id: number; username: string; email: string; first_name: string; last_name: string; date_joined: string; } export interface Profile { bio: string; location: string; phone_number: string; avatar: string; social_links: SocialLink[]; } export interface SocialLink { platform: 'github' | 'twitter' | 'linkedin' | 'instagram' | 'facebook' | 'website' | 'other'; url: string; }
  • Lazy-initializes and returns the EventHorizonClient instance used by all tools, including get_my_profile.
    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