terra-mcp-google

v0.1.20
terra-mcp-google Checked 8 hours ago Published 5 months ago

Kozocom MCP server

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

google_auth_status Check Google sign-in status

Report whether the server has working Google credentials and for which account. Args: none. Returns: { "authenticated": boolean, "email": string|null, // signed-in account "scopes": string[]|null, // granted OAuth scopes "expiry_date": number|null // access-token expiry (epoch ms); auto-refreshed when valid }

drive_list_files List / search Drive files

List or search files and folders in Google Drive. Args: - query (string, optional): Drive search query (the 'q' parameter). Examples: name contains 'budget' mimeType = 'application/vnd.google-apps.spreadsheet' '<folderId>' in parents fullText contains 'quarterly report' modifiedTime > '2024-01-01T00:00:00' Combine with 'and'/'or'. Omit to list recent files. - page_size (number 1-100, default 25) - page_token (string, optional): from a previous response's next_page_token - order_by (string, optional): e.g. 'modifiedTime desc', 'name' - include_trashe…

ParameterTypeDescription
include_trashedboolean
order_bystringe.g. 'modifiedTime desc'
page_sizeinteger
page_tokenstring
querystringDrive 'q' search expression
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable

drive_get_file Get Drive file metadata

Get metadata for a single Drive file or folder by ID. Args: - file_id (string): the Drive file ID - response_format ('markdown'|'json', default markdown) Returns: { file: {id,name,mimeType,size,modifiedTime,parents,owners,webViewLink,...} }

ParameterTypeDescription
file_id *stringDrive file ID
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable

drive_download_file Download / export Drive file

Download a file's content. Google-native files (Docs/Sheets/Slides) are exported. Args: - file_id (string) - export_mime_type (string, optional): for Google-native files, e.g. 'text/csv', 'text/plain'. Defaults: Sheets→text/csv, Docs→text/plain, Slides→application/pdf. Returns text content inline. Binary content can't be returned — export Google-native files to a text format.

ParameterTypeDescription
file_id *string
export_mime_typestring

drive_create_folder Create Drive folder

Create a new folder in Drive. Args: - name (string) - parent_id (string, optional): parent folder ID; omit for My Drive root Returns: { file: {id, name, ...} }

ParameterTypeDescription
name *string
parent_idstring

drive_upload_file Upload file to Drive

Create a new Drive file from inline text content. Args: - name (string): file name to create - content (string): inline text content - mime_type (string, optional): e.g. 'text/plain', 'text/csv' (default octet-stream) - parent_id (string, optional): destination folder ID Returns: { file: {id, name, ...} }

ParameterTypeDescription
content *stringInline text content of the new file
name *string
mime_typestring
parent_idstring

drive_update_file Update / rename / move Drive file

Rename, move, and/or replace the content of an existing Drive file. Args: - file_id (string) - new_name (string, optional): rename - add_parents (string, optional): comma-separated folder IDs to add (move into) - remove_parents (string, optional): comma-separated folder IDs to remove - content (string, optional): replace file content with this text - mime_type (string, optional): MIME for replaced content (default text/plain) Returns: { file: {id, name, ...} }

ParameterTypeDescription
file_id *string
add_parentsstring
contentstring
mime_typestring
new_namestring
remove_parentsstring

drive_copy_file Copy Drive file

Duplicate a Drive file. Args: - file_id (string): source file - name (string, optional): name for the copy - parent_id (string, optional): destination folder Returns: { file: {id, name, ...} } of the new copy

ParameterTypeDescription
file_id *string
namestring
parent_idstring

drive_delete_file Delete / trash Drive file

Move a Drive file to trash (default, recoverable) or delete it permanently. Args: - file_id (string) - permanent (boolean, default false): true = permanent, irreversible delete Returns: { file_id, permanent, trashed? }

ParameterTypeDescription
file_id *string
permanentbooleanIrreversibly delete instead of trashing

sheets_create_spreadsheet Create spreadsheet

Create a new Google Spreadsheet. Args: - title (string) - sheet_titles (string[], optional): initial tab names (default a single "Sheet1") Returns: { spreadsheet_id, title, url, sheets:[{sheetId,title}] }

ParameterTypeDescription
title *string
sheet_titlesarray

sheets_get_spreadsheet Get spreadsheet metadata

Get a spreadsheet's tabs and dimensions (no cell values). Args: - spreadsheet_id (string) - response_format ('markdown'|'json', default markdown) Returns: { spreadsheet_id, title, url, sheets:[{sheetId,title,index,rows,columns}] }

ParameterTypeDescription
spreadsheet_id *string
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable

sheets_read_range Read one or more cell ranges

Read cell values from one A1 range, or several at once (batchGet). Args: - spreadsheet_id (string) - range (string | string[]): a single A1 range (e.g. 'Sheet1!A1:D20' or 'Sheet1' for the whole tab), or an array of A1 ranges to read together in one call - value_render_option ('FORMATTED_VALUE'|'UNFORMATTED_VALUE'|'FORMULA', default FORMATTED_VALUE) - response_format ('markdown'|'json', default markdown) Returns: a single range → { range, row_count, values: CellValue[][] }; an array of ranges → { count, ranges: [{ range, row_count, values }] }

ParameterTypeDescription
range *A single A1 range (e.g. 'Sheet1!A1:D20'), or an array of A1 ranges to batch-read in one call
spreadsheet_id *string
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable
value_render_optionstringHow values are rendered (default FORMATTED_VALUE)

sheets_write_range Write one or more cell ranges

Overwrite cell values in one A1 range, or several at once (values.batchUpdate). Cells store literal data, not formatted text. Write one value per cell — do NOT dump a markdown table (or CSV/TSV) into a single cell or row. e.g. the markdown table "| Name | Age |\n| --- | --- |\n| Ann | 30 |" must become rows [["Name","Age"],["Ann",30]], and never include separator rows like ["---","---"]. For visual styling (bold headers, colors, alignment) use sheets_format_cells, not markdown syntax in cells. Args: - spreadsheet_id (string) - range (string, optional): A1 range for a single-range write…

ParameterTypeDescription
spreadsheet_id *string
dataarrayFor multi-range writes: list of {range, values} pairs; provide instead of range/values
rangestringA1 range for a single-range write; the top-left anchor
value_input_optionstringUSER_ENTERED parses formulas/dates like the UI; RAW stores as-is
valuesarrayRows of cells to write when using 'range'

sheets_append_rows Append rows

Append rows after the existing table in a range (values.append). Cells store literal data — one value per cell. Don't pack a markdown/CSV table into a single cell; split into rows of cells and drop any "| --- |" separator rows. Args: - spreadsheet_id (string) - range (string): A1 range identifying the table to append to, e.g. 'Sheet1!A1' - values (CellValue[][]): rows to append - value_input_option ('USER_ENTERED'|'RAW', default USER_ENTERED) - insert_data_option ('INSERT_ROWS'|'OVERWRITE', default INSERT_ROWS) Returns: { table_range, updated_range, updated_rows, updated_cells }

ParameterTypeDescription
range *string
spreadsheet_id *string
values *array2D array of rows, each row an array of cell values
insert_data_optionstring
value_input_optionstringUSER_ENTERED parses formulas/dates like the UI; RAW stores as-is

sheets_clear_range Clear a cell range

Clear values from an A1 range (keeps formatting). Args: - spreadsheet_id (string) - range (string): A1 notation Returns: { cleared_range }

ParameterTypeDescription
range *string
spreadsheet_id *string

sheets_add_sheet Add a sheet (tab)

Add a new tab to a spreadsheet. Args: - spreadsheet_id (string) - title (string): new tab name - rows (number, optional): row count (default 1000) - columns (number, optional): column count (default 26) Returns: { sheet_id, title }

ParameterTypeDescription
spreadsheet_id *string
title *string
columnsinteger
rowsinteger

sheets_delete_sheet Delete a sheet (tab)

Delete a tab from a spreadsheet by its numeric sheetId (from sheets_get_spreadsheet). Args: - spreadsheet_id (string) - sheet_id (number): the numeric sheetId of the tab to delete Returns: { sheet_id }

ParameterTypeDescription
sheet_id *integerNumeric sheetId (not the tab title)
spreadsheet_id *string

sheets_format_cells Format a cell range

Apply cell formatting to a grid range (repeatCell). Only the options you pass are changed. Args: - spreadsheet_id (string) - sheet_id (number): numeric sheetId from sheets_get_spreadsheet - start_row, end_row, start_column, end_column (number): 0-based; start inclusive, end exclusive - background_color, text_color (hex, optional): e.g. '#4285F4' - bold, italic (boolean, optional) - font_size (number, optional) - horizontal_alignment ('LEFT'|'CENTER'|'RIGHT', optional) For formatting beyond these options (borders, merges, number/date formats, conditional formatting), use sheets_…

ParameterTypeDescription
end_column *integer0-based, exclusive
end_row *integer0-based, exclusive
sheet_id *integerNumeric sheetId from sheets_get_spreadsheet
spreadsheet_id *string
start_column *integer0-based, inclusive
start_row *integer0-based, inclusive
background_colorstring
boldboolean
font_sizeinteger
horizontal_alignmentstring
italicboolean
text_colorstring

sheets_set_data_validation Set a dropdown on a range

Add a dropdown (list) data-validation rule to a grid range (setDataValidation). Args: - spreadsheet_id (string) - sheet_id (number): numeric sheetId from sheets_get_spreadsheet - start_row, end_row, start_column, end_column (number): 0-based; start inclusive, end exclusive - values (string[]): dropdown options - strict (boolean, default true): reject entries not in the list - show_dropdown (boolean, default true): show the dropdown arrow in the UI For other validation rules (number/date/custom-formula conditions), use sheets_batch_update. Returns: { values }

ParameterTypeDescription
end_column *integer0-based, exclusive
end_row *integer0-based, exclusive
sheet_id *integerNumeric sheetId from sheets_get_spreadsheet
spreadsheet_id *string
start_column *integer0-based, inclusive
start_row *integer0-based, inclusive
values *arrayDropdown options
show_dropdownbooleanShow the dropdown UI arrow
strictbooleanReject values not in the list

sheets_batch_update Run raw batchUpdate requests

Escape hatch: send raw Sheets API requests to spreadsheets.batchUpdate. Use for operations without a dedicated tool (mergeCells, updateBorders, sortRange, addConditionalFormatRule, freezing rows, etc.). Powerful and potentially destructive — a malformed request returns a Google 400. Args: - spreadsheet_id (string) - requests (object[]): raw Request objects, e.g. [{ "mergeCells": { "range": {...}, "mergeType": "MERGE_ALL" } }] - response_format ('markdown'|'json', default markdown): 'json' to read the raw replies (e.g. a new sheetId) Returns: { reply_count, replies: [...] }

ParameterTypeDescription
requests *arrayRaw Sheets API Request objects, each passed straight to batchUpdate
spreadsheet_id *string
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable