Tools & Connectors
Google Productivity
Google Docs, Sheets, and Slides toolsets.
#Google productivity
GoogleDocsToolSet, GoogleSheetsToolSet, and GoogleSlidesToolSet
wrap the Docs, Sheets, and Slides APIs respectively. They share the
OAuth bearer token handling from
`google_workspace._shared`.
All three toolsets are content-level editors -- they assume you already
have the document/spreadsheet/presentation ID. To find one by name,
use `GoogleDriveToolSet.search_files(include_ids=True)`
and pass the returned file dict into any of these tools. The Docs /
Sheets / Slides tools accept either a raw ID string or a Drive file
dict (or a dict from another tool in the same toolset) and will pull
the right ID out.
#GoogleDocsToolSet
from maivn_tools import GoogleDocsToolSet connector = GoogleDocsToolSet(token=token_cache)| Tool | Permission | Description |
|---|---|---|
get_document(document_id) |
READ | Fetch a Doc. Accepts a raw doc ID or a Drive file dict. |
create_document(title) |
WRITE | Create a blank Doc. |
batch_update(document_id, requests, write_control) |
WRITE | Apply Docs API update requests. |
insert_text(document_id, text, index) |
WRITE | Insert text. |
replace_text(document_id, find, replace, match_case) |
WRITE | Find/replace. |
delete_content_range(document_id, start_index, end_index) |
DELETE (destructive) | Delete a range. |
#Agent-ready behavior
GoogleDocsToolSethas no list/search of its own -- useGoogleDriveToolSet.search_files(include_ids=True)to locate a Doc,
then pass the returned file dict toget_document/batch_update/insert_text/replace_text/delete_content_range. The connector readsdoc_id/document_id/documentId/file_id/idout of the dict.create_documentreturns the new Doc resource; pass itsdocumentId(or the whole dict) to the edit tools to populate it.
# Find then edit, without unwrapping IDs by hand.file = drive.search_files("Launch plan", include_ids=True)["files"][0]docs.insert_text(file, text="Status update\n")#Destructive tools
delete_content_range is tagged destructive and requiresPermissionFlag.DELETE. Filter it off the toolset withexclude_tags=["destructive"] for read-only / safe-edit agents.
#GoogleSheetsToolSet
from maivn_tools import GoogleSheetsToolSet connector = GoogleSheetsToolSet(token=token_cache)| Tool | Permission | Description |
|---|---|---|
get_spreadsheet(spreadsheet_id, include_grid_data, ranges) |
READ | Metadata + grid data. Accepts a raw ID or a Drive file dict. |
create_spreadsheet(title, sheets) |
WRITE | Create a spreadsheet. |
get_values(spreadsheet_id, range, major_dimension, value_render_option, date_time_render_option) |
READ | Read a range. |
batch_get_values(spreadsheet_id, ranges, major_dimension, value_render_option) |
READ | Multi-range read. |
update_values(spreadsheet_id, range, values, value_input_option) |
WRITE | Overwrite a range. |
append_values(spreadsheet_id, range, values, value_input_option, insert_data_option) |
WRITE | Append rows. |
clear_values(spreadsheet_id, range) |
DELETE (destructive) | Clear a range. |
batch_update(spreadsheet_id, requests) |
WRITE | Spreadsheet-level updates. |
add_sheet(spreadsheet_id, title, row_count, column_count) |
WRITE | Add a sheet. |
delete_sheet(spreadsheet_id, sheet_id) |
DELETE (destructive) | Remove a sheet. |
#Agent-ready behavior
GoogleSheetsToolSetis a value/range editor -- useGoogleDriveToolSet.search_files(include_ids=True)to locate a
spreadsheet, then pass the returned file dict to any of these tools.
The connector readssheet_ref_id/spreadsheet_id/spreadsheetId/file_id/idout of the dict.get_spreadsheetreturns the full Sheets resource; withinclude_grid_data=Trueandrangesyou also get cell-level values.create_spreadsheetreturns the new resource; pass itsspreadsheetId(or the whole dict) to the value / batch_update
tools.
file = drive.search_files("Q4 forecast", include_ids=True)["files"][0]sheets.get_values(file, range="Plan!A1:D20")#Destructive tools
clear_values and delete_sheet are tagged destructive and requirePermissionFlag.DELETE. clear_values removes cell contents but
leaves formatting; delete_sheet removes an entire tab. Filter them
off the toolset with exclude_tags=["destructive"] for read-only /
safe-edit agents.
#GoogleSlidesToolSet
from maivn_tools import GoogleSlidesToolSet connector = GoogleSlidesToolSet(token=token_cache)| Tool | Permission | Description |
|---|---|---|
get_presentation(presentation_id) |
READ | Fetch presentation. Accepts a raw ID or a Drive file dict. |
get_page(presentation_id, page_object_id) |
READ | One slide / master / layout. |
get_page_thumbnail(presentation_id, page_object_id, thumbnail_size, mime_type) |
READ | Slide thumbnail URL. |
create_presentation(title) |
WRITE | New deck. |
batch_update(presentation_id, requests) |
WRITE | Slides API update requests. |
create_slide(presentation_id, insertion_index, layout, object_id) |
WRITE | Insert a slide. |
insert_text(presentation_id, object_id, text, insertion_index) |
WRITE | Add text to a shape. |
replace_all_text(presentation_id, find, replace, match_case) |
WRITE | Find/replace. |
delete_object(presentation_id, object_id) |
DELETE (destructive) | Remove a slide / shape. |
#Agent-ready behavior
GoogleSlidesToolSetis a slide/shape/text editor -- useGoogleDriveToolSet.search_files(include_ids=True)to locate a
deck, then pass the returned file dict to any of these tools. The
connector readspresentation_id/presentationId/file_id/idout of the dict.get_presentationreturns the full Slides resource withslides[*],masters[*],layouts[*]. Each slide'sobjectIdis
thepage_object_idargument forget_page/get_page_thumbnail, and the input for theobject_idargument ofinsert_text/delete_object.create_presentationreturns the new resource; pass itspresentationId(or the whole dict) to the edit tools.
file = drive.search_files("All-hands deck", include_ids=True)["files"][0]deck = slides.get_presentation(file)slides.replace_all_text(file, find="{{date}}", replace="2026-05-16")#Destructive tools
delete_object is tagged destructive and requiresPermissionFlag.DELETE. It removes a slide, shape, or other page
object permanently. Filter it off the toolset withexclude_tags=["destructive"] for read-only / safe-edit agents.