Except of the name of creation tool, what specific difference are you going to manage?
I only want the name of creation tool no specific difference i am going to manage.
I am not sure there is any direct way to detect this and even afraid is not.
What you could check is some of pathPoints properties assuming the result with more or less accuracy.
If first pathPoint type is not "SMOOTH" ==> pen was used
if (app.selection.paths.pathPoints.pointType != PointType.SMOOTH) alert ("probably drawn by pen"); else alert ("probably drawn by pencil")