Skip to main content
Glama
imrnbeg

Jira MCP Server

by imrnbeg

Get Project Issue Types and Statuses

get_project_statuses

Retrieve available statuses for each issue type in a Jira project to understand workflow states and transitions.

Instructions

Get available statuses for each issue type in a project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdOrKeyYesProject key or ID (e.g., PROJ or 10001)

Implementation Reference

  • The handler function that implements the core logic of the 'get_project_statuses' tool by fetching issue types and statuses from the Jira project API endpoint.
    async (args: { projectIdOrKey: string }) => {
      try {
        const url = `${JIRA_URL}/rest/api/3/project/${encodeURIComponent(args.projectIdOrKey)}/statuses`;
        const response = await fetch(url, { method: "GET", headers: getJiraHeaders() });
        if (!response.ok) {
          const errorText = await response.text();
          return { content: [{ type: "text", text: `Failed to get statuses for ${args.projectIdOrKey}: ${response.status} ${response.statusText}\n${errorText}` }], isError: true };
        }
        const arr = await response.json() as any[];
        const summary = arr.map((t: any) => ({ issueType: t.name, statuses: (t.statuses || []).map((s: any) => s.name) }));
        return { content: [{ type: "text", text: `Found ${summary.length} issue types with statuses.` }], structuredContent: { projectIdOrKey: args.projectIdOrKey, types: summary, raw: arr } };
      } catch (error) {
        return { content: [{ type: "text", text: `Error getting project statuses for ${args.projectIdOrKey}: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
      }
    }
  • Input schema definition using Zod for the tool's single parameter 'projectIdOrKey'.
    {
      title: "Get Project Issue Types and Statuses",
      description: "Get available statuses for each issue type in a project.",
      inputSchema: {
        projectIdOrKey: z.string().describe("Project key or ID (e.g., PROJ or 10001)"),
      },
    },
  • src/server.ts:213-237 (registration)
    Registration of the 'get_project_statuses' tool with the MCP server, including schema and handler.
    mcp.registerTool(
      "get_project_statuses",
      {
        title: "Get Project Issue Types and Statuses",
        description: "Get available statuses for each issue type in a project.",
        inputSchema: {
          projectIdOrKey: z.string().describe("Project key or ID (e.g., PROJ or 10001)"),
        },
      },
      async (args: { projectIdOrKey: string }) => {
        try {
          const url = `${JIRA_URL}/rest/api/3/project/${encodeURIComponent(args.projectIdOrKey)}/statuses`;
          const response = await fetch(url, { method: "GET", headers: getJiraHeaders() });
          if (!response.ok) {
            const errorText = await response.text();
            return { content: [{ type: "text", text: `Failed to get statuses for ${args.projectIdOrKey}: ${response.status} ${response.statusText}\n${errorText}` }], isError: true };
          }
          const arr = await response.json() as any[];
          const summary = arr.map((t: any) => ({ issueType: t.name, statuses: (t.statuses || []).map((s: any) => s.name) }));
          return { content: [{ type: "text", text: `Found ${summary.length} issue types with statuses.` }], structuredContent: { projectIdOrKey: args.projectIdOrKey, types: summary, raw: arr } };
        } catch (error) {
          return { content: [{ type: "text", text: `Error getting project statuses for ${args.projectIdOrKey}: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • Helper function to generate authentication headers required for all Jira API calls, used by the tool handler.
    function getJiraHeaders(): Record<string, string> {
      const auth = Buffer.from(`${JIRA_EMAIL}:${JIRA_API_TOKEN}`).toString('base64');
      return {
        'Authorization': `Basic ${auth}`,
        'Accept': 'application/json',
        'Content-Type': 'application/json',
      };
    }
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 a read operation ('Get') but does not mention any behavioral traits like authentication requirements, rate limits, error handling, or the format of the returned data (e.g., JSON structure). This leaves significant gaps for an agent to understand how to interact with the tool effectively.

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, direct sentence that efficiently conveys the core purpose without any unnecessary words. It is front-loaded and appropriately sized, 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.

Completeness2/5

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

Given the complexity of a tool that retrieves structured data (statuses per issue type) and the lack of annotations and output schema, the description is insufficient. It does not explain what the output looks like (e.g., a list or mapping), potential errors, or any dependencies, leaving the agent with incomplete context for proper usage.

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 input schema has 100% description coverage, with the parameter 'projectIdOrKey' clearly documented. The description does not add any semantic details beyond what the schema provides, such as examples of valid project keys or how to handle invalid inputs. Thus, it meets the baseline for high schema coverage without compensating with extra value.

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 'Get' and the resource 'available statuses for each issue type in a project', making the purpose specific and understandable. However, it does not explicitly distinguish this tool from sibling tools like 'get_jira_project' or 'list_project_issues', which might also relate to project data, so it lacks sibling differentiation.

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, such as when to choose it over 'get_jira_project' for project metadata or 'list_project_issues' for issue details. There is no mention of prerequisites, exclusions, or specific contexts, leaving usage unclear.

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

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