get_current_user
Retrieve current user profile details from Clockify to verify account access and personalize time tracking workflows.
Instructions
Get information about the current user
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_current_user"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:837-848 (handler)The handler function that executes the tool logic. Fetches current user data from Clockify API /user endpoint and returns formatted text response with user details.
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:253-260 (registration)Tool registration in the ListTools response, including name, description, and input schema (empty object).
{ name: "get_current_user", description: "Get information about the current user", inputSchema: { type: "object", properties: {}, }, }, - src/index.ts:722-723 (registration)Dispatch in the CallToolRequest handler switch statement that routes calls to the getCurrentUser method.
case "get_current_user": return await this.getCurrentUser(); - src/index.ts:256-259 (schema)Input schema definition for the tool: an empty object (no parameters required).
inputSchema: { type: "object", properties: {}, },