search_users
Find Mattermost users by name, username, or nickname to identify team members and manage user interactions within the platform.
Instructions
사용자를 이름, username, 닉네임으로 검색합니다.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"search_term": "<search_term>"
},
"name": "search_users"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search_term | Yes | 검색할 이름, username 또는 닉네임 |
Implementation Reference
- src/index.ts:508-528 (handler)MCP tool handler for 'search_users': extracts search_term argument, calls MattermostClient.searchUsers, formats users list with id, username, name, nickname, and returns as JSON.
case "search_users": { const searchTerm = args.search_term as string; const users = await client.searchUsers(searchTerm); return { content: [ { type: "text", text: JSON.stringify({ total_count: users.length, users: users.map(u => ({ id: u.id, username: u.username, name: `${u.first_name} ${u.last_name}`.trim() || u.nickname, nickname: u.nickname, })), }, null, 2), }, ], }; } - src/index.ts:88-96 (helper)Core implementation of searchUsers in MattermostClient class: makes POST request to /users/search API endpoint with term and allow_inactive=false.
async searchUsers(term: string): Promise<MattermostUser[]> { return await this.request("/users/search", { method: "POST", body: JSON.stringify({ term, allow_inactive: false, }), }) as MattermostUser[]; } - src/index.ts:243-256 (registration)Tool registration in ListToolsRequestSchema handler, including name, description, and inputSchema for search_term.
{ name: "search_users", description: "사용자를 이름, username, 닉네임으로 검색합니다.", inputSchema: { type: "object", properties: { search_term: { type: "string", description: "검색할 이름, username 또는 닉네임", }, }, required: ["search_term"], }, }, - src/index.ts:37-44 (schema)TypeScript interface defining the MattermostUser type used in searchUsers response.
interface MattermostUser { id: string; username: string; first_name: string; last_name: string; nickname: string; email?: string; }