Skip to main content
Glama

search_users

Find Jira users by name or email to obtain their account IDs for assigning issues in Jira Cloud.

Instructions

Search for Jira users by name or email to get their account ID. Use this to find account IDs for assigning issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query - can be email, name, or partial match (e.g., "john.doe@company.com" or "John Doe")
maxResultsNoMaximum number of results to return (default: 50)

Implementation Reference

  • Main handler function implementing the search_users tool. Queries the Jira /user/search API, formats results as Markdown with user details (display name, email, account ID, active status, account type), and handles empty results and errors.
    async handleSearchUsers(args: any) {
      try {
        const { query, maxResults = 50 } = args;
    
        if (!query) {
          throw new Error('query is required');
        }
    
        const params = {
          query,
          maxResults,
        };
    
        const users = await this.apiClient.get('/user/search', params);
    
        if (!users || users.length === 0) {
          return {
            content: [
              {
                type: 'text',
                text: `No users found matching "${query}"`,
              },
            ],
          };
        }
    
        let response = `# User Search Results\n\n**Query**: ${query}\n**Found**: ${users.length} user(s)\n\n`;
    
        users.forEach((user: any) => {
          response += `## ${user.displayName}\n`;
          response += `- **Email**: ${user.emailAddress || 'N/A'}\n`;
          response += `- **Account ID**: \`${user.accountId}\`\n`;
          response += `- **Active**: ${user.active ? 'Yes' : 'No'}\n`;
          response += `- **Account Type**: ${user.accountType || 'N/A'}\n\n`;
        });
    
        response += `\nšŸ’” Use the **Account ID** when assigning issues.`;
    
        return {
          content: [
            {
              type: 'text',
              text: response,
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: JiraFormatters.formatError(error),
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema and metadata definition for the search_users tool, specifying required 'query' parameter and optional 'maxResults'.
    {
      name: 'search_users',
      description: 'Search for Jira users by name or email to get their account ID. Use this to find account IDs for assigning issues.',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query - can be email, name, or partial match (e.g., "john.doe@company.com" or "John Doe")',
          },
          maxResults: {
            type: 'number',
            description: 'Maximum number of results to return (default: 50)',
          },
        },
        required: ['query'],
      },
    },
  • src/index.ts:118-119 (registration)
    Registers the tool call dispatching in the MCP server switch statement, routing 'search_users' requests to UserHandlers.handleSearchUsers.
    case 'search_users':
      return this.userHandlers.handleSearchUsers(request.params.arguments);
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the search functionality and the goal of obtaining account IDs, but lacks details on error handling, authentication requirements, rate limits, or the format of returned results. While it covers the basic intent, it misses operational nuances that would help an agent invoke it reliably.

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 two sentences, front-loaded with the core purpose and followed by usage guidance. Every word earns its place, with no redundancy or fluff. It efficiently communicates essential information without unnecessary elaboration, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (search with two parameters), no annotations, and no output schema, the description is partially complete. It explains the purpose and usage but lacks details on return values, error conditions, or behavioral constraints. For a search tool without structured output documentation, this leaves gaps in full contextual understanding.

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?

Schema description coverage is 100%, so the schema already fully documents both parameters ('query' and 'maxResults'). The description adds no additional parameter semantics beyond what the schema provides, such as examples or edge cases. It meets the baseline for high schema coverage but does not enhance parameter understanding.

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

Purpose5/5

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

The description clearly states the specific action ('Search for Jira users by name or email'), the resource ('Jira users'), and the purpose ('to get their account ID'). It distinguishes this from sibling tools like 'search_issues' by focusing on user lookup rather than issue search, making the purpose unambiguous and well-defined.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: 'to find account IDs for assigning issues.' This provides clear context for its application, distinguishing it from other user-related operations (e.g., no sibling tool like 'create_user' exists) and guiding the agent toward its primary use case in issue assignment workflows.

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/pdogra1299/jira-mcp-server'

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