jira_link_issues
Link two Jira issues by specifying inward and outward issue keys with a relationship type like 'Blocks' or 'Relates' to establish connections between tickets.
Instructions
Link two Jira issues
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inwardIssue | Yes | Inward issue key | |
| outwardIssue | Yes | Outward issue key | |
| linkType | Yes | Link type name (e.g., 'Blocks', 'Relates') |
Implementation Reference
- src/index.ts:1089-1101 (handler)MCP tool handler for 'jira_link_issues' that parses arguments using Zod schema and calls JiraClient.linkIssues method.case "jira_link_issues": { const { inwardIssue, outwardIssue, linkType } = LinkIssuesSchema.parse(args); await jiraClient.linkIssues(inwardIssue, outwardIssue, linkType); return { content: [ { type: "text", text: `Issues ${inwardIssue} and ${outwardIssue} linked with type "${linkType}"`, }, ], }; }
- src/jira-client.ts:223-236 (helper)JiraClient method implementing the issue linking logic by POSTing to Jira's /issueLink REST endpoint.async linkIssues( inwardIssue: string, outwardIssue: string, linkType: string ): Promise<void> { await this.request<void>("/issueLink", { method: "POST", body: JSON.stringify({ type: { name: linkType }, inwardIssue: { key: inwardIssue }, outwardIssue: { key: outwardIssue }, }), }); }
- src/index.ts:110-114 (schema)Zod input schema defining parameters for the jira_link_issues tool.const LinkIssuesSchema = z.object({ inwardIssue: z.string().describe("Inward issue key"), outwardIssue: z.string().describe("Outward issue key"), linkType: z.string().describe("Link type name (e.g., 'Blocks', 'Relates')"), });
- src/index.ts:409-423 (registration)Registration of the jira_link_issues tool in the MCP server's listTools response, including schema.{ name: "jira_link_issues", description: "Link two Jira issues", inputSchema: { type: "object", properties: { inwardIssue: { type: "string", description: "Inward issue key" }, outwardIssue: { type: "string", description: "Outward issue key" }, linkType: { type: "string", description: "Link type name (e.g., 'Blocks', 'Relates')", }, }, required: ["inwardIssue", "outwardIssue", "linkType"], },