yuque_get_user
Retrieve current Yuque user profile information including account details and platform identity for authentication verification and user management.
Instructions
获取当前用户信息 (Get current user information)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/handlers.ts:103-113 (handler)The main handler function that executes the yuque_get_user tool logic: fetches current user via YuqueClient and returns JSON-formatted text content.async function handleGetUser(client: YuqueClient) { const user = await client.getUser(); return { content: [ { type: 'text', text: JSON.stringify(user, null, 2), }, ], }; }
- src/tools/definitions.ts:12-19 (schema)Tool schema definition specifying name, description, and empty input schema (no parameters required).{ name: 'yuque_get_user', description: '获取当前用户信息 (Get current user information)', inputSchema: { type: 'object', properties: {}, }, },
- src/tools/handlers.ts:24-25 (registration)Registration/dispatch case in the central handleTool switch statement that routes calls to yuque_get_user's handler.case 'yuque_get_user': return await handleGetUser(client);
- src/yuque-client.ts:152-154 (helper)Supporting YuqueClient method that performs the actual API request to retrieve the current user information.async getUser(): Promise<YuqueUser> { return this.request<YuqueUser>('/user'); }