Skip to main content
Glama

assign_issue

Assign a Jira issue to a specific user or unassign it using issue key and assignee details for task management.

Instructions

Assign a Jira issue to a user

Input Schema

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

Implementation Reference

  • The main handler function `handleAssignIssue` that executes the tool logic: validates args, resolves assignee to account ID if needed (using helper), calls Jira API to assign/unassign the issue, and returns formatted success/error response.
    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,
        };
      }
    }
  • Input schema definition for the 'assign_issue' tool within the toolDefinitions array, defining parameters, descriptions, and requirements.
    {
      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)
    Tool registration in the MCP server's CallToolRequestSchema handler switch statement, routing 'assign_issue' calls to the IssueHandlers.handleAssignIssue method.
    case 'assign_issue':
      return this.issueHandlers.handleAssignIssue(request.params.arguments);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits. It doesn't mention required permissions, whether assignment is reversible, rate limits, error conditions, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is inadequate.

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, efficient sentence with zero waste. It's front-loaded with the core purpose and appropriately sized for a simple tool with good schema documentation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns, error handling, permissions needed, or side effects. Given the complexity of assignment operations in Jira, more context is warranted.

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?

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds no additional meaning beyond what's in the schema (e.g., no examples beyond 'PROJ-123', no clarification of '-1' behavior). Baseline 3 is appropriate when schema does the heavy lifting.

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 action ('assign') and resource ('a Jira issue to a user'), making the purpose immediately understandable. It distinguishes from siblings like 'update_issue' or 'transition_issue' by focusing specifically on assignment, though it doesn't explicitly mention these alternatives.

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?

No guidance is provided on when to use this tool versus alternatives like 'update_issue' (which might also handle assignment) or 'unassign' scenarios. The description implies usage for assignment but offers no context about prerequisites, permissions, or when not to use it.

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

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