Skip to main content
Glama

assign_ticket

Assign Jira tickets to specific users using the account ID and issue key. Simplifies ticket management by automating assignment via the Jira API.

Instructions

Assign a ticket on Jira on the api /rest/api/3/issue/{issueIdOrKey}/assignee. Do not use markdown in your query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdYesThe account id of the assignee
issueIdOrKeyYesThe issue id or key

Implementation Reference

  • The core handler function that implements the assign_ticket tool logic by sending a PUT request to Jira's assignee endpoint to assign the ticket to the specified account.
    async function assignTicket( accountId: string, issueIdOrKey: string, ): Promise<any> { try { const response = await axios.put( `${JIRA_URL}/rest/api/3/issue/${issueIdOrKey}/assignee`, { accountId, }, { headers: getAuthHeaders().headers, }, ); return response.data; } catch (error: any) { return { error: error.response.data, }; } }
  • src/index.ts:209-226 (registration)
    Registration of the 'assign_ticket' tool with the MCP server, including the tool name, description, and input schema definition.
    name: 'assign_ticket', description: 'Assign a ticket on Jira on the api /rest/api/3/issue/{issueIdOrKey}/assignee. Do not use markdown in your query.', inputSchema: { type: 'object', properties: { accountId: { type: 'string', description: 'The account id of the assignee', }, issueIdOrKey: { type: 'string', description: 'The issue id or key', }, }, required: ['accountId', 'issueIdOrKey'], }, },
  • Input schema definition for the assign_ticket tool, specifying parameters accountId and issueIdOrKey.
    inputSchema: { type: 'object', properties: { accountId: { type: 'string', description: 'The account id of the assignee', }, issueIdOrKey: { type: 'string', description: 'The issue id or key', }, }, required: ['accountId', 'issueIdOrKey'], },
  • Dispatch handler in the CallToolRequestSchema that validates input, calls the assignTicket function, and formats the response for MCP.
    case 'assign_ticket': { const accountId: any = request.params.arguments?.accountId; const issueIdOrKey: any = request.params.arguments?.issueIdOrKey; if (!accountId || !issueIdOrKey) { throw new Error('Account id and issue id or key are required'); } const response = await assignTicket(accountId, issueIdOrKey); return { content: [ { type: 'text', text: 'Ticket assigned : ' + JSON.stringify(response, null, 2), }, ], }; }

Other Tools

Related 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/KS-GEN-AI/jira-mcp-server'

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