yuque_get_user
Retrieve current user profile and account details from the Yuque knowledge base platform to identify active users and access permissions.
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 core handler function for the 'yuque_get_user' tool. It fetches the current user information using the YuqueClient and returns it as a JSON-formatted text content block.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)The schema/definition for the 'yuque_get_user' tool, specifying its 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)Dispatch/registration case in the main handleTool switch statement that routes calls to the specific handler.case 'yuque_get_user': return await handleGetUser(client);
- src/server.ts:46-50 (registration)Server registration for listing tools, which includes 'yuque_get_user' via the YUQUE_TOOLS array.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: YUQUE_TOOLS, }; });
- src/server.ts:52-67 (registration)Server registration for tool execution requests, delegating to handleTool which dispatches to yuque_get_user handler.// Handle tool execution requests server.setRequestHandler(CallToolRequestSchema, async (request) => { try { return await handleTool(request, { client: yuqueClient }); } catch (error) { if (error instanceof McpError) { throw error; } const errorMessage = error instanceof Error ? error.message : String(error); throw new McpError( ErrorCode.InternalError, `Error executing tool: ${errorMessage}` ); } });