drive_* — Google Drive
The Google Drive tool namespace — listing and searching files, reading/creating/updating Google Docs, file metadata, and folder create/move — with the "Sheets is not Drive" caveat.
The drive_* family handles Google Drive files and Google Docs: list,
search, read/create/update Docs, metadata, and folder operations. It’s mostly
read-and-organize, with Docs being the one content type it can write.
Finding files
drive_list_files
drive_list_files(query=None, page_size=20, order_by="modifiedTime desc")
query accepts Drive query syntax; default ordering is most-recently-modified
first.
drive_search_files
drive_search_files(name_contains, page_size=20, mime_type=None)
Filename search — the quick path when you know part of the name. Narrow by
mime_type (e.g. to folders or a specific doc type).
drive_get_file_metadata
drive_get_file_metadata(file_id)
Google Docs
drive_read_google_doc
drive_read_google_doc(document_id)
Returns the Doc’s text content.
drive_create_google_doc
drive_create_google_doc(title, content=None, parent_folder_id=None)
Create a Doc, optionally seeded with content and placed in
parent_folder_id.
drive_update_google_doc
drive_update_google_doc(document_id, content, mode="append")
mode="append" (default) adds to the end; mode="replace" overwrites all
content.
Folders
drive_create_folder / drive_move_file
drive_create_folder(name, parent_folder_id=None)
drive_move_file(file_id, folder_id)
drive_move_file works on files and folders.