Skip to main content
Glama
jhanglim
by jhanglim

search_users

Find Mattermost users by name, username, or nickname to quickly locate team members and connect with the right people.

Instructions

사용자를 이름, username, 닉네임으로 검색합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_termYes검색할 이름, username 또는 닉네임

Implementation Reference

  • The handler function for the 'search_users' MCP tool. It extracts the search term from arguments, calls the Mattermost client's searchUsers method, formats the results, and returns a JSON response.
    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:243-256 (registration)
    Registration of the 'search_users' tool in the ListTools response, including name, description, and input schema.
    { name: "search_users", description: "사용자를 이름, username, 닉네임으로 검색합니다.", inputSchema: { type: "object", properties: { search_term: { type: "string", description: "검색할 이름, username 또는 닉네임", }, }, required: ["search_term"], }, },
  • TypeScript interface defining the structure of a MattermostUser, used in the searchUsers response.
    interface MattermostUser { id: string; username: string; first_name: string; last_name: string; nickname: string; email?: string; }
  • Helper method in MattermostClient that performs the actual API call to search users by term.
    async searchUsers(term: string): Promise<MattermostUser[]> { return await this.request("/users/search", { method: "POST", body: JSON.stringify({ term, allow_inactive: false, }), }) as MattermostUser[]; }

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