Add support for tool mode