Skip to main content
Glama

linear_assignIssue

Assign a Linear issue to a specific team member or unassign it to manage task ownership and workflow distribution.

Instructions

Assign an issue to a user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesID or identifier of the issue to assign (e.g., ABC-123)
assigneeIdYesID of the user to assign the issue to, or null to unassign

Implementation Reference

  • The main handler function for the linear_assignIssue tool. It validates arguments using isAssignIssueArgs and calls linearService.assignIssue to perform the assignment.
    /**
     * Handler for assigning an issue to a user
     */
    export function handleAssignIssue(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          if (!isAssignIssueArgs(args)) {
            throw new Error('Invalid arguments for assignIssue');
          }
    
          return await linearService.assignIssue(args.issueId, args.assigneeId);
        } catch (error) {
          logError('Error assigning issue', error);
          throw error;
        }
      };
    }
  • The tool definition including input_schema and output_schema for linear_assignIssue.
    export const assignIssueToolDefinition: MCPToolDefinition = {
      name: 'linear_assignIssue',
      description: 'Assign an issue to a user',
      input_schema: {
        type: 'object',
        properties: {
          issueId: {
            type: 'string',
            description: 'ID or identifier of the issue to assign (e.g., ABC-123)',
          },
          assigneeId: {
            type: 'string',
            description: 'ID of the user to assign the issue to, or null to unassign',
          },
        },
        required: ['issueId', 'assigneeId'],
      },
      output_schema: {
        type: 'object',
        properties: {
          success: { type: 'boolean' },
          issue: {
            type: 'object',
            properties: {
              id: { type: 'string' },
              identifier: { type: 'string' },
              title: { type: 'string' },
              assignee: { type: 'object' },
              url: { type: 'string' },
            },
          },
        },
      },
    };
  • Registration of the linear_assignIssue tool mapping to the handleAssignIssue handler function.
    linear_assignIssue: handleAssignIssue(linearService),
  • Type guard function used in the handler to validate arguments for linear_assignIssue.
     * Type guard for linear_assignIssue tool arguments
     */
    export function isAssignIssueArgs(args: unknown): args is {
      issueId: string;
      assigneeId: string;
    } {
      return (
        typeof args === 'object' &&
        args !== null &&
        'issueId' in args &&
        typeof (args as { issueId: string }).issueId === 'string' &&
        'assigneeId' in args &&
        typeof (args as { assigneeId: string }).assigneeId === 'string'
      );
    }
  • Import of the handleAssignIssue function from issue-handlers.ts for use in tool registration.
    import {
      handleGetIssues,
      handleGetIssueById,
      handleSearchIssues,
      handleCreateIssue,
      handleUpdateIssue,
      handleCreateComment,
      handleAddIssueLabel,
      handleRemoveIssueLabel,
      // New Issue Management handlers
      handleAssignIssue,
      handleSubscribeToIssue,
      handleConvertIssueToSubtask,
      handleCreateIssueRelation,
      handleArchiveIssue,
      handleSetIssuePriority,
      handleTransferIssue,
      handleDuplicateIssue,
      handleGetIssueHistory,
      // Comment Management handlers
      handleGetComments,
    } from './issue-handlers.js';

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/tacticlaunch/mcp-linear'

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