Skip to main content
Glama
makeplane

Plane MCP Server

Official
by makeplane

get_issue_comments

Retrieve all comments for a specific issue in Plane MCP Server by providing the project_id and issue_id as UUID parameters. Essential for detailed issue tracking and collaboration.

Instructions

Get all comments for a specific issue. This requests project_id and issue_id as uuid parameters. If you have a readable identifier, you can use the get_issue_using_readable_identifier tool to get the issue_id and project_id

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYesThe uuid identifier of the issue to get
project_idYesThe uuid identifier of the project to get issues for

Implementation Reference

  • Handler function that performs a GET request to retrieve comments for the specified issue using the makePlaneRequest helper and returns the response as a JSON text content block.
    async ({ project_id, issue_id }) => {
      const comments = await makePlaneRequest(
        "GET",
        `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/issues/${issue_id}/comments`
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(comments, null, 2),
          },
        ],
      };
    }
  • Input schema using Zod to validate project_id and issue_id parameters.
    {
      project_id: z.string().describe("The uuid identifier of the project to get issues for"),
      issue_id: z.string().describe("The uuid identifier of the issue to get"),
    },
  • Registration of the get_issue_comments tool on the MCP server, including name, description, input schema, and handler function.
    server.tool(
      "get_issue_comments",
      "Get all comments for a specific issue. This requests project_id and issue_id as uuid parameters. If you have a readable identifier, you can use the get_issue_using_readable_identifier tool to get the issue_id and project_id",
      {
        project_id: z.string().describe("The uuid identifier of the project to get issues for"),
        issue_id: z.string().describe("The uuid identifier of the issue to get"),
      },
      async ({ project_id, issue_id }) => {
        const comments = await makePlaneRequest(
          "GET",
          `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/issues/${issue_id}/comments`
        );
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(comments, null, 2),
            },
          ],
        };
      }
    );
  • Generic helper function to make authenticated HTTP requests to the Plane API using axios, used by the get_issue_comments handler.
    export async function makePlaneRequest<T>(method: string, path: string, body: any = null): Promise<T> {
      const hostUrl = process.env.PLANE_API_HOST_URL || "https://api.plane.so/";
      const host = hostUrl.endsWith("/") ? hostUrl : `${hostUrl}/`;
      const url = `${host}api/v1/${path}`;
      const headers: Record<string, string> = {
        "X-API-Key": process.env.PLANE_API_KEY || "",
      };
    
      // Only add Content-Type for non-GET requests
      if (method.toUpperCase() !== "GET") {
        headers["Content-Type"] = "application/json";
      }
    
      try {
        const config: AxiosRequestConfig = {
          url,
          method,
          headers,
        };
    
        // Only include body for non-GET requests
        if (method.toUpperCase() !== "GET" && body !== null) {
          config.data = body;
        }
    
        const response = await axios(config);
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Request failed: ${error.message}`);
        }
        throw error;
      }
    }

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/makeplane/plane-mcp-server'

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