Skip to main content
Glama

linear_createComment

Add comments to Linear issues to provide updates, ask questions, or reply in threads for better team collaboration.

Instructions

Add a comment to an issue in Linear (supports threaded replies)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesID or identifier of the issue to comment on (e.g., ABC-123)
bodyYesText of the comment (Markdown supported)
parentIdNoID of the parent comment to reply to (for threaded comments)

Implementation Reference

  • The handler function that implements the core logic for the linear_createComment tool. It performs input validation and calls the Linear service to create the comment.
    /**
     * Handler for creating a comment
     */
    export function handleCreateComment(linearService: LinearService) {
      return async (args: unknown) => {
        try {
          if (!isCreateCommentArgs(args)) {
            throw new Error('Invalid arguments for createComment');
          }
    
          return await linearService.createComment(args);
        } catch (error) {
          logError('Error creating comment', error);
          throw error;
        }
      };
    }
  • The MCP tool definition for linear_createComment, including input and output schemas.
    export const createCommentToolDefinition: MCPToolDefinition = {
      name: 'linear_createComment',
      description: 'Add a comment to an issue in Linear (supports threaded replies)',
      input_schema: {
        type: 'object',
        properties: {
          issueId: {
            type: 'string',
            description: 'ID or identifier of the issue to comment on (e.g., ABC-123)',
          },
          body: {
            type: 'string',
            description: 'Text of the comment (Markdown supported)',
          },
          parentId: {
            type: 'string',
            description: 'ID of the parent comment to reply to (for threaded comments)',
          },
        },
        required: ['issueId', 'body'],
      },
      output_schema: {
        type: 'object',
        properties: {
          id: { type: 'string' },
          body: { type: 'string' },
          url: { type: 'string' },
          parentId: { type: 'string' },
        },
      },
    };
  • The registration of the linear_createComment handler within the tool handlers registry function.
    export function registerToolHandlers(linearService: LinearService) {
      return {
        // User tools
        linear_getViewer: handleGetViewer(linearService),
        linear_getOrganization: handleGetOrganization(linearService),
        linear_getUsers: handleGetUsers(linearService),
        linear_getLabels: handleGetLabels(linearService),
    
        // Team tools
        linear_getTeams: handleGetTeams(linearService),
        linear_getWorkflowStates: handleGetWorkflowStates(linearService),
    
        // Project tools
        linear_getProjects: handleGetProjects(linearService),
        linear_createProject: handleCreateProject(linearService),
    
        // Project Management tools
        linear_updateProject: handleUpdateProject(linearService),
        linear_addIssueToProject: handleAddIssueToProject(linearService),
        linear_getProjectIssues: handleGetProjectIssues(linearService),
    
        // Cycle Management tools
        linear_getCycles: handleGetCycles(linearService),
        linear_getActiveCycle: handleGetActiveCycle(linearService),
        linear_addIssueToCycle: handleAddIssueToCycle(linearService),
    
        // Initiative Management tools
        linear_getInitiatives: getInitiativesHandler(linearService),
        linear_getInitiativeById: getInitiativeByIdHandler(linearService),
        linear_createInitiative: createInitiativeHandler(linearService),
        linear_updateInitiative: updateInitiativeHandler(linearService),
        linear_archiveInitiative: archiveInitiativeHandler(linearService),
        linear_unarchiveInitiative: unarchiveInitiativeHandler(linearService),
        linear_deleteInitiative: deleteInitiativeHandler(linearService),
        linear_getInitiativeProjects: getInitiativeProjectsHandler(linearService),
        linear_addProjectToInitiative: addProjectToInitiativeHandler(linearService),
        linear_removeProjectFromInitiative: removeProjectFromInitiativeHandler(linearService),
    
        // Issue tools
        linear_getIssues: handleGetIssues(linearService),
        linear_getIssueById: handleGetIssueById(linearService),
        linear_searchIssues: handleSearchIssues(linearService),
        linear_createIssue: handleCreateIssue(linearService),
        linear_updateIssue: handleUpdateIssue(linearService),
        linear_createComment: handleCreateComment(linearService),
        linear_addIssueLabel: handleAddIssueLabel(linearService),
        linear_removeIssueLabel: handleRemoveIssueLabel(linearService),
    
        // New Issue Management tools
        linear_assignIssue: handleAssignIssue(linearService),
        linear_subscribeToIssue: handleSubscribeToIssue(linearService),
        linear_convertIssueToSubtask: handleConvertIssueToSubtask(linearService),
        linear_createIssueRelation: handleCreateIssueRelation(linearService),
        linear_archiveIssue: handleArchiveIssue(linearService),
        linear_setIssuePriority: handleSetIssuePriority(linearService),
        linear_transferIssue: handleTransferIssue(linearService),
        linear_duplicateIssue: handleDuplicateIssue(linearService),
        linear_getIssueHistory: handleGetIssueHistory(linearService),
    
        // Comment Management tools
        linear_getComments: handleGetComments(linearService),
      };
    }
  • Type guard function used by the handler to validate input arguments for linear_createComment.
    /**
     * Type guard for linear_createComment tool arguments
     */
    export function isCreateCommentArgs(args: unknown): args is {
      issueId: string;
      body: string;
      parentId?: string;
    } {
      return (
        typeof args === 'object' &&
        args !== null &&
        'issueId' in args &&
        typeof (args as { issueId: string }).issueId === 'string' &&
        'body' in args &&
        typeof (args as { body: string }).body === 'string' &&
        (!('parentId' in args) || typeof (args as { parentId: string }).parentId === 'string')
      );
    }
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 mentions support for threaded replies, missing critical behavioral details like authentication requirements, rate limits, whether comments are editable/deletable, or response format. It doesn't contradict annotations, but offers minimal transparency beyond basic functionality.

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 that front-loads the core purpose ('Add a comment to an issue in Linear') and adds a useful note on threaded replies. There is no wasted verbiage, making it appropriately sized and well-structured.

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?

Given no annotations, no output schema, and a mutation tool with 3 parameters, the description is incomplete. It lacks details on behavioral traits (e.g., permissions, side effects), response expectations, and error handling, leaving significant gaps for an AI agent to understand tool usage fully.

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 fully documents parameters (issueId, body, parentId). The description adds no additional meaning beyond implying parentId enables threaded replies, which is already suggested in the schema's description. Baseline 3 is appropriate as the schema handles parameter semantics adequately.

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 ('Add a comment') and target resource ('to an issue in Linear'), distinguishing it from siblings like linear_getComments or linear_updateIssue. However, it doesn't explicitly differentiate from potential comment-related tools not present in the sibling list, such as edit or delete comment operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for adding comments to issues, including threaded replies via parentId, but provides no explicit guidance on when to use this versus alternatives like linear_updateIssue for issue updates or linear_getComments for viewing. It lacks context on prerequisites or exclusions.

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