remove_work_item_from_module
Remove a work item from a module by providing project, module, and work item IDs.
Instructions
Remove a work item from a module.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | UUID of the project | |
| module_id | Yes | UUID of the module | |
| work_item_id | Yes | UUID of the work item to remove |
Implementation Reference
- plane_mcp/tools/modules.py:229-250 (handler)The handler function that executes the 'remove_work_item_from_module' tool logic. It calls client.modules.remove_work_item with the workspace slug, project ID, module ID, and work item ID.
@mcp.tool() def remove_work_item_from_module( project_id: str, module_id: str, work_item_id: str, ) -> None: """ Remove a work item from a module. Args: workspace_slug: The workspace slug identifier project_id: UUID of the project module_id: UUID of the module work_item_id: UUID of the work item to remove """ client, workspace_slug = get_plane_client_context() client.modules.remove_work_item( workspace_slug=workspace_slug, project_id=project_id, module_id=module_id, work_item_id=work_item_id, ) - plane_mcp/tools/modules.py:229-250 (registration)The @mcp.tool() decorator registers this function as an MCP tool. The tool is registered inside register_module_tools(), which is called from register_tools() in plane_mcp/tools/__init__.py.
@mcp.tool() def remove_work_item_from_module( project_id: str, module_id: str, work_item_id: str, ) -> None: """ Remove a work item from a module. Args: workspace_slug: The workspace slug identifier project_id: UUID of the project module_id: UUID of the module work_item_id: UUID of the work item to remove """ client, workspace_slug = get_plane_client_context() client.modules.remove_work_item( workspace_slug=workspace_slug, project_id=project_id, module_id=module_id, work_item_id=work_item_id, ) - plane_mcp/client.py:21-74 (helper)The get_plane_client_context() helper function used by the handler to obtain the PlaneClient instance and workspace slug.
def get_plane_client_context() -> PlaneClientContext: """ Initialize and return a PlaneClient instance with workspace context. Authentication is handled by the PlaneOAuthProvider, which supports: 1. Environment variables (PLANE_API_KEY + PLANE_WORKSPACE_SLUG) 2. HTTP headers (x-api-key + x-workspace-slug) 3. OAuth access token Environment variables: - PLANE_INTERNAL_BASE_URL: Internal URL for Plane API (preferred for server-to-server calls) - PLANE_BASE_URL: Base URL for Plane API (fallback, default: https://api.plane.so) Returns: PlaneClientContext containing configured PlaneClient instance and workspace slug Raises: ConfigurationError: If access token is not available or workspace slug is missing """ base_url = os.getenv("PLANE_INTERNAL_BASE_URL") or os.getenv("PLANE_BASE_URL", "https://api.plane.so") workspace_slug = os.getenv("PLANE_WORKSPACE_SLUG", "") api_key = os.getenv("PLANE_API_KEY", "") access_token = None # Get access token from the OAuth provider (which handles all auth methods) stored_access_token: AccessToken | None = get_access_token() if stored_access_token: # Determine authentication method to use appropriate PlaneClient constructor auth_method = stored_access_token.claims.get("auth_method", "oauth") token = stored_access_token.token workspace_slug = stored_access_token.claims.get("workspace_slug", "") # For API key auth methods, use api_key parameter; for OAuth, use access_token if auth_method in ("api_key_env", "api_key_header"): api_key = token else: access_token = token if access_token: client = PlaneClient( base_url=base_url, access_token=access_token, ) else: client = PlaneClient( base_url=base_url, api_key=api_key, ) return PlaneClientContext( client=client, workspace_slug=workspace_slug, ) - plane_mcp/tools/modules.py:229-250 (schema)The function signature defines the input schema: project_id (str), module_id (str), and work_item_id (str) parameters.
@mcp.tool() def remove_work_item_from_module( project_id: str, module_id: str, work_item_id: str, ) -> None: """ Remove a work item from a module. Args: workspace_slug: The workspace slug identifier project_id: UUID of the project module_id: UUID of the module work_item_id: UUID of the work item to remove """ client, workspace_slug = get_plane_client_context() client.modules.remove_work_item( workspace_slug=workspace_slug, project_id=project_id, module_id=module_id, work_item_id=work_item_id, )