Handles the execution of a specific tool by processing its arguments and optionally handling its result.