update_worklog
Modify an existing worklog in Plane MCP Server by updating fields like description, duration, and timestamps using project, issue, and worklog identifiers. Simplifies work item management within project workflows.
Instructions
Update an existing worklog
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes | The uuid identifier of the issue containing the worklog | |
| project_id | Yes | The uuid identifier of the project containing the issue | |
| worklog_data | Yes | The fields to update on the worklog | |
| worklog_id | Yes | The uuid identifier of the worklog to update |
Implementation Reference
- src/tools/work-log.ts:92-106 (handler)The handler function for the 'update_worklog' tool, which makes a PATCH request to the Plane API to update the specified worklog.async ({ project_id, issue_id, worklog_id, worklog_data }) => { const response = await makePlaneRequest( "PATCH", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/issues/${issue_id}/worklogs/${worklog_id}/`, worklog_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
- src/tools/work-log.ts:83-107 (registration)Direct registration of the 'update_worklog' tool using server.tool(), including name, description, input schema, and handler.server.tool( "update_worklog", "Update an existing worklog", { 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 containing the worklog"), worklog_id: z.string().describe("The uuid identifier of the worklog to update"), worklog_data: IssueWorkLog.partial().describe("The fields to update on the worklog"), }, async ({ project_id, issue_id, worklog_id, worklog_data }) => { const response = await makePlaneRequest( "PATCH", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/issues/${issue_id}/worklogs/${worklog_id}/`, worklog_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } );
- src/schemas.ts:241-252 (schema)Zod schema definition for IssueWorkLog, which is used in the tool's input schema for worklog_data via IssueWorkLog.partial().export const IssueWorkLog = z.object({ issue_id: z.string().uuid(), description: z.string().optional(), logged_by_id: z.string().uuid(), duration: z.number().int().min(0).describe("The duration of the worklog in minutes"), created_at: z.string().datetime(), updated_at: z.string().datetime(), project_id: z.string().uuid(), workspace_id: z.string().uuid(), }); export type IssueWorkLog = z.infer<typeof IssueWorkLog>;