Google Docs MCP Server for Cloudflare Workers
39 tools available in the Google Docs MCP server. Each tool can be called by AI assistants to perform specific actions.
googledocs_createCreate a new Google Docs document.
Args:
Returns: The created document with its ID and metadata.
{
"type": "object",
"required": [
"title"
],
"properties": {
"title": {
"type": "string",
"description": "Title for the new document"
}
}
}googledocs_getGet a Google Docs document by ID.
Args:
Returns: The full document with all content, styles, and metadata.
{
"type": "object",
"required": [
"documentId"
],
"properties": {
"documentId": {
"type": "string",
"description": "The document ID"
}
}
}googledocs_insert_textInsert text at a specific position in the document.
Document indices are 1-based. The content starts at index 1.
Args:
Returns: Confirmation of the insert operation.
{
"type": "object",
"required": [
"documentId",
"text",
"index"
],
"properties": {
"text": {
"type": "string",
"description": "The text to insert"
},
"index": {
"type": "integer",
"minimum": 1,
"description": "Position to insert at (1-based)"
},
"documentId": {
"type": "string",
"description": "The document ID"
}
}
}googledocs_delete_contentDelete content within a range in the document.
Args:
Returns: Confirmation of the delete operation.
{
"type": "object",
"required": [
"documentId",
"startIndex",
"endIndex"
],
"properties": {
"endIndex": {
"type": "integer",
"minimum": 1,
"description": "End index (exclusive)"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"startIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index (inclusive)"
}
}
}googledocs_replace_textReplace all occurrences of text in the document.
Args:
Returns: Number of occurrences replaced.
{
"type": "object",
"required": [
"documentId",
"findText",
"replaceText"
],
"properties": {
"findText": {
"type": "string",
"description": "The text to find"
},
"matchCase": {
"type": "boolean",
"default": false,
"description": "Whether to match case"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"replaceText": {
"type": "string",
"description": "The replacement text"
}
}
}googledocs_append_textAppend text to the end of the document.
Args:
Returns: Confirmation of the append operation.
{
"type": "object",
"required": [
"documentId",
"text"
],
"properties": {
"text": {
"type": "string",
"description": "The text to append"
},
"documentId": {
"type": "string",
"description": "The document ID"
}
}
}googledocs_insert_page_breakInsert a page break at a specific position.
Args:
Returns: Confirmation of the page break insertion.
{
"type": "object",
"required": [
"documentId",
"index"
],
"properties": {
"index": {
"type": "integer",
"minimum": 1,
"description": "Position for the page break"
},
"documentId": {
"type": "string",
"description": "The document ID"
}
}
}googledocs_insert_section_breakInsert a section break at a specific position.
Args:
Returns: Confirmation of the section break insertion.
{
"type": "object",
"required": [
"documentId",
"index"
],
"properties": {
"index": {
"type": "integer",
"minimum": 1,
"description": "Position for the section break"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"sectionType": {
"enum": [
"CONTINUOUS",
"NEXT_PAGE"
],
"type": "string",
"default": "NEXT_PAGE",
"description": "Section break type"
}
}
}googledocs_batch_updateApply multiple updates to a document in a single request.
This is the most flexible tool for complex document modifications. It accepts an array of request objects that can include any combination of operations.
Args:
Request Types:
Returns: Batch update response with document ID and any replies from operations.
{
"type": "object",
"required": [
"documentId",
"requests"
],
"properties": {
"requests": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of request objects"
},
"documentId": {
"type": "string",
"description": "The document ID"
}
}
}googledocs_format_textApply basic formatting to a text range.
This is a simplified formatting tool for common text styles like bold, italic, underline. For more advanced styling, use googledocs_update_text_style.
Args:
Returns: Confirmation of the formatting operation.
{
"type": "object",
"required": [
"documentId",
"startIndex",
"endIndex"
],
"properties": {
"bold": {
"type": "boolean",
"description": "Make text bold"
},
"italic": {
"type": "boolean",
"description": "Make text italic"
},
"endIndex": {
"type": "integer",
"minimum": 1,
"description": "End index"
},
"fontSize": {
"type": "number",
"description": "Font size in points"
},
"underline": {
"type": "boolean",
"description": "Underline text"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"fontFamily": {
"type": "string",
"description": "Font family name"
},
"startIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index"
},
"strikethrough": {
"type": "boolean",
"description": "Strikethrough text"
}
}
}googledocs_update_text_styleApply advanced text styling to a range.
This tool provides full control over text styling including colors, links, and baseline offset.
Args:
TextStyle Properties:
Returns: Confirmation of the styling operation.
{
"type": "object",
"required": [
"documentId",
"startIndex",
"endIndex",
"textStyle",
"fields"
],
"properties": {
"fields": {
"type": "string",
"description": "Comma-separated fields to update"
},
"endIndex": {
"type": "integer",
"minimum": 1,
"description": "End index"
},
"textStyle": {
"type": "object",
"description": "TextStyle object"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"startIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index"
}
}
}googledocs_format_paragraphApply basic paragraph formatting to a range.
This is a simplified tool for common paragraph styles. For advanced styling, use googledocs_update_paragraph_style.
Args:
Returns: Confirmation of the paragraph formatting.
{
"type": "object",
"required": [
"documentId",
"startIndex",
"endIndex"
],
"properties": {
"endIndex": {
"type": "integer",
"minimum": 1,
"description": "End index"
},
"alignment": {
"enum": [
"START",
"CENTER",
"END",
"JUSTIFIED"
],
"type": "string",
"description": "Text alignment"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"spaceAbove": {
"type": "number",
"minimum": 0,
"description": "Space above in points"
},
"spaceBelow": {
"type": "number",
"minimum": 0,
"description": "Space below in points"
},
"startIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index"
},
"headingType": {
"enum": [
"NORMAL_TEXT",
"TITLE",
"SUBTITLE",
"HEADING_1",
"HEADING_2",
"HEADING_3",
"HEADING_4",
"HEADING_5",
"HEADING_6"
],
"type": "string",
"description": "Heading style"
},
"lineSpacing": {
"type": "number",
"description": "Line spacing percentage (100 = single)"
}
}
}googledocs_insert_imageInsert an inline image at a specific position in the document.
The image must be accessible via a public URL. For images from Google Drive, you'll need to ensure the image is shared publicly or use a direct download link.
Args:
Returns: Object ID of the inserted image.
{
"type": "object",
"required": [
"documentId",
"uri",
"index"
],
"properties": {
"uri": {
"type": "string",
"description": "Public URL of the image"
},
"index": {
"type": "integer",
"minimum": 1,
"description": "Position to insert the image"
},
"width": {
"type": "number",
"description": "Width in points (72 = 1 inch)"
},
"height": {
"type": "number",
"description": "Height in points"
},
"documentId": {
"type": "string",
"description": "The document ID"
}
}
}googledocs_update_paragraph_styleApply advanced paragraph styling to a range.
This tool provides full control over paragraph styling including borders, indentation, and tab stops.
Args:
ParagraphStyle Properties:
Returns: Confirmation of the paragraph styling.
{
"type": "object",
"required": [
"documentId",
"startIndex",
"endIndex",
"paragraphStyle",
"fields"
],
"properties": {
"fields": {
"type": "string",
"description": "Comma-separated fields to update"
},
"endIndex": {
"type": "integer",
"minimum": 1,
"description": "End index"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"startIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index"
},
"paragraphStyle": {
"type": "object",
"description": "ParagraphStyle object"
}
}
}googledocs_update_document_styleUpdate document-wide styling properties.
Args:
DocumentStyle Properties:
Returns: Confirmation of the document style update.
{
"type": "object",
"required": [
"documentId",
"documentStyle",
"fields"
],
"properties": {
"fields": {
"type": "string",
"description": "Comma-separated fields to update"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"documentStyle": {
"type": "object",
"description": "DocumentStyle object"
}
}
}googledocs_update_section_styleUpdate section styling properties for a range.
Args:
SectionStyle Properties:
Returns: Confirmation of the section style update.
{
"type": "object",
"required": [
"documentId",
"startIndex",
"endIndex",
"sectionStyle",
"fields"
],
"properties": {
"fields": {
"type": "string",
"description": "Comma-separated fields to update"
},
"endIndex": {
"type": "integer",
"minimum": 1,
"description": "End index"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"startIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index"
},
"sectionStyle": {
"type": "object",
"description": "SectionStyle object"
}
}
}googledocs_create_headerCreate a header for the document or a specific section.
Args:
Returns: The ID of the created header. Use this ID to add content to the header.
{
"type": "object",
"required": [
"documentId"
],
"properties": {
"type": {
"enum": [
"DEFAULT"
],
"type": "string",
"default": "DEFAULT",
"description": "Header type"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"sectionBreakIndex": {
"type": "integer",
"minimum": 1,
"description": "Section break index for section-specific header"
}
}
}googledocs_create_footerCreate a footer for the document or a specific section.
Args:
Returns: The ID of the created footer. Use this ID to add content to the footer.
{
"type": "object",
"required": [
"documentId"
],
"properties": {
"type": {
"enum": [
"DEFAULT"
],
"type": "string",
"default": "DEFAULT",
"description": "Footer type"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"sectionBreakIndex": {
"type": "integer",
"minimum": 1,
"description": "Section break index for section-specific footer"
}
}
}googledocs_delete_headerDelete a header from the document.
Args:
Returns: Confirmation of the deletion.
{
"type": "object",
"required": [
"documentId",
"headerId"
],
"properties": {
"headerId": {
"type": "string",
"description": "ID of the header to delete"
},
"documentId": {
"type": "string",
"description": "The document ID"
}
}
}googledocs_delete_footerDelete a footer from the document.
Args:
Returns: Confirmation of the deletion.
{
"type": "object",
"required": [
"documentId",
"footerId"
],
"properties": {
"footerId": {
"type": "string",
"description": "ID of the footer to delete"
},
"documentId": {
"type": "string",
"description": "The document ID"
}
}
}googledocs_create_footnoteCreate a footnote at a specific position in the document.
This inserts a footnote reference at the specified index and creates a footnote at the bottom of the page. You can then add content to the footnote.
Args:
Returns: The ID of the created footnote.
{
"type": "object",
"required": [
"documentId",
"index"
],
"properties": {
"index": {
"type": "integer",
"minimum": 1,
"description": "Position for the footnote reference"
},
"documentId": {
"type": "string",
"description": "The document ID"
}
}
}googledocs_replace_imageReplace an existing image with a new one.
The replacement image must be accessible via a public URL.
Args:
Returns: Confirmation of the image replacement.
{
"type": "object",
"required": [
"documentId",
"imageObjectId",
"uri"
],
"properties": {
"uri": {
"type": "string",
"description": "Public URL of the new image"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"imageObjectId": {
"type": "string",
"description": "Object ID of the image to replace"
}
}
}googledocs_delete_positioned_objectDelete a positioned object (floating image or drawing) from the document.
Args:
Returns: Confirmation of the deletion.
{
"type": "object",
"required": [
"documentId",
"objectId"
],
"properties": {
"objectId": {
"type": "string",
"description": "Object ID to delete"
},
"documentId": {
"type": "string",
"description": "The document ID"
}
}
}googledocs_create_bulletsConvert paragraphs to a bulleted or numbered list.
Args:
Bullet Presets: Bullet styles:
Numbered styles:
Returns: Confirmation of the bullet creation.
{
"type": "object",
"required": [
"documentId",
"startIndex",
"endIndex"
],
"properties": {
"endIndex": {
"type": "integer",
"minimum": 1,
"description": "End of paragraph range"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"startIndex": {
"type": "integer",
"minimum": 1,
"description": "Start of paragraph range"
},
"bulletPreset": {
"enum": [
"BULLET_DISC_CIRCLE_SQUARE",
"BULLET_DIAMONDX_ARROW3D_SQUARE",
"BULLET_CHECKBOX",
"BULLET_ARROW_DIAMOND_DISC",
"BULLET_STAR_CIRCLE_SQUARE",
"BULLET_ARROW3D_CIRCLE_SQUARE",
"BULLET_LEFTTRIANGLE_DIAMOND_DISC",
"NUMBERED_DECIMAL_ALPHA_ROMAN",
"NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS",
"NUMBERED_DECIMAL_NESTED",
"NUMBERED_UPPERALPHA_ALPHA_ROMAN",
"NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL",
"NUMBERED_ZERODECIMAL_ALPHA_ROMAN",
""
],
"type": "string",
"description": "Bullet/numbering preset"
}
}
}googledocs_delete_bulletsRemove bullets/numbering from paragraphs.
Args:
Returns: Confirmation of the bullet removal.
{
"type": "object",
"required": [
"documentId",
"startIndex",
"endIndex"
],
"properties": {
"endIndex": {
"type": "integer",
"minimum": 1,
"description": "End of paragraph range"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"startIndex": {
"type": "integer",
"minimum": 1,
"description": "Start of paragraph range"
}
}
}googledocs_create_named_rangeCreate a named range to mark a section of the document for later reference.
Named ranges allow you to label specific content so it can be easily found and manipulated later using its name rather than indices.
Args:
Returns: The ID of the created named range.
{
"type": "object",
"required": [
"documentId",
"name",
"startIndex",
"endIndex"
],
"properties": {
"name": {
"type": "string",
"description": "Name for the range"
},
"endIndex": {
"type": "integer",
"minimum": 1,
"description": "End index"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"startIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index"
}
}
}googledocs_delete_named_rangeDelete a named range from the document.
You can delete by either the range ID or the range name. If both are provided, the ID takes precedence.
Args:
Returns: Confirmation of the deletion.
{
"type": "object",
"required": [
"documentId"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the named range"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"namedRangeId": {
"type": "string",
"description": "ID of the named range"
}
}
}googledocs_replace_named_range_contentReplace the content of a named range with new text.
This is useful for template documents where you want to replace placeholder content marked with named ranges.
Args:
Returns: Confirmation of the replacement.
{
"type": "object",
"required": [
"documentId",
"text"
],
"properties": {
"text": {
"type": "string",
"description": "The replacement text"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"namedRangeId": {
"type": "string",
"description": "ID of the named range"
},
"namedRangeName": {
"type": "string",
"description": "Name of the named range"
}
}
}googledocs_insert_tableInsert a table at a specific position in the document.
Args:
Returns: Confirmation of the table insertion.
{
"type": "object",
"required": [
"documentId",
"rows",
"columns",
"index"
],
"properties": {
"rows": {
"type": "integer",
"minimum": 1,
"description": "Number of rows"
},
"index": {
"type": "integer",
"minimum": 1,
"description": "Position to insert the table"
},
"columns": {
"type": "integer",
"minimum": 1,
"description": "Number of columns"
},
"documentId": {
"type": "string",
"description": "The document ID"
}
}
}googledocs_insert_table_rowInsert a row into an existing table.
Args:
Returns: Confirmation of the row insertion.
{
"type": "object",
"required": [
"documentId",
"tableStartIndex",
"rowIndex"
],
"properties": {
"rowIndex": {
"type": "integer",
"minimum": 0,
"description": "Row index (0-based)"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"columnIndex": {
"type": "integer",
"default": 0,
"minimum": 0,
"description": "Column index (0-based)"
},
"insertBelow": {
"type": "boolean",
"default": true,
"description": "Insert below the row"
},
"tableStartIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index of the table"
}
}
}googledocs_insert_table_columnInsert a column into an existing table.
Args:
Returns: Confirmation of the column insertion.
{
"type": "object",
"required": [
"documentId",
"tableStartIndex",
"columnIndex"
],
"properties": {
"rowIndex": {
"type": "integer",
"default": 0,
"minimum": 0,
"description": "Row index (0-based)"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"columnIndex": {
"type": "integer",
"minimum": 0,
"description": "Column index (0-based)"
},
"insertRight": {
"type": "boolean",
"default": true,
"description": "Insert to the right"
},
"tableStartIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index of the table"
}
}
}googledocs_delete_table_rowDelete a row from a table.
Args:
Returns: Confirmation of the row deletion.
{
"type": "object",
"required": [
"documentId",
"tableStartIndex",
"rowIndex"
],
"properties": {
"rowIndex": {
"type": "integer",
"minimum": 0,
"description": "Row index to delete (0-based)"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"columnIndex": {
"type": "integer",
"default": 0,
"minimum": 0,
"description": "Column index (0-based)"
},
"tableStartIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index of the table"
}
}
}googledocs_delete_table_columnDelete a column from a table.
Args:
Returns: Confirmation of the column deletion.
{
"type": "object",
"required": [
"documentId",
"tableStartIndex",
"columnIndex"
],
"properties": {
"rowIndex": {
"type": "integer",
"default": 0,
"minimum": 0,
"description": "Row index (0-based)"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"columnIndex": {
"type": "integer",
"minimum": 0,
"description": "Column index to delete (0-based)"
},
"tableStartIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index of the table"
}
}
}googledocs_merge_table_cellsMerge cells in a table.
Args:
Returns: Confirmation of the cell merge.
{
"type": "object",
"required": [
"documentId",
"tableStartIndex",
"rowIndex",
"columnIndex",
"rowSpan",
"columnSpan"
],
"properties": {
"rowSpan": {
"type": "integer",
"minimum": 1,
"description": "Number of rows to merge"
},
"rowIndex": {
"type": "integer",
"minimum": 0,
"description": "Starting row index (0-based)"
},
"columnSpan": {
"type": "integer",
"minimum": 1,
"description": "Number of columns to merge"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"columnIndex": {
"type": "integer",
"minimum": 0,
"description": "Starting column index (0-based)"
},
"tableStartIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index of the table"
}
}
}googledocs_unmerge_table_cellsUnmerge previously merged cells in a table.
Args:
Returns: Confirmation of the cell unmerge.
{
"type": "object",
"required": [
"documentId",
"tableStartIndex",
"rowIndex",
"columnIndex",
"rowSpan",
"columnSpan"
],
"properties": {
"rowSpan": {
"type": "integer",
"minimum": 1,
"description": "Row span of merged cell"
},
"rowIndex": {
"type": "integer",
"minimum": 0,
"description": "Row index of merged cell (0-based)"
},
"columnSpan": {
"type": "integer",
"minimum": 1,
"description": "Column span of merged cell"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"columnIndex": {
"type": "integer",
"minimum": 0,
"description": "Column index of merged cell (0-based)"
},
"tableStartIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index of the table"
}
}
}googledocs_update_table_cell_styleUpdate the style of table cells.
Args:
TableCellStyle Properties:
Returns: Confirmation of the style update.
{
"type": "object",
"required": [
"documentId",
"tableStartIndex",
"rowIndex",
"columnIndex",
"tableCellStyle",
"fields"
],
"properties": {
"fields": {
"type": "string",
"description": "Comma-separated fields to update"
},
"rowSpan": {
"type": "integer",
"default": 1,
"minimum": 1,
"description": "Number of rows"
},
"rowIndex": {
"type": "integer",
"minimum": 0,
"description": "Starting row index (0-based)"
},
"columnSpan": {
"type": "integer",
"default": 1,
"minimum": 1,
"description": "Number of columns"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"columnIndex": {
"type": "integer",
"minimum": 0,
"description": "Starting column index (0-based)"
},
"tableCellStyle": {
"type": "object",
"description": "TableCellStyle object"
},
"tableStartIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index of the table"
}
}
}googledocs_update_table_row_styleUpdate the style of table rows.
Args:
TableRowStyle Properties:
Returns: Confirmation of the style update.
{
"type": "object",
"required": [
"documentId",
"tableStartIndex",
"rowIndices",
"tableRowStyle",
"fields"
],
"properties": {
"fields": {
"type": "string",
"description": "Comma-separated fields to update"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"rowIndices": {
"type": "array",
"items": {
"type": "number"
},
"description": "Row indices to update (0-based)"
},
"tableRowStyle": {
"type": "object",
"description": "TableRowStyle object"
},
"tableStartIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index of the table"
}
}
}googledocs_update_table_column_propertiesUpdate properties of table columns.
Args:
TableColumnProperties:
Returns: Confirmation of the properties update.
{
"type": "object",
"required": [
"documentId",
"tableStartIndex",
"columnIndices",
"tableColumnProperties",
"fields"
],
"properties": {
"fields": {
"type": "string",
"description": "Comma-separated fields to update"
},
"documentId": {
"type": "string",
"description": "The document ID"
},
"columnIndices": {
"type": "array",
"items": {
"type": "number"
},
"description": "Column indices to update (0-based)"
},
"tableStartIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index of the table"
},
"tableColumnProperties": {
"type": "object",
"description": "TableColumnProperties object"
}
}
}googledocs_pin_table_header_rowsPin rows at the top of a table to repeat on each page.
Args:
Returns: Confirmation of the pin operation.
{
"type": "object",
"required": [
"documentId",
"tableStartIndex",
"pinnedHeaderRowsCount"
],
"properties": {
"documentId": {
"type": "string",
"description": "The document ID"
},
"tableStartIndex": {
"type": "integer",
"minimum": 1,
"description": "Start index of the table"
},
"pinnedHeaderRowsCount": {
"type": "integer",
"minimum": 0,
"description": "Number of header rows to pin"
}
}
}