users-get-current
Retrieve your authenticated user profile from Shortcut project management to verify identity and access permissions for AI-assisted workflows.
Instructions
Get the current user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/user.ts:30-36 (handler)Handler function that fetches the current user using the ShortcutClientWrapper and formats the response using toResult.async getCurrentUser() { const user = await this.client.getCurrentUser(); if (!user) throw new Error("Failed to retrieve current user."); return this.toResult(`Current user:`, user); }
- src/tools/user.ts:9-13 (registration)Registers the "users-get-current" tool on the CustomMcpServer instance, linking it to the getCurrentUser handler.server.addToolWithReadAccess( "users-get-current", "Get the current user", async () => await tools.getCurrentUser(), );
- src/tools/base.ts:650-663 (helper)BaseTools helper method used by the handler to format the output as an MCP CallToolResult with JSON-embedded content.protected toResult( message: string, data?: unknown, paginationToken?: string | null | undefined, ): CallToolResult { return { content: [ { type: "text", text: `${message}${data !== undefined ? `\n\n<json>\n${JSON.stringify(data, null, 2)}\n</json>${paginationToken ? `\n\n<next-page-token>${paginationToken}</next-page-token>` : ""}` : ""}`, }, ], }; }