Skip to main content
Glama
jhanglim

Mattermost MCP Server

by jhanglim

search_users

Find Mattermost users by name, username, or nickname to identify team members and manage user interactions within the platform.

Instructions

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

Input Schema

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

Implementation Reference

  • 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),
          },
        ],
      };
    }
  • 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"],
      },
    },
  • 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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions the search functionality but doesn't disclose behavioral traits like whether it's read-only, what permissions are needed, if there are rate limits, pagination behavior, or what the return format looks like. For a search tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Korean that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns, any behavioral constraints, or usage context. For a search tool, this leaves significant gaps for an AI agent to understand how to properly invoke and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the parameter 'search_term' fully documented in the schema. The description adds minimal value by listing the searchable fields (name, username, nickname), but this is already implied by the schema's description. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('search') and resource ('users') with specific search criteria ('by name, username, nickname'). It doesn't explicitly differentiate from sibling tools like 'search_messages' or 'search_user_messages', but the resource focus is clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'get_user_info' or 'get_current_user'. The description only states what it does, not when it's appropriate or what prerequisites might exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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