Skip to main content
Glama
jhanglim
by jhanglim

get_current_user

Retrieve your Mattermost user profile information including username, email, and account details to verify identity and access permissions.

Instructions

현재 토큰 소유자(나)의 정보를 조회합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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: {}, }, },
  • Input schema for 'get_current_user' tool: an empty object, indicating no input parameters are required.
    inputSchema: { type: "object", properties: {}, },
  • 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; }
  • 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; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jhanglim/mattermost-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server