get_issue_worklogs
Retrieve all worklogs associated with a specific issue in a project using the Plane MCP Server, facilitating detailed tracking and management of task progress.
Instructions
Get all worklogs for a specific issue
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes | The uuid identifier of the issue to get worklogs for | |
| project_id | Yes | The uuid identifier of the project containing the issue |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"issue_id": {
"description": "The uuid identifier of the issue to get worklogs for",
"type": "string"
},
"project_id": {
"description": "The uuid identifier of the project containing the issue",
"type": "string"
}
},
"required": [
"project_id",
"issue_id"
],
"type": "object"
}
Implementation Reference
- src/tools/work-log.ts:15-28 (handler)The core handler function that fetches worklogs via a GET request to the Plane API for the specified project and issue, returning the JSON response as MCP text content.async ({ project_id, issue_id }) => { const response = await makePlaneRequest( "GET", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/issues/${issue_id}/worklogs/` ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
- src/tools/work-log.ts:11-14 (schema)Input schema defined using Zod, requiring project_id and issue_id as strings.{ project_id: z.string().describe("The uuid identifier of the project containing the issue"), issue_id: z.string().describe("The uuid identifier of the issue to get worklogs for"), },
- src/tools/work-log.ts:8-29 (registration)Direct registration of the get_issue_worklogs tool on the MCP server within the registerWorkLogTools function, including name, description, input schema, and inline handler.server.tool( "get_issue_worklogs", "Get all worklogs for a specific issue", { project_id: z.string().describe("The uuid identifier of the project containing the issue"), issue_id: z.string().describe("The uuid identifier of the issue to get worklogs for"), }, async ({ project_id, issue_id }) => { const response = await makePlaneRequest( "GET", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/issues/${issue_id}/worklogs/` ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } );
- src/common/request-helper.ts:3-36 (helper)Utility function called by the handler to perform authenticated HTTP requests to the Plane API using axios.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; } }
- src/tools/index.ts:24-24 (registration)Invocation of registerWorkLogTools in the central tools registration function, which includes the get_issue_worklogs tool.registerWorkLogTools(server);