further refinement of tool_origin functionality