get_user
Retrieve a specific user's complete profile by ID, including roles, permissions, and billing rates from Harvest time tracking.
Instructions
Retrieve a specific user by ID. Returns complete user profile including roles, permissions, and billing rates.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | The ID of the user to retrieve |
Implementation Reference
- src/tools/users.ts:38-56 (handler)The GetUserHandler class defines the execution logic for the 'get_user' tool.
class GetUserHandler implements ToolHandler { constructor(private readonly config: BaseToolConfig) {} async execute(args: Record<string, any>): Promise<CallToolResult> { try { const inputSchema = z.object({ user_id: z.number().int().positive() }); const { user_id } = validateInput(inputSchema, args, 'get user'); logger.info('Fetching user from Harvest API', { userId: user_id }); const user = await this.config.harvestClient.getUser(user_id); return { content: [{ type: 'text', text: JSON.stringify(user, null, 2) }], }; } catch (error) { return handleMCPToolError(error, 'get_user'); } } } - src/tools/users.ts:150-164 (registration)The registration entry for the 'get_user' tool, which binds the 'get_user' name to the GetUserHandler instance.
{ tool: { name: 'get_user', description: 'Retrieve a specific user by ID. Returns complete user profile including roles, permissions, and billing rates.', inputSchema: { type: 'object', properties: { user_id: { type: 'number', description: 'The ID of the user to retrieve' }, }, required: ['user_id'], additionalProperties: false, }, }, handler: new GetUserHandler(config), },