fix: Reduce logging spam for MCP tools without authentication

Users were getting spammed with this log even though their tools didn't require authentication. To fix, reduce the log level to DEBUG so that it doesn't show up by default.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 828161281
This commit is contained in:
Kathy Wu
2025-11-04 15:34:24 -08:00
committed by Copybara-Service
parent 432d30af48
commit 11571c37ab
@@ -69,10 +69,9 @@ class BaseAuthenticatedTool(BaseTool):
if auth_config and auth_config.auth_scheme:
self._credentials_manager = CredentialManager(auth_config=auth_config)
else:
logger.warning(
"auth_config or auth_config.auth_scheme is missing. Will skip"
" authentication.Using FunctionTool instead if authentication is not"
" required."
logger.debug(
"auth_config or auth_config.auth_scheme is missing, so authentication"
" will be skipped."
)
self._credentials_manager = None
self._response_for_auth_required = response_for_auth_required