Skip to main content
Glama

jira_list_project_members

Retrieve all members of a Jira project to identify team participants and manage project access by providing the project key and authentication details.

Instructions

Lists all members of a specific Jira project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jiraHostNoThe Jira host URL (e.g., 'your-domain.atlassian.net')
emailNoEmail address associated with the Jira account
apiTokenNoAPI token for Jira authentication
projectKeyYesThe Jira project key (e.g., 'PROJECT')

Implementation Reference

  • The main handler function that lists all members of a Jira project. It fetches project roles, retrieves detailed actors for each role, deduplicates members by displayName, and formats the output as a Markdown table with columns for Name, Type, Email, and Roles.
    export async function listProjectMembers(args: any) {
        const validatedArgs = await JiraProjectMembersRequestSchema.validate(args);
    
        const jiraHost = validatedArgs.jiraHost || process.env.JIRA_HOST;
        const email = validatedArgs.email || process.env.JIRA_EMAIL;
        const apiToken = validatedArgs.apiToken || process.env.JIRA_API_TOKEN;
        const projectKey = validatedArgs.projectKey;
    
        if (!jiraHost || !email || !apiToken) {
            throw new Error('Missing required authentication credentials. Please provide jiraHost, email, and apiToken.');
        }
    
        validateCredentials(jiraHost, email, apiToken);
    
        const authHeader = createAuthHeader(email, apiToken);
    
        const rolesResponse = await axios.get(`https://${jiraHost}/rest/api/3/project/${projectKey}/role`, {
            headers: {
                'Authorization': authHeader,
                'Accept': 'application/json',
            },
        });
    
        const projectRoles = rolesResponse.data;
    
        let formattedResponse = `# Project Members for ${projectKey}\n\n`;
    
        if (Object.keys(projectRoles).length > 0) {
    
            const allMembers = new Map<string, {
                displayName: string;
                type: string;
                email: string;
                roles: string[];
            }>();
            const roleDetailsPromises: Promise<{
                roleName: string;
                data: ProjectRole;
            }>[] = [];
    
            for (const [roleName, roleUrl] of Object.entries(projectRoles)) {
                if (typeof roleUrl === 'string') {
    
                    const roleId = roleUrl.split('/').pop();
                    const detailUrl = `https://${jiraHost}/rest/api/3/project/${projectKey}/role/${roleId}`;
    
                    roleDetailsPromises.push(
                        axios.get<ProjectRole>(detailUrl, {
                            headers: {
                                'Authorization': authHeader,
                                'Accept': 'application/json',
                            },
                        }).then(response => ({
                            roleName,
                            data: response.data
                        }))
                    );
                }
            }
    
            const roleDetails = await Promise.all(roleDetailsPromises);
    
            for (const { roleName, data } of roleDetails) {
                if (data.actors && data.actors.length > 0) {
    
                    data.actors.forEach((actor: RoleActor) => {
                        if (actor.displayName) {
                            if (!allMembers.has(actor.displayName)) {
                                allMembers.set(actor.displayName, {
                                    displayName: actor.displayName,
                                    type: actor.type,
                                    email: actor.emailAddress || 'N/A',
                                    roles: [roleName]
                                });
                            } else {
    
                                const member = allMembers.get(actor.displayName);
                                if (member) {
                                    member.roles.push(roleName);
                                }
                            }
                        }
                    });
                }
            }
    
            if (allMembers.size > 0) {
                formattedResponse += "| Name | Type | Email | Roles |\n";
                formattedResponse += "|------|------|-------|-------|\n";
    
                allMembers.forEach(member => {
                    formattedResponse += `| ${member.displayName} | ${member.type} | ${member.email} | ${member.roles.join(', ')} |\n`;
                });
            } else {
                formattedResponse += "No project members found.";
            }
        } else {
            formattedResponse += "No project roles found.";
        }
    
        return {
            content: [{ type: "text", text: formattedResponse }],
            isError: false,
        };
    }
  • The toolConfigs object registers 'jira_list_project_members' by mapping it to its validation schema (JiraProjectMembersRequestSchema) and handler function (listProjectMembers), used by handleCallTool to dispatch tool calls.
    const toolConfigs: Record<string, ToolConfig> = {
        jira_list_projects: {
            schema: JiraApiRequestSchema,
            handler: listProjects
        },
        jira_get_issue: {
            schema: JiraIssueRequestSchema,
            handler: getIssue
        },
        jira_search_issues: {
            schema: JiraSearchIssuesRequestSchema,
            handler: searchIssues
        },
        jira_list_project_members: {
            schema: JiraProjectMembersRequestSchema,
            handler: listProjectMembers
        },
        jira_check_user_issues: {
            schema: JiraCheckUserIssuesRequestSchema,
            handler: checkUserIssues
        },
        jira_create_issue: {
            schema: JiraCreateIssueRequestSchema,
            handler: createIssue
        },
        jira_list_sprints: {
            schema: JiraSprintRequestSchema,
            handler: listSprints
        }
    };
  • Yup schema for validating the tool's input parameters. Extends JiraApiRequestSchema with a required projectKey field that matches the Jira project key format (/^[A-Z][A-Z0-9_]+$/).
    export const JiraProjectMembersRequestSchema = JiraApiRequestSchema.shape({
        projectKey: yup.string()
            .required("Project key is required")
            .matches(/^[A-Z][A-Z0-9_]+$/, "Invalid project key format. Only uppercase letters, numbers, and underscores are allowed"),
    });
  • Tool description object including name, description, and inputSchema defining properties like jiraHost, email, apiToken (with defaults), and required projectKey.
    export const listProjectMembersToolDescription = {
        name: "jira_list_project_members",
        description: "Lists all members of a specific Jira project",
        inputSchema: {
            type: "object",
            properties: {
                jiraHost: {
                    type: "string",
                    description: "The Jira host URL (e.g., 'your-domain.atlassian.net')",
                    default: process.env.JIRA_HOST || "",
                },
                email: {
                    type: "string",
                    description: "Email address associated with the Jira account",
                    default: process.env.JIRA_EMAIL || "",
                },
                apiToken: {
                    type: "string",
                    description: "API token for Jira authentication",
                    default: process.env.JIRA_API_TOKEN || "",
                },
                projectKey: {
                    type: "string",
                    description: "The Jira project key (e.g., 'PROJECT')",
                },
            },
            required: ["projectKey"],
        },
    };
  • The tool is listed in handleListTools response with its name, description, and inline inputSchema for MCP tool listing.
        name: "jira_list_project_members",
        description: "Lists all members of a specific Jira project",
        inputSchema: {
            type: "object",
            properties: {
                ...getCommonJiraProperties(),
                projectKey: {
                    type: "string",
                    description: "The Jira project key (e.g., 'PROJECT')",
                },
            },
            required: ["projectKey"],
        },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a list operation, implying read-only behavior, but doesn't mention authentication requirements, rate limits, pagination, or what the output format looks like. This is a significant gap for a tool with authentication parameters.

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 that gets straight to the point with zero waste. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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 the complexity of authentication parameters and no output schema, the description is incomplete. It doesn't explain authentication requirements, return values, or error handling. For a tool with 4 parameters (including auth) and no annotations, more context is needed to be fully helpful.

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%, so the schema already documents all 4 parameters thoroughly. The description doesn't add any additional meaning beyond what's in the schema, such as explaining how parameters interact or providing examples. 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 verb ('Lists') and resource ('all members of a specific Jira project'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'jira_list_projects' or 'jira_check_user_issues', which might also involve listing project-related information.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like authentication, nor does it compare with siblings like 'jira_check_user_issues' for user-specific data or 'jira_list_projects' for broader project info.

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

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