Add tests for tool auto-detection.