delete_work_log
Remove a specific work log entry from a work item by providing project, work item, and log IDs.
Instructions
Delete a work log for a work item.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | UUID of the project | |
| work_item_id | Yes | UUID of the work item | |
| work_log_id | Yes | UUID of the work log |
Implementation Reference
- plane_mcp/tools/work_logs.py:110-130 (handler)The delete_work_log function (handler) that executes the tool logic. It is decorated with @mcp.tool(), takes project_id, work_item_id, and work_log_id as parameters, gets the Plane client context, and calls client.work_items.work_logs.delete() to delete the work log.
@mcp.tool() def delete_work_log( project_id: str, work_item_id: str, work_log_id: str, ) -> None: """ Delete a work log for a work item. Args: project_id: UUID of the project work_item_id: UUID of the work item work_log_id: UUID of the work log """ client, workspace_slug = get_plane_client_context() client.work_items.work_logs.delete( workspace_slug=workspace_slug, project_id=project_id, work_item_id=work_item_id, work_log_id=work_log_id, ) - plane_mcp/tools/__init__.py:27-49 (registration)The registration chain: register_tools() calls register_work_log_tools(mcp) which registers all work log tools (including delete_work_log) with the MCP server via the @mcp.tool() decorator.
def register_tools(mcp: FastMCP) -> None: """Register all tools with the MCP server.""" register_project_tools(mcp) register_work_item_tools(mcp) register_work_item_activity_tools(mcp) register_work_item_comment_tools(mcp) register_work_item_link_tools(mcp) register_work_item_relation_tools(mcp) register_work_log_tools(mcp) register_cycle_tools(mcp) register_user_tools(mcp) register_module_tools(mcp) register_initiative_tools(mcp) register_intake_tools(mcp) register_label_tools(mcp) register_page_tools(mcp) register_work_item_property_tools(mcp) register_work_item_type_tools(mcp) register_state_tools(mcp) register_workspace_tools(mcp) register_epic_tools(mcp) register_milestone_tools(mcp) - plane_mcp/tools/work_logs.py:11-131 (registration)The register_work_log_tools function that registers all work log tools with the MCP server. delete_work_log is defined inside this function with the @mcp.tool() decorator.
def register_work_log_tools(mcp: FastMCP) -> None: """Register all work log-related tools with the MCP server.""" @mcp.tool() def list_work_logs( project_id: str, work_item_id: str, params: dict[str, Any] | None = None, ) -> list[WorkItemWorkLog]: """ List work logs for a work item. Args: project_id: UUID of the project work_item_id: UUID of the work item params: Optional query parameters as a dictionary Returns: List of WorkItemWorkLog objects """ client, workspace_slug = get_plane_client_context() return client.work_items.work_logs.list( workspace_slug=workspace_slug, project_id=project_id, work_item_id=work_item_id, params=params, ) @mcp.tool() def create_work_log( project_id: str, work_item_id: str, duration: int | None = None, description: str | None = None, ) -> WorkItemWorkLog: """ Create a work log for a work item. Args: project_id: UUID of the project work_item_id: UUID of the work item duration: Duration of work in minutes description: Description of the work performed Returns: Created WorkItemWorkLog object """ client, workspace_slug = get_plane_client_context() data: dict[str, Any] = {} if duration is not None: data["duration"] = duration if description is not None: data["description"] = description return client.work_items.work_logs.create( workspace_slug=workspace_slug, project_id=project_id, work_item_id=work_item_id, data=data, ) @mcp.tool() def update_work_log( project_id: str, work_item_id: str, work_log_id: str, duration: int | None = None, description: str | None = None, ) -> WorkItemWorkLog: """ Update a work log for a work item. Args: project_id: UUID of the project work_item_id: UUID of the work item work_log_id: UUID of the work log duration: Duration of work in minutes description: Description of the work performed Returns: Updated WorkItemWorkLog object """ client, workspace_slug = get_plane_client_context() data: dict[str, Any] = {} if duration is not None: data["duration"] = duration if description is not None: data["description"] = description return client.work_items.work_logs.update( workspace_slug=workspace_slug, project_id=project_id, work_item_id=work_item_id, work_log_id=work_log_id, data=data, ) @mcp.tool() def delete_work_log( project_id: str, work_item_id: str, work_log_id: str, ) -> None: """ Delete a work log for a work item. Args: project_id: UUID of the project work_item_id: UUID of the work item work_log_id: UUID of the work log """ client, workspace_slug = get_plane_client_context() client.work_items.work_logs.delete( workspace_slug=workspace_slug, project_id=project_id, work_item_id=work_item_id, work_log_id=work_log_id, ) - plane_mcp/tools/work_logs.py:1-20 (helper)The file imports: FastMCP, WorkItemWorkLog model, and get_plane_client_context helper which is used by delete_work_log to obtain the client and workspace_slug.
"""Work log-related tools for Plane MCP Server.""" from typing import Any from fastmcp import FastMCP from plane.models.work_items import WorkItemWorkLog from plane_mcp.client import get_plane_client_context def register_work_log_tools(mcp: FastMCP) -> None: """Register all work log-related tools with the MCP server.""" @mcp.tool() def list_work_logs( project_id: str, work_item_id: str, params: dict[str, Any] | None = None, ) -> list[WorkItemWorkLog]: """ - plane_mcp/tools/__init__.py:23-23 (registration)The import statement that brings register_work_log_tools into the tools package's __init__.py.
from plane_mcp.tools.work_logs import register_work_log_tools