Skip to main content
Glama
cosmix

JIRA MCP Server

by cosmix

get_epic_children

Retrieve all child issues and their comments from a JIRA epic to track relationships and analyze project dependencies.

Instructions

Get all child issues in an epic including their comments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
epicKeyYesThe key of the epic issue

Implementation Reference

  • Core handler function that implements the tool logic: searches for issues linked to the epic using JQL, fetches comments for each child issue, cleans and enriches the data with mentions and related issues, and returns the list.
    async getEpicChildren(epicKey: string): Promise<CleanJiraIssue[]> {
      const params = new URLSearchParams({
        jql: `"Epic Link" = ${epicKey}`,
        maxResults: "100",
        fields: [
          "id",
          "key",
          "summary",
          "description",
          "status",
          "created",
          "updated",
          "parent",
          "subtasks",
          "customfield_10014",
          "issuelinks",
        ].join(","),
        expand: "names,renderedFields",
      });
    
      const data = await this.fetchJson<any>(`/rest/api/3/search?${params}`);
    
      const issuesWithComments = await Promise.all(
        data.issues.map(async (issue: any) => {
          const commentsData = await this.fetchJson<any>(
            `/rest/api/3/issue/${issue.key}/comment`
          );
          const cleanedIssue = this.cleanIssue(issue);
          const comments = commentsData.comments.map((comment: any) =>
            this.cleanComment(comment)
          );
    
          const commentMentions = comments.flatMap(
            (comment: CleanComment) => comment.mentions
          );
          cleanedIssue.relatedIssues = [
            ...cleanedIssue.relatedIssues,
            ...commentMentions,
          ];
    
          cleanedIssue.comments = comments;
          return cleanedIssue;
        })
      );
    
      return issuesWithComments;
    }
  • Input schema definition for the tool, specifying the required 'epicKey' parameter.
    name: "get_epic_children",
    description:
      "Get all child issues in an epic including their comments",
    inputSchema: {
      type: "object",
      properties: {
        epicKey: {
          type: "string",
          description: "The key of the epic issue",
        },
      },
      required: ["epicKey"],
      additionalProperties: false,
    },
  • src/index.ts:100-113 (registration)
    Tool registration in the ListTools response, including name, description, and schema.
    name: "get_epic_children",
    description:
      "Get all child issues in an epic including their comments",
    inputSchema: {
      type: "object",
      properties: {
        epicKey: {
          type: "string",
          description: "The key of the epic issue",
        },
      },
      required: ["epicKey"],
      additionalProperties: false,
    },
  • MCP CallTool request handler case that validates input, calls the Jira API service method, and formats the response as MCP content.
    case "get_epic_children": {
      if (!args.epicKey || typeof args.epicKey !== "string") {
        throw new McpError(
          ErrorCode.InvalidParams,
          "Epic key is required",
        );
      }
      const response = await this.jiraApi.getEpicChildren(args.epicKey);
      return {
        content: [
          { type: "text", text: JSON.stringify(response, null, 2) },
        ],
      };
    }
  • Type definition for CleanJiraIssue, which is the structure returned by the tool (array of these). Includes fields like comments, related issues, etc.
    export interface CleanJiraIssue {
      id: string;
      key: string;
      summary: string | undefined;
      status: string | undefined;
      created: string | undefined;
      updated: string | undefined;
      description: string;
      comments?: CleanComment[];
      parent?: {
        id: string;
        key: string;
        summary?: string;
      };
      children?: {
        id: string;
        key: string;
        summary?: string;
      }[];
      epicLink?: {
        id: string;
        key: string;
        summary?: string;
      };
      relatedIssues: {
        key: string;
        summary?: string;
        type: "mention" | "link";
        relationship?: string; // For formal issue links e.g. "blocks", "relates to"
        source: "description" | "comment";
        commentId?: string;
      }[];
    }
Behavior2/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 states the tool retrieves data ('Get'), implying a read-only operation, but does not specify whether it requires authentication, has rate limits, returns paginated results, or handles errors. For a tool with no annotations, this leaves significant gaps in understanding its behavior and constraints.

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, clear sentence: 'Get all child issues in an epic including their comments.' It is front-loaded with the core purpose, avoids redundancy, and uses minimal words to convey essential information. Every part of the sentence earns its place by specifying what is retrieved and what is included.

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 (retrieving nested data with comments), lack of annotations, and no output schema, the description is minimally adequate. It states what the tool does but does not cover behavioral aspects like response format, error handling, or performance considerations. For a read operation with no structured output, more context would be helpful, but it meets the basic threshold.

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 single parameter 'epicKey' documented as 'The key of the epic issue.' The description does not add any additional meaning beyond this, such as format examples or validation rules. According to the rules, when schema coverage is high (>80%), the baseline score is 3, as the schema adequately handles parameter documentation.

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 tool's purpose: 'Get all child issues in an epic including their comments.' It specifies the verb ('Get'), resource ('child issues in an epic'), and scope ('including their comments'), which is specific and actionable. However, it does not explicitly distinguish this tool from sibling tools like 'get_issue' or 'search_issues,' which could also retrieve issue-related data, preventing a score of 5.

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 does not mention prerequisites, such as needing an epic key, or compare it to siblings like 'get_issue' (for single issues) or 'search_issues' (for broader queries). Without any context on usage scenarios or exclusions, the agent must infer when this tool is appropriate.

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

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