Skip to main content
Glama
raalarcon9705

raalarcon-jira-mcp-server

get_users

Find Jira users by name or email. Optionally filter by project access and set maximum results.

Instructions

Search for users in Jira

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSearch query for user name or email
projectKeyNoFilter users by project access
maxResultsNoMaximum number of users to return (1-100)

Implementation Reference

  • The handleAssignmentTool function contains the 'get_users' case (lines 81-102) that validates args using getUsersSchema, calls jiraClient.getUsers(), maps results to essential fields, and returns JSON-stringified user data.
    export async function handleAssignmentTool(
      name: string,
      args: Record<string, unknown>,
      jiraClient: JiraClient
    ) {
      switch (name) {
        case 'assign_issue': {
          const validatedArgs = await assignIssueSchema.validate(args);
          const _result = await jiraClient.assignIssue(validatedArgs);
          return {
            content: [
              {
                type: 'text',
                text: `Issue ${validatedArgs.issueKey} assigned successfully`,
              },
            ],
          };
        }
    
        case 'get_users': {
          const validatedArgs = await getUsersSchema.validate(args);
          const users = await jiraClient.getUsers(validatedArgs);
    
          // Extract essential fields, improve syntax
          const essentialUsers = users.map((user) => ({
            id: user.accountId, // Shorter field name
            name: user.displayName, // Shorter field name
            email: user.emailAddress, // Shorter field name
            active: user.active,
            type: user.accountType // Shorter field name
          }));
    
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(essentialUsers, null, 2),
              },
            ],
          };
        }
    
        case 'get_current_user': {
          const user = await jiraClient.getCurrentUser();
    
          // Extract essential fields, improve syntax
          const userData = user;
          const essentialUser = {
            id: userData.accountId, // Shorter field name
            name: userData.displayName, // Shorter field name
            email: userData.emailAddress, // Shorter field name
            active: userData.active,
            timezone: userData.timeZone, // Shorter field name
            type: userData.accountType // Shorter field name
          };
    
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(essentialUser, null, 2),
              },
            ],
          };
        }
    
        default:
          throw new Error(`Unknown assignment tool: ${name}`);
      }
    }
  • The tool 'get_users' is registered as an MCP tool with name 'get_users', description 'Search for users in Jira', and inputSchema defining query, projectKey, and maxResults parameters.
        {
          name: 'get_users',
          description: 'Search for users in Jira',
          inputSchema: {
            type: 'object',
            properties: {
              query: {
                type: 'string',
                description: 'Search query for user name or email',
              },
              projectKey: {
                type: 'string',
                description: 'Filter users by project access',
              },
              maxResults: {
                type: 'number',
                description: 'Maximum number of users to return (1-100)',
                default: 50,
              },
            },
          },
        },
        {
          name: 'get_current_user',
          description: 'Get information about the current authenticated user',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
      ];
    }
  • The getUsersSchema Yup validation schema defines optional 'query' (string), optional 'projectKey' (string), and 'maxResults' (number, min 1, max 100, default 50).
    export const getUsersSchema = yup.object({
      query: yup.string().optional(),
      projectKey: yup.string().optional(),
      maxResults: yup.number().min(1).max(100).default(50),
    });
  • The GetUsersInput TypeScript type is inferred from the getUsersSchema.
    export type GetUsersInput = yup.InferType<typeof getUsersSchema>;
  • The JiraClient.getUsers() method calls the Jira API's userSearch.findUsers() with query and maxResults from the validated input, returning the raw response.
    async getUsers(input: GetUsersInput) {
      try {
        const response = await this.jira.userSearch.findUsers({
          query: input.query,
          maxResults: input.maxResults,
        });
        return response;
      } catch (error) {
        throw new Error(`Failed to get users: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
  • src/index.ts:90-95 (registration)
    In the main server's CallToolRequestSchema handler, tools starting with 'get_users' are routed to handleAssignmentTool.
    } else if (
      name.startsWith('assign_issue') ||
      name.startsWith('get_users') ||
      name.startsWith('get_current_user')
    ) {
      return await handleAssignmentTool(name, args || {}, this.jiraClient);
Behavior2/5

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

No annotations provided, and the description only says 'Search'. Missing behavioral details like pagination, partial matches, or read-only nature. The description carries the full burden but 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.

Conciseness3/5

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

Single sentence, very concise. However, it lacks necessary context. Optimal length but under-informative.

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?

With 3 parameters and no output schema, the description is too short. It does not explain return format, query behavior, or limitations. Incomplete for a search tool.

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 coverage is 100% with descriptions for all three parameters. Description adds no additional meaning beyond schema, baseline 3.

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 'Search for users in Jira', with a specific verb and resource. It distinguishes from sibling tools like get_current_user (single user) and get_issue (non-user), though not explicitly.

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 on when to use this tool versus alternatives. For example, no mention of when to use search vs get_current_user or get_issue.

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

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