get_current_user
Retrieve your Mattermost user profile information including username, email, and account details to verify identity and access permissions.
Instructions
현재 토큰 소유자(나)의 정보를 조회합니다.
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": "get_current_user"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:330-348 (handler)The handler function for the 'get_current_user' tool. It retrieves the current user information using client.getMe() and returns it as a formatted JSON string in the tool response.
case "get_current_user": { const me = await client.getMe(); return { content: [ { type: "text", text: JSON.stringify({ id: me.id, username: me.username, email: me.email || "", first_name: me.first_name || "", last_name: me.last_name || "", nickname: me.nickname || "", full_name: `${me.first_name} ${me.last_name}`.trim() || me.nickname || me.username, }, null, 2), }, ], }; } - src/index.ts:184-191 (registration)Registration of the 'get_current_user' tool in the ListTools response, including its name, Korean description, and empty input schema (no parameters required).
{ name: "get_current_user", description: "현재 토큰 소유자(나)의 정보를 조회합니다.", inputSchema: { type: "object", properties: {}, }, }, - src/index.ts:187-190 (schema)Input schema for 'get_current_user' tool: an empty object, indicating no input parameters are required.
inputSchema: { type: "object", properties: {}, }, - src/index.ts:135-137 (helper)Helper method in MattermostClient class that fetches the current user's information from the Mattermost API endpoint '/users/me', used by the tool handler.
async getMe(): Promise<MattermostUser> { return await this.request("/users/me") as MattermostUser; } - src/index.ts:37-44 (schema)TypeScript interface defining the structure of a MattermostUser object, used for typing the output of getMe() and thus the tool response.
interface MattermostUser { id: string; username: string; first_name: string; last_name: string; nickname: string; email?: string; }