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
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes | The uuid identifier of the issue to get | |
| project_id | Yes | The uuid identifier of the project to get issues for |
Implementation Reference
- src/tools/issues.ts:132-145 (handler)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), }, ], }; }
- src/tools/issues.ts:128-131 (schema)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"), },
- src/tools/issues.ts:125-146 (registration)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), }, ], }; } );
- src/common/request-helper.ts:3-36 (helper)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; } }