Skip to main content
Glama

assign_issue

Assign Jira issues to specific users using account IDs or email addresses, or remove assignments by setting assignee to -1 for proper task allocation.

Instructions

Assign a Jira issue to a user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assigneeYesUser account ID, email (will auto-lookup account ID), or "-1" to unassign
issueKeyYesThe issue key to assign (e.g., PROJ-123)

Implementation Reference

  • The main handler function that implements the assign_issue tool logic. It validates inputs, resolves assignee to account ID (or unassigns if '-1'), makes a PUT request to the Jira API endpoint `/issue/{issueKey}/assignee`, and returns a success or formatted error message.
    async handleAssignIssue(args: any) { try { const { issueKey, assignee } = args; if (!issueKey || !assignee) { throw new Error('issueKey and assignee are required'); } let assigneeData; let assigneeText; if (assignee === '-1') { assigneeData = { accountId: null }; assigneeText = 'unassigned'; } else { // Auto-resolve email to account ID if needed const accountId = await this.userHandlers.resolveUserToAccountId(assignee); assigneeData = { accountId: accountId }; assigneeText = `assigned to ${assignee}`; } await this.apiClient.put(`/issue/${issueKey}/assignee`, assigneeData); return { content: [ { type: 'text', text: `✅ Issue ${issueKey} ${assigneeText} successfully!`, }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: JiraFormatters.formatError(error), }, ], isError: true, }; } }
  • The input schema and metadata definition for the assign_issue tool, including description and required parameters.
    { name: 'assign_issue', description: 'Assign a Jira issue to a user', inputSchema: { type: 'object', properties: { issueKey: { type: 'string', description: 'The issue key to assign (e.g., PROJ-123)', }, assignee: { type: 'string', description: 'User account ID, email (will auto-lookup account ID), or "-1" to unassign', }, }, required: ['issueKey', 'assignee'], }, },
  • src/index.ts:104-105 (registration)
    The dispatch registration in the main server switch statement that routes assign_issue tool calls to the IssueHandlers.handleAssignIssue method.
    case 'assign_issue': return this.issueHandlers.handleAssignIssue(request.params.arguments);

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

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