fix start_auth tool

This commit is contained in:
Taylor Wilsdon
2025-06-07 17:18:35 -04:00
parent 2da4147b39
commit c54e8d30db
2 changed files with 22 additions and 26 deletions

View File

@@ -189,9 +189,5 @@ async def start_google_auth(
redirect_uri=redirect_uri
)
# Extract content from CallToolResult and raise exception if error
if auth_result.isError:
error_text = auth_result.content[0].text if auth_result.content else "Authentication flow failed"
raise Exception(error_text)
else:
return auth_result.content[0].text if auth_result.content else "Authentication initiated"
# auth_result is now a plain string, not a CallToolResult
return auth_result