Skip to main content
Glama

get_current_user

Retrieve details about the current user in Clockify, enabling streamlined access to user-specific data for time tracking, project management, and reporting integrations.

Instructions

Get information about the current user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_current_user' tool. It calls the Clockify API endpoint '/user' to fetch the current user's details and returns a formatted text response with name, email, active workspace, and user ID.
    private async getCurrentUser() { const user = await this.makeRequest("/user"); return { content: [ { type: "text", text: `Current user: ${user.name} (${user.email})\nActive Workspace: ${user.activeWorkspace}\nUser ID: ${user.id}`, }, ], isError: false, }; }
  • src/index.ts:722-723 (registration)
    Registers the tool handler dispatch within the CallToolRequestSchema switch statement, routing calls to the getCurrentUser method.
    case "get_current_user": return await this.getCurrentUser();
  • Defines the tool schema in the ListTools response, specifying the name, description, and empty input schema (no parameters required).
    { name: "get_current_user", description: "Get information about the current user", inputSchema: { type: "object", properties: {}, }, },
  • TypeScript interface defining the structure of the User object returned by the Clockify API, used in the handler.
    interface User { id: string; email: string; name: string; memberships: Array<{ userId: string; hourlyRate?: { amount: number; currency: string; }; costRate?: { amount: number; currency: string; }; targetId: string; membershipType: "WORKSPACE" | "PROJECT"; membershipStatus: "PENDING" | "ACTIVE" | "DECLINED" | "INACTIVE"; }>; profilePicture?: string; activeWorkspace: string; defaultWorkspace: string; settings: { weekStart: string; timeZone: string; timeFormat: string; dateFormat: string; sendNewsletter: boolean; weeklyUpdates: boolean; longRunning: boolean; timeTrackingManual: boolean; summaryReportSettings: { group: string; subgroup: string; }; isCompactViewOn: boolean; dashboardSelection: string; dashboardViewType: string; dashboardPinToTop: boolean; projectListCollapse: number; collapseAllProjectLists: boolean; groupSimilarEntriesDisabled: boolean; myStartOfDay: string; projectPickerTaskFilter: boolean; lang: string; multiFactorEnabled: boolean; theme: string; scheduling: boolean; onboarding: boolean; pto: boolean; }; status: string; customFields: Array<{ customFieldId: string; sourceType: string; value: string; }>; }

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/ratheesh-aot/clockify-mcp'

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