Skip to main content
Glama

linear_removeIssueLabel

Remove a label from an issue in Linear to maintain accurate issue categorization and organization within your project management workflow.

Instructions

Remove a label from an issue in Linear

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesID or identifier of the issue to remove the label from (e.g., ABC-123)
labelIdYesID of the label to remove from the issue

Implementation Reference

  • The main handler function that executes the tool logic: validates input arguments using type guard and calls the LinearService to remove the label from the issue.
    export function handleRemoveIssueLabel(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          if (!isRemoveIssueLabelArgs(args)) {
            throw new Error('Invalid arguments for removeIssueLabel');
          }
    
          return await linearService.removeIssueLabel(args.issueId, args.labelId);
        } catch (error) {
          logError('Error removing label from issue', error);
          throw error;
        }
      };
    }
  • The MCP tool definition including name, description, input schema (issueId and labelId required), and output schema.
    export const removeIssueLabelToolDefinition: MCPToolDefinition = {
      name: 'linear_removeIssueLabel',
      description: 'Remove a label from an issue in Linear',
      input_schema: {
        type: 'object',
        properties: {
          issueId: {
            type: 'string',
            description: 'ID or identifier of the issue to remove the label from (e.g., ABC-123)',
          },
          labelId: {
            type: 'string',
            description: 'ID of the label to remove from the issue',
          },
        },
        required: ['issueId', 'labelId'],
      },
      output_schema: {
        type: 'object',
        properties: {
          success: { type: 'boolean' },
          issueId: { type: 'string' },
          labelId: { type: 'string' },
        },
      },
    };
  • Registration of the tool handler in the registerToolHandlers function, mapping 'linear_removeIssueLabel' to handleRemoveIssueLabel.
    linear_addIssueLabel: handleAddIssueLabel(linearService),
    linear_removeIssueLabel: handleRemoveIssueLabel(linearService),
  • Type guard function to validate the input arguments for the tool (issueId and labelId as strings).
    export function isRemoveIssueLabelArgs(args: unknown): args is {
      issueId: string;
      labelId: string;
    } {
      return (
        typeof args === 'object' &&
        args !== null &&
        'issueId' in args &&
        typeof (args as { issueId: string }).issueId === 'string' &&
        'labelId' in args &&
        typeof (args as { labelId: string }).labelId === 'string'
      );
    }
  • Core service method implementing the label removal: fetches the issue and current labels, filters out the target label, and updates the issue using Linear SDK.
    async removeIssueLabel(issueId: string, labelId: string) {
      // Get the issue
      const issue = await this.client.issue(issueId);
    
      if (!issue) {
        throw new Error(`Issue not found: ${issueId}`);
      }
    
      // Get the current labels
      const currentLabels = await issue.labels();
      const currentLabelIds = currentLabels.nodes.map((label) => label.id);
    
      // Filter out the label ID to remove
      const updatedLabelIds = currentLabelIds.filter((id) => id !== labelId);
    
      // Only update if the label was actually present
      if (currentLabelIds.length !== updatedLabelIds.length) {
        await issue.update({
          labelIds: updatedLabelIds,
        });
      }
    
      return {
        success: true,
        issueId: issue.id,
        labelId,
      };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Remove a label') but doesn't cover critical aspects like required permissions, whether the operation is reversible, error conditions (e.g., if the label isn't attached), or what happens on success/failure. This leaves significant gaps for a mutation tool.

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, direct sentence with zero wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse at a glance.

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 lacks information on behavioral traits (e.g., side effects, error handling), usage context, and expected outcomes. While the schema covers parameters well, the overall context for safe and effective use is insufficient.

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%, with both parameters ('issueId' and 'labelId') clearly documented in the schema. The description doesn't add any meaning beyond what the schema provides (e.g., it doesn't explain where to find these IDs or format details), so the baseline score of 3 is appropriate given the 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 verb ('Remove') and resource ('a label from an issue in Linear'), making the purpose immediately understandable. It distinguishes from sibling tools like 'linear_addIssueLabel' by specifying removal rather than addition, though it doesn't explicitly contrast with other label-related operations beyond the obvious inverse.

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. While the name implies it's for removing labels, there's no mention of prerequisites (e.g., the label must already be attached), when not to use it, or how it differs from other mutation tools like 'linear_updateIssue' that might handle labels differently.

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

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