atmon docs

REFERENCE/TOOLKITS/GOOGLE_DOCS.MD

Google Docs

Documents. Create and read docs, insert and replace text, format it, build lists and tables, place images, and set headers.

PropertyValue
Sluggoogle_docs
Definition version0.1.0
Base URLhttps://docs.googleapis.com
Auth schemesoauth2
Action tools34
By class1 read, 27 write, 6 destructive
Triggers0
Provider rate limitnot declared, so outbound calls are unpaced

Measured routing accuracy

54 golden cases replayed through the router over the whole index: measured over corpus ea4f12ad2948 (65 toolkits, 2283 tools indexed and 13 declared uncallable), 34 cases written by hand and 20 cases from the paraphrase pass. A case counts as top-1 when its gold tool ranked first and top-8 when it reached the slate at all.

MeasureCasesShare
top-140/5474.1%
top-851/5494.4%

The sweep is offline: the reranker is a deterministic identity fake that returns candidates in the order retrieval produced them, so top-1 measures retrieval order rather than a reranked slate. just eval-live measures the same cases through the live reranker.

Authentication

Connect an entity with ConnectionsService.InitiateConnection, naming this toolkit's slug. Credentials stay in the connections vault; callers hold connected-account ids only.

oauth2

PropertyValue
Authorization URLhttps://accounts.google.com/o/oauth2/v2/auth
Token URLhttps://oauth2.googleapis.com/token
Default scopeshttps://www.googleapis.com/auth/documents
Refresh tokensyes, the refresh daemon renews ahead of expiry

Tools

34 action tools. The catalog-wide slug is google_docs.<tool>, which is what search_tools returns and call_tool takes.

google_docs.create_document

Create a new, empty Google Doc with the given title. Use when the user wants to start, draft, or make a new document from scratch. To edit its content afterward, use insert_text and the other batchUpdate tools with the returned documentId.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents.

Arguments:

ArgumentTypeRequiredNotes
titlestringyesTitle for the new document, e.g. "Q3 Planning Notes".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring
revisionIdstring
titlestring

Also retrieved by: "start a new doc", "draft a fresh document", "make me a blank document to write in", "set up a new file for these notes", "I need a new document to start writing".

google_docs.get_document

Open a Google Doc and read its full contents: title, paragraphs, text runs, and table dimensions, each with the character indexes batchUpdate needs. Use when the user asks what a document says or wants its contents, or before any edit tool that requires an index or range.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /v1/documents/{{params.document_id}}.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id, e.g. "1AbCdefGHijkLmnOpQrstuVwxyz" (the id segment of a docs.google.com/document/d/<id> url).

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
bodyobject
body.contentarray of object
body.content[].endIndexinteger
body.content[].paragraphobject
body.content[].startIndexinteger
body.content[].tableobject
documentIdstring
namedRangesobject
revisionIdstring
titlestring

Also retrieved by: "what does this doc say", "pull up the contents of this file", "read back what's written in there", "show me what's inside this doc", "open this up and tell me what's in it".

google_docs.insert_text

Insert new text into a Google Doc at a specific character index. Use when the user wants to add, type, or write text into an existing document. Requires the index to insert at; get_document returns each paragraph's startIndex and endIndex. For find-and-replace, use replace_all_text instead.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
indexintegeryesCharacter index to insert at. Index 1 is the very start of the body.
textstringyesText to insert.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "type this into the doc", "add this sentence at that spot", "write this paragraph into the document", "drop this text right here", "stick this line in at this point".

google_docs.delete_content_range

Delete the text between two character indexes in a Google Doc. Irreversible through this toolkit. Use when the user wants to remove, cut, or erase a stretch of a document's content. Get the indexes from get_document first.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
end_indexintegeryesCharacter index where the deletion ends, exclusive.
start_indexintegeryesCharacter index where the deletion starts, inclusive.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "cut this part out of the doc", "erase this stretch of the document", "get rid of this passage", "remove that chunk of writing", "wipe out these few lines".

google_docs.replace_all_text

Find every occurrence of a phrase in a Google Doc and swap in replacement text. Use when the user wants to find and replace, search and swap, or update every mention of a word or phrase across a whole document rather than one spot.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
find_textstringyesExact phrase to search for.
match_casebooleannoWhether the search is case-sensitive. Defaults to false.
replace_textstringyesText to put in its place.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring
repliesarray of object
replies[].replaceAllTextobject
replies[].replaceAllText.occurrencesChangedinteger

Also retrieved by: "swap every mention of this word for another", "find this phrase everywhere and change it", "update every instance of this term in the doc", "do a global find and replace", "change all occurrences of this name at once".

google_docs.format_text_style

Set bold, italic, underline, and strikethrough together on a range of text in a Google Doc. Use when the user wants to emphasize, style, or change how a piece of text looks. All four toggles are set at once; pass a range's current values for any you don't mean to change.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
boldbooleanyesWhether the range is bold.
document_idstringyesDocs document id to edit.
end_indexintegeryesCharacter index where the styled range ends, exclusive.
italicbooleanyesWhether the range is italic.
start_indexintegeryesCharacter index where the styled range starts, inclusive.
strikethroughbooleanyesWhether the range has strikethrough.
underlinebooleanyesWhether the range is underlined.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "make this bold", "italicize this part", "underline this phrase", "strike through this sentence", "give this text some emphasis".

google_docs.set_font_size

Change the font size of a range of text in a Google Doc, in points. Use when the user wants text bigger, smaller, or a specific point size. For bold, italic, or other emphasis, use format_text_style.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
end_indexintegeryesCharacter index where the range ends, exclusive.
font_size_ptnumberyesNew font size in points, e.g. 14.
start_indexintegeryesCharacter index where the range starts, inclusive.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "make this text bigger", "shrink the font here", "bump the point size up on this line", "I want smaller letters for this part".

google_docs.set_text_color

Change the text color of a range in a Google Doc, given as red, green, and blue components from 0 to 1. Use when the user wants text in a specific color. For the highlight behind text, use set_text_highlight instead.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
bluenumberyesBlue component, 0 to 1.
document_idstringyesDocs document id to edit.
end_indexintegeryesCharacter index where the range ends, exclusive.
greennumberyesGreen component, 0 to 1.
rednumberyesRed component, 0 to 1.
start_indexintegeryesCharacter index where the range starts, inclusive.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "turn this text red", "change the font color here", "make these words blue", "color this passage differently".

google_docs.set_text_highlight

Set the highlight color behind a range of text in a Google Doc, given as red, green, and blue components from 0 to 1. Use when the user wants to highlight, mark, or draw attention to a passage. For the text color itself, use set_text_color instead.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
bluenumberyesBlue component, 0 to 1.
document_idstringyesDocs document id to edit.
end_indexintegeryesCharacter index where the range ends, exclusive.
greennumberyesGreen component, 0 to 1.
rednumberyesRed component, 0 to 1. 1,1,0 is yellow.
start_indexintegeryesCharacter index where the range starts, inclusive.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "highlight this in yellow", "mark this part so it stands out", "draw attention to this line with a highlight", "put a highlight color behind this text".

google_docs.set_paragraph_alignment

Align a paragraph range in a Google Doc left, center, right, or justified. Use when the user wants to center, justify, or change how a paragraph lines up on the page.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
alignmentstring, one of START, CENTER, END, JUSTIFIEDyesSTART is left-aligned, END is right-aligned, in a left-to-right document.
document_idstringyesDocs document id to edit.
end_indexintegeryesCharacter index where the paragraph range ends, exclusive.
start_indexintegeryesCharacter index where the paragraph range starts, inclusive.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "center this paragraph", "justify this block of text", "right-align this line", "line this paragraph up on the left".

google_docs.set_heading_style

Turn a paragraph range in a Google Doc into a heading, title, subtitle, or back to normal text. Use when the user wants a section heading, a Heading 1 through Heading 6, or to remove one.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
end_indexintegeryesCharacter index where the paragraph range ends, exclusive.
start_indexintegeryesCharacter index where the paragraph range starts, inclusive.
stylestring, one of NORMAL_TEXT, TITLE, SUBTITLE, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6yesNORMAL_TEXT clears any heading back to body text.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "turn this line into a heading", "make this a section title", "set this as Heading 2", "promote this line to the doc's title style", "clear the heading and make it normal text again".

google_docs.create_paragraph_bullets

Turn a paragraph range in a Google Doc into a bulleted, numbered, or checklist list. Use when the user wants to make a list, bullet points, or a checklist out of existing lines. To remove list formatting, use delete_paragraph_bullets.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
end_indexintegeryesCharacter index where the paragraph range ends, exclusive.
presetstring, one of BULLET_DISC_CIRCLE_SQUARE, BULLET_CHECKBOX, NUMBERED_DECIMAL_ALPHA_ROMAN, NUMBERED_DECIMAL_NESTEDyesList style: a plain bulleted list, a checkbox checklist, a numbered list, or a nested numbered list like 1.1, 1.2.
start_indexintegeryesCharacter index where the paragraph range starts, inclusive.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "turn these lines into a bullet list", "number this list of steps", "make this a checklist", "bulletpoint these items".

google_docs.delete_paragraph_bullets

Remove list, bullet, or numbering formatting from a paragraph range in a Google Doc, leaving the text itself in place. Use when the user wants to un-bullet, un-number, or turn a list back into plain paragraphs.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
end_indexintegeryesCharacter index where the paragraph range ends, exclusive.
start_indexintegeryesCharacter index where the paragraph range starts, inclusive.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "remove the bullets from this list", "un-number this list", "turn this list back into plain paragraphs", "strip the list formatting here".

google_docs.insert_page_break

Insert a page break in a Google Doc at a character index, pushing everything after it onto a new page. Use when the user wants to start a new page or force a page break.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
indexintegeryesCharacter index to insert the page break at.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "start a new page here", "force a page break at this point", "push everything after this onto the next page".

google_docs.insert_section_break

Insert a section break in a Google Doc at a character index, either continuing on the same page or starting a new one. Use when the user wants a document section that can carry its own header, footer, or margins, ahead of create_header or create_footer.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
indexintegeryesCharacter index to insert the section break at.
section_typestring, one of CONTINUOUS, NEXT_PAGEyesCONTINUOUS stays on the same page, NEXT_PAGE starts a new one.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "split the doc into a new section here", "start a fresh section on this page", "begin a new section on the next page".

google_docs.insert_table

Insert a new table with the given rows and columns into a Google Doc at a character index. Use when the user wants to add, create, or build a table or a grid of data in a document.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
columnsintegeryesNumber of columns.
document_idstringyesDocs document id to edit.
indexintegeryesCharacter index to insert the table at.
rowsintegeryesNumber of rows.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "add a grid with some rows and columns", "build me a table here", "drop in a 3 by 4 table".

google_docs.insert_table_row

Insert a new row into an existing table or grid in a Google Doc, next to a given cell. Use when the user wants to add a row to a table. Omit insert_below to insert above the reference cell's row.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
column_indexintegeryes0-based column index of a cell already in the table.
document_idstringyesDocs document id to edit.
insert_belowbooleannoTrue to insert below the reference row. Defaults to above.
row_indexintegeryes0-based row index of a cell already in the table.
table_start_indexintegeryesCharacter index where the table itself starts, from get_document's body.content table entries.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "add another row to this table", "I need one more line in the table", "stick a new row below this one".

google_docs.insert_table_column

Insert a new column into an existing table in a Google Doc, next to a given cell. Use when the user wants to add a column to a table. Omit insert_right to insert to the left of the reference cell's column.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
column_indexintegeryes0-based column index of a cell already in the table.
document_idstringyesDocs document id to edit.
insert_rightbooleannoTrue to insert to the right of the reference column. Defaults to left.
row_indexintegeryes0-based row index of a cell already in the table.
table_start_indexintegeryesCharacter index where the table itself starts, from get_document's body.content table entries.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "add another column to this table", "I need one more column in the grid", "insert a column to the right of this one".

google_docs.delete_table_row

Delete a row from a table or grid in a Google Doc, along with whatever it contains. Irreversible through this toolkit. Use when the user wants to remove a row from a table.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
column_indexintegeryes0-based column index of a cell in the row to delete.
document_idstringyesDocs document id to edit.
row_indexintegeryes0-based row index of a cell in the row to delete.
table_start_indexintegeryesCharacter index where the table itself starts, from get_document's body.content table entries.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "remove this row from the table", "get rid of that table line", "drop this row out of the grid".

google_docs.delete_table_column

Delete a column from a table in a Google Doc, along with whatever it contains. Irreversible through this toolkit. Use when the user wants to remove a column from a table.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
column_indexintegeryes0-based column index of a cell in the column to delete.
document_idstringyesDocs document id to edit.
row_indexintegeryes0-based row index of a cell in the column to delete.
table_start_indexintegeryesCharacter index where the table itself starts, from get_document's body.content table entries.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "remove this column from the table", "get rid of that table column", "drop this column out of the grid".

google_docs.set_table_cell_background_color

Shade the background of one or more table cells in a Google Doc, given as red, green, and blue components from 0 to 1. Use when the user wants to color, shade, or highlight cells in a table.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
bluenumberyesBlue component, 0 to 1.
column_indexintegeryes0-based column index of the top-left cell to shade.
column_spanintegeryesNumber of columns to shade, starting at column_index.
document_idstringyesDocs document id to edit.
greennumberyesGreen component, 0 to 1.
rednumberyesRed component, 0 to 1.
row_indexintegeryes0-based row index of the top-left cell to shade.
row_spanintegeryesNumber of rows to shade, starting at row_index.
table_start_indexintegeryesCharacter index where the table itself starts, from get_document's body.content table entries.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "shade this cell blue", "color the background of this table cell", "fill this box in the table with a color".

google_docs.set_table_row_height

Set the minimum height of one row in a Google Doc table, in points. Use when the user wants a taller or shorter row in a table.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
min_row_height_ptnumberyesMinimum row height in points.
row_indexintegeryes0-based index of the row to resize.
table_start_indexintegeryesCharacter index where the table itself starts, from get_document's body.content table entries.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "make this table row taller", "shrink the height of this row", "give this row more space in the table".

google_docs.merge_table_cells

Merge a block of table cells in a Google Doc into one cell. Content in every cell but the top-left one is discarded, which this toolkit cannot undo. Use when the user wants to combine, join, or merge cells in a table.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
column_indexintegeryes0-based column index of the top-left cell of the block to merge.
column_spanintegeryesNumber of columns in the block to merge, starting at column_index.
document_idstringyesDocs document id to edit.
row_indexintegeryes0-based row index of the top-left cell of the block to merge.
row_spanintegeryesNumber of rows in the block to merge, starting at row_index.
table_start_indexintegeryesCharacter index where the table itself starts, from get_document's body.content table entries.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "combine these table cells into one", "join this block of cells", "merge these boxes in the grid".

google_docs.unmerge_table_cells

Split a previously merged block of table cells in a Google Doc back into separate cells. Use when the user wants to undo a cell merge or split a table cell back apart.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
column_indexintegeryes0-based column index of the top-left cell of the merged block.
column_spanintegeryesNumber of columns in the merged block, starting at column_index.
document_idstringyesDocs document id to edit.
row_indexintegeryes0-based row index of the top-left cell of the merged block.
row_spanintegeryesNumber of rows in the merged block, starting at row_index.
table_start_indexintegeryesCharacter index where the table itself starts, from get_document's body.content table entries.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "split this merged cell back apart", "undo the cell merge in this table", "break this joined cell into separate ones again".

google_docs.insert_inline_image

Insert an image into a Google Doc at a character index, fetched from a public image URL. Use when the user wants to add, place, or drop a picture into a document. The image is sized to fit automatically; to swap an image already in the doc, use replace_image.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
image_urlstringyesPublicly accessible https URL of the image to fetch and embed.
indexintegeryesCharacter index to insert the image at.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring
repliesarray of object
replies[].insertInlineImageobject
replies[].insertInlineImage.objectIdstring

Also retrieved by: "drop a picture into the document", "embed this image at this spot", "put a photo in the doc here".

google_docs.replace_image

Swap an existing image in a Google Doc for a different one, fetched from a public image URL, keeping its position and size. Use when the user wants to update, change, or replace a picture already in a document.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
image_object_idstringyesObject id of the existing inline image, from insert_inline_image's reply or the image's element in get_document.
image_urlstringyesPublicly accessible https URL of the new image.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "swap out this picture for a different one", "update the image already in the doc", "change this photo to a new one".

google_docs.create_header

Add a header to a Google Doc, shown at the top of every page. Use when the user wants a running header, page title, or a logo shown across the whole document.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring
repliesarray of object
replies[].createHeaderobject
replies[].createHeader.headerIdstring

Also retrieved by: "add a running header to the top of every page", "put a header across the whole document", "I want something showing at the top of each page".

Add a footer to a Google Doc, shown at the bottom of every page. Use when the user wants a running footer, page number, or a signature line shown across the whole document.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring
repliesarray of object
replies[].createFooterobject
replies[].createFooter.footerIdstring

Also retrieved by: "add a footer to the bottom of every page", "put page numbers at the bottom of the document", "I want something at the bottom of each page".

google_docs.delete_header

Remove a header and its content from a Google Doc. Irreversible through this toolkit. Use when the user wants to get rid of a document's running header.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
header_idstringyesHeader id, from create_header's reply.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "get rid of the running header", "remove what's showing at the top of every page", "take the header off this document".

Remove a footer and its content from a Google Doc. Irreversible through this toolkit. Use when the user wants to get rid of a document's running footer.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
footer_idstringyesFooter id, from create_footer's reply.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "get rid of the running footer", "remove what's showing at the bottom of every page", "take the footer off this document".

google_docs.create_footnote

Insert a footnote reference at a character index in a Google Doc. Use when the user wants to add a footnote, citation, or reference note to a document.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
indexintegeryesCharacter index to insert the footnote reference at.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring
repliesarray of object
replies[].createFootnoteobject
replies[].createFootnote.footnoteIdstring

Also retrieved by: "add a footnote here", "drop in a citation marker", "I need a reference note at this spot".

google_docs.create_named_range

Tag a range of a Google Doc with a name so it can be found again later. Use when the user wants to bookmark, label, or mark a section of a document for future reference.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
end_indexintegeryesCharacter index where the range ends, exclusive.
namestringyesName for the range, e.g. "intro-paragraph".
start_indexintegeryesCharacter index where the range starts, inclusive.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring
repliesarray of object
replies[].createNamedRangeobject
replies[].createNamedRange.namedRangeIdstring

Also retrieved by: "bookmark this part of the doc", "label this section so I can find it later", "tag this passage with a name".

google_docs.delete_named_range

Remove a named range's tag from a Google Doc. The underlying text is left untouched, only the bookmark is removed. Use when the user wants to remove or clear a named range or bookmark.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
document_idstringyesDocs document id to edit.
named_range_idstringyesNamed range id, from create_named_range's reply or get_document.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "remove that bookmark", "clear the tag on that section", "drop the label I put on that range".

google_docs.set_document_margins

Set a Google Doc's page margins, in points, on all four sides. Use when the user wants wider, narrower, or specific page margins for a document.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /v1/documents/{{params.document_id}}:batchUpdate.

Arguments:

ArgumentTypeRequiredNotes
bottom_ptnumberyesBottom margin in points.
document_idstringyesDocs document id to edit.
left_ptnumberyesLeft margin in points.
right_ptnumberyesRight margin in points.
top_ptnumberyesTop margin in points.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
documentIdstring

Also retrieved by: "make the page margins narrower", "widen the margins on this document", "set specific margins on all sides of the page".