update_issue
Modify existing Jira issue fields including summary, description, priority, assignee, labels, and custom fields to keep project tracking current.
Instructions
Update fields of an existing Jira issue. TIP: Use get_create_metadata to discover available custom fields and their allowed values for the project.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assignee | No | New assignee account ID or email (will auto-lookup account ID from email) - optional | |
| customFields | No | Custom fields as key-value pairs (e.g., {"customfield_10000": "value"}) - optional. Use get_create_metadata to discover available fields. | |
| description | No | New description in ADF format or plain string - optional | |
| issueKey | Yes | The issue key to update (e.g., PROJ-123) | |
| labels | No | New labels array - optional | |
| priority | No | New priority name - optional | |
| summary | No | New summary/title - optional |
Implementation Reference
- src/handlers/issue-handlers.ts:151-228 (handler)The core handler function `handleUpdateIssue` that destructures arguments, validates issueKey, constructs updateData with field updates (including ADF conversion for description and user ID resolution for assignee), calls Jira API PUT /issue/{issueKey}, and returns formatted success or error response.async handleUpdateIssue(args: any) { try { const { issueKey, summary, description, priority, assignee, labels, customFields } = args; if (!issueKey) { throw new Error('issueKey is required'); } const updateData: any = { fields: {} }; if (summary) updateData.fields.summary = summary; // Handle description - convert to ADF format if it's plain text if (description) { if (typeof description === 'string') { // Convert plain text to Atlassian Document Format updateData.fields.description = { type: 'doc', version: 1, content: [ { type: 'paragraph', content: [ { type: 'text', text: description, }, ], }, ], }; } else { // Already in ADF format updateData.fields.description = description; } } if (priority) updateData.fields.priority = { name: priority }; if (assignee) { // Auto-resolve email to account ID if needed const accountId = await this.userHandlers.resolveUserToAccountId(assignee); updateData.fields.assignee = { id: accountId }; } if (labels) updateData.fields.labels = labels; // Merge custom fields if (customFields && typeof customFields === 'object') { Object.assign(updateData.fields, customFields); } if (Object.keys(updateData.fields).length === 0) { throw new Error('At least one field to update must be provided'); } await this.apiClient.put(`/issue/${issueKey}`, updateData); return { content: [ { type: 'text', text: `✅ Issue ${issueKey} updated successfully!`, }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: JiraFormatters.formatError(error), }, ], isError: true, }; } }
- src/tools/definitions.ts:59-96 (schema)Tool definition including name, description, and detailed inputSchema specifying parameters (issueKey required, others optional) with types and descriptions for the 'update_issue' tool.{ name: 'update_issue', description: 'Update fields of an existing Jira issue. TIP: Use get_create_metadata to discover available custom fields and their allowed values for the project.', inputSchema: { type: 'object', properties: { issueKey: { type: 'string', description: 'The issue key to update (e.g., PROJ-123)', }, summary: { type: 'string', description: 'New summary/title - optional', }, description: { description: 'New description in ADF format or plain string - optional', }, priority: { type: 'string', description: 'New priority name - optional', }, assignee: { type: 'string', description: 'New assignee account ID or email (will auto-lookup account ID from email) - optional', }, labels: { type: 'array', items: { type: 'string' }, description: 'New labels array - optional', }, customFields: { type: 'object', description: 'Custom fields as key-value pairs (e.g., {"customfield_10000": "value"}) - optional. Use get_create_metadata to discover available fields.', }, }, required: ['issueKey'], }, },
- src/index.ts:102-103 (registration)Registration of the 'update_issue' tool in the MCP CallToolRequestSchema handler's switch statement, routing calls to the issueHandlers.handleUpdateIssue method.case 'update_issue': return this.issueHandlers.handleUpdateIssue(request.params.arguments);