terra-mcp-google
v0.1.20Kozocom 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…
| Parameter | Type | Description |
|---|---|---|
include_trashed | boolean | |
order_by | string | e.g. 'modifiedTime desc' |
page_size | integer | |
page_token | string | |
query | string | Drive 'q' search expression |
response_format | string | Output 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,...} }
| Parameter | Type | Description |
|---|---|---|
file_id * | string | Drive file ID |
response_format | string | Output 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.
| Parameter | Type | Description |
|---|---|---|
file_id * | string | |
export_mime_type | string |
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, ...} }
| Parameter | Type | Description |
|---|---|---|
name * | string | |
parent_id | string |
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, ...} }
| Parameter | Type | Description |
|---|---|---|
content * | string | Inline text content of the new file |
name * | string | |
mime_type | string | |
parent_id | string |
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, ...} }
| Parameter | Type | Description |
|---|---|---|
file_id * | string | |
add_parents | string | |
content | string | |
mime_type | string | |
new_name | string | |
remove_parents | string |
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
| Parameter | Type | Description |
|---|---|---|
file_id * | string | |
name | string | |
parent_id | string |
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? }
| Parameter | Type | Description |
|---|---|---|
file_id * | string | |
permanent | boolean | Irreversibly 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}] }
| Parameter | Type | Description |
|---|---|---|
title * | string | |
sheet_titles | array |
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}] }
| Parameter | Type | Description |
|---|---|---|
spreadsheet_id * | string | |
response_format | string | Output 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 }] }
| Parameter | Type | Description |
|---|---|---|
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_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
value_render_option | string | How 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…
| Parameter | Type | Description |
|---|---|---|
spreadsheet_id * | string | |
data | array | For multi-range writes: list of {range, values} pairs; provide instead of range/values |
range | string | A1 range for a single-range write; the top-left anchor |
value_input_option | string | USER_ENTERED parses formulas/dates like the UI; RAW stores as-is |
values | array | Rows 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 }
| Parameter | Type | Description |
|---|---|---|
range * | string | |
spreadsheet_id * | string | |
values * | array | 2D array of rows, each row an array of cell values |
insert_data_option | string | |
value_input_option | string | USER_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 }
| Parameter | Type | Description |
|---|---|---|
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 }
| Parameter | Type | Description |
|---|---|---|
spreadsheet_id * | string | |
title * | string | |
columns | integer | |
rows | integer |
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 }
| Parameter | Type | Description |
|---|---|---|
sheet_id * | integer | Numeric 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_…
| Parameter | Type | Description |
|---|---|---|
end_column * | integer | 0-based, exclusive |
end_row * | integer | 0-based, exclusive |
sheet_id * | integer | Numeric sheetId from sheets_get_spreadsheet |
spreadsheet_id * | string | |
start_column * | integer | 0-based, inclusive |
start_row * | integer | 0-based, inclusive |
background_color | string | |
bold | boolean | |
font_size | integer | |
horizontal_alignment | string | |
italic | boolean | |
text_color | string |
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 }
| Parameter | Type | Description |
|---|---|---|
end_column * | integer | 0-based, exclusive |
end_row * | integer | 0-based, exclusive |
sheet_id * | integer | Numeric sheetId from sheets_get_spreadsheet |
spreadsheet_id * | string | |
start_column * | integer | 0-based, inclusive |
start_row * | integer | 0-based, inclusive |
values * | array | Dropdown options |
show_dropdown | boolean | Show the dropdown UI arrow |
strict | boolean | Reject 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: [...] }
| Parameter | Type | Description |
|---|---|---|
requests * | array | Raw Sheets API Request objects, each passed straight to batchUpdate |
spreadsheet_id * | string | |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |