Skip to main content
Glama
wkoutre

Linear MCP Server

by wkoutre

linear_createComment

Add comments to Linear issues to provide updates, share information, or ask questions, using Markdown formatting for clarity.

Instructions

Add a comment to an issue in Linear

Input Schema

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

Implementation Reference

  • The handler function that implements the core logic for the linear_createComment tool. It validates the input arguments using the isCreateCommentArgs type guard and calls the LinearService to create the 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;
        }
      };
    }
  • Defines the tool schema for linear_createComment, specifying input (issueId, body) and output structure.
    export const createCommentToolDefinition: MCPToolDefinition = {
      name: "linear_createComment",
      description: "Add a comment to an issue in Linear",
      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)",
          },
        },
        required: ["issueId", "body"],
      },
      output_schema: {
        type: "object",
        properties: {
          id: { type: "string" },
          body: { type: "string" },
          url: { type: "string" }
        }
      }
    };
  • Registers the linear_createComment tool in the handlers map by associating it with the handleCreateComment function curried with linearService.
    linear_createComment: handleCreateComment(linearService),
  • Type guard function used by the handler to validate input arguments for the linear_createComment tool.
     * Type guard for linear_createComment tool arguments
     */
    export function isCreateCommentArgs(args: unknown): args is {
      issueId: string;
      body: 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"
      );
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool adds a comment but does not cover critical aspects like required permissions, whether the action is reversible, rate limits, or error handling, leaving 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, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized for its simple function, with zero waste.

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 the tool is a mutation (adding a comment) with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, return values, or error cases, making it inadequate for safe and effective use by an AI agent.

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 both parameters (issueId and body). The description adds no additional meaning beyond the schema, such as examples or constraints, but does not contradict it, meeting the baseline for high schema coverage.

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'), which is specific and unambiguous. However, it does not differentiate from sibling tools like 'linear_getComments' or 'linear_updateIssue' that might also involve comments, missing explicit distinction.

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?

The description provides no guidance on when to use this tool versus alternatives, such as when to comment versus update an issue or use other issue-related tools. It lacks context on prerequisites, exclusions, or comparisons with siblings like 'linear_updateIssue' for editing comments.

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

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