feat(logging): trace credential source and config path in login tool
All checks were successful
Build and Push Docker Image / build (push) Successful in 39s
All checks were successful
Build and Push Docker Image / build (push) Successful in 39s
Add diagnostic logging to the MCP login tool handler: - Log whether username/password were provided explicitly - If falling back to config, log the resolved config path and whether it exists - This complements upstream scraper v0.6.18 credential diagnostics Bumps version to 0.2.1.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "schwab-mcp-custom"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
description = "MCP server wrapping schwab-scraper"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
|
||||
@@ -265,7 +265,14 @@ async def login(
|
||||
|
||||
mcp_logger = logging.getLogger("schwab_mcp_custom")
|
||||
mcp_logger.info("=== LOGIN TOOL CALLED ===")
|
||||
mcp_logger.info(f"debug={debug}, username_provided={bool(username)}")
|
||||
mcp_logger.info(f"debug={debug}, username_provided={bool(username)}, password_provided={bool(password)}")
|
||||
|
||||
# Diagnostic: if credentials not provided, show what config path would be used
|
||||
if not username or not password:
|
||||
from schwab_scraper.core.config import get_config_path
|
||||
config_path = get_config_path()
|
||||
config_exists = os.path.exists(config_path)
|
||||
mcp_logger.info(f"Config fallback: path={config_path}, exists={config_exists}")
|
||||
|
||||
with capture_logs(level=logging.DEBUG if debug else logging.INFO) as log_buf:
|
||||
mcp_logger.info("capture_logs context entered")
|
||||
|
||||
Reference in New Issue
Block a user