workflowy_delete_node
Remove a WorkFlowy outline node and its nested content from your task management system using its unique identifier.
Instructions
Delete a WorkFlowy node and all its children
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes |
Implementation Reference
- src/workflowy_mcp/server.py:231-254 (handler)MCP tool registration and handler function for 'workflowy_delete_node'. Delegates to WorkFlowyClient.delete_node with rate limiting and error handling.@mcp.tool(name="workflowy_delete_node", description="Delete a WorkFlowy node and all its children") async def delete_node(node_id: str) -> dict: """Delete a WorkFlowy node and all its children. Args: node_id: The ID of the node to delete Returns: Dictionary with success status """ client = get_client() if _rate_limiter: await _rate_limiter.acquire() try: success = await client.delete_node(node_id) if _rate_limiter: _rate_limiter.on_success() return {"success": success, "deleted_id": node_id} except Exception as e: if _rate_limiter and hasattr(e, "__class__") and e.__class__.__name__ == "RateLimitError": _rate_limiter.on_rate_limit(getattr(e, "retry_after", None)) raise
- Core implementation in WorkFlowyClient that performs the HTTP DELETE request to the WorkFlowy API endpoint /nodes/{node_id} and handles responses/errors.async def delete_node(self, node_id: str) -> bool: """Delete a node and all its children.""" try: response = await self.client.delete(f"/nodes/{node_id}") # Delete endpoint returns just a message, not nested data await self._handle_response(response) return True except httpx.TimeoutException as err: raise TimeoutError("delete_node") from err except httpx.NetworkError as e: raise NetworkError(f"Network error: {str(e)}") from e