show_currentuser
Retrieves and displays information about the currently authenticated user in the Anaplan system.
Instructions
Get current authenticated user info
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": "show_currentuser"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/exploration.ts:595-605 (handler)The tool handler for 'show_currentuser' - calls apis.users.getCurrentUser() and formats the response as text.
server.tool("show_currentuser", "Get current authenticated user info", {}, async () => { const user = await apis.users.getCurrentUser(); const lines = [ `**Name:** ${user.firstName} ${user.lastName}`, `**Email:** ${user.email}`, `**ID:** ${user.id}`, `**Active:** ${user.active}`, `**Last Login:** ${user.lastLoginDate ?? "N/A"}`, ]; return { content: [{ type: "text" as const, text: lines.join("\n") }] }; }); - src/tools/exploration.ts:595-595 (schema)Schema for 'show_currentuser' - empty object {}, no parameters required.
server.tool("show_currentuser", "Get current authenticated user info", {}, async () => { - src/tools/exploration.ts:595-605 (registration)Tool registration via server.tool('show_currentuser', ...) inside registerExplorationTools.
server.tool("show_currentuser", "Get current authenticated user info", {}, async () => { const user = await apis.users.getCurrentUser(); const lines = [ `**Name:** ${user.firstName} ${user.lastName}`, `**Email:** ${user.email}`, `**ID:** ${user.id}`, `**Active:** ${user.active}`, `**Last Login:** ${user.lastLoginDate ?? "N/A"}`, ]; return { content: [{ type: "text" as const, text: lines.join("\n") }] }; }); - src/server.ts:54-57 (registration)Call to registerExplorationTools which registers 'show_currentuser' on the server.
registerExplorationTools(server, { workspaces, models, modules, lists, imports, exports, processes, files, actions, transactional, modelManagement, dimensions, calendar, versions, users, }, resolver); - src/api/users.ts:6-9 (helper)getCurrentUser() API method that performs GET /users/me to fetch the current user.
async getCurrentUser() { const res = await this.client.get<any>("/users/me"); return res.user ?? res; }