tools.google_oauth_tools module
Google API tools using per-user OAuth tokens.
Provides Google Drive, Gmail, and Calendar operations via Google’s REST APIs. Requires the user to have connected their Google account via the OAuth flow. Distinct from gcp_tools.py which uses service accounts.
- async tools.google_oauth_tools.google_drive_list(query='', folder_id='', limit=20, page_token='', ctx=None)[source]
- async tools.google_oauth_tools.google_drive_read(file_id, ctx=None)[source]
- Return type:
- Parameters:
file_id (str)
ctx (ToolContext | None)
- async tools.google_oauth_tools.google_drive_upload(name, content, mime_type='text/plain', folder_id='', ctx=None)[source]
- async tools.google_oauth_tools.google_gmail_list(query='', label='INBOX', limit=15, page_token='', ctx=None)[source]
- async tools.google_oauth_tools.google_gmail_read(message_id, ctx=None)[source]
- Return type:
- Parameters:
message_id (str)
ctx (ToolContext | None)
- async tools.google_oauth_tools.google_gmail_send(to, subject, body, ctx=None)[source]
- Return type:
- Parameters:
to (str)
subject (str)
body (str)
ctx (ToolContext | None)
- async tools.google_oauth_tools.google_calendar_list_events(time_min='', time_max='', calendar_id='primary', limit=20, query='', ctx=None)[source]