gogcli-mcp-sheets

v4.12.0
io.github.chrischall/gogcli-mcp-sheets Checked 5 hours ago Published 22 days ago

Extended Google Sheets for Claude via gogcli — auth + full Sheets support

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

gog_auth_list

List the Google accounts stored in gogcli, with their scopes. This reads local configuration only — it does not contact Google and does NOT tell you whether an account still works: a signed-out account whose refresh token expired or was revoked is listed here exactly like a healthy one, scopes and all. Use gog_auth_health to check whether an account can actually authenticate.

gog_auth_status

Show gogcli auth CONFIGURATION: keyring backend, credential files, and auth setup. Despite the name this is not a health check — it reads local setup and does not contact Google, so it says nothing about whether an account can still authenticate. Use gog_auth_health for that.

gog_auth_health

Check the LIVE health of each stored Google account. Unlike gog_auth_status (which only reports keyring/config setup), this performs a real token refresh against Google, so it detects expired or revoked (invalid_grant) refresh tokens — the account-wide sign-out that blocks every service. Reports per account: whether the token is currently valid, the mapped cause when it is not, how long ago it was authorized, and a warning as it approaches the 7-day refresh-token limit that applies to OAuth apps whose consent screen is still in "Testing" mode. Run it proactively to re-authorize on your own s…

gog_auth_services

List all Google services supported by gogcli and the OAuth scopes each requires.

gog_auth_add

Authorize a Google account via browser-based OAuth. Opens a browser window where the user must sign in and grant access. Blocks for up to 5 minutes waiting for the user to complete authorization. If the browser does not open automatically, a fallback URL is included in the response. Use gog_auth_list to check which accounts are already configured.

ParameterTypeDescription
email *stringGoogle account email to authorize
extraScopesstringAdditional raw OAuth scope URIs to request, comma-separated, on top of the ones `services` implies. Use for scopes no service covers — e.g. https://www.googleapis.com/auth/bigquery.readonly, require…
servicesstringServices to authorize: "all" or comma-separated list (e.g. "sheets,gmail,calendar"). Default: "sheets". Prefer the narrowest set you need — requesting a service whose Google API is not enabled on th…

gog_auth_add_url

Begin REMOTE/headless Google authorization (step 1 of 2). Returns a sign-in URL to open in any browser — no local server or terminal on the gogcli host is needed, so this works on a hosted deployment where the interactive gog_auth_add cannot. Hand the URL to the user; after they sign in, the browser is redirected to a localhost URL that fails to load — that is expected. They copy that full redirected URL (from the address bar) and you pass it to gog_auth_add_complete. The link is valid for 10 minutes. If you pass a custom `services` here, pass the SAME value to gog_auth_add_complete or the…

ParameterTypeDescription
email *stringGoogle account email to authorize
extraScopesstringAdditional raw OAuth scope URIs to request, comma-separated, on top of the ones `services` implies. Use for scopes no service covers — e.g. https://www.googleapis.com/auth/bigquery.readonly, require…
servicesstringServices to authorize: "all" or comma-separated list (e.g. "sheets,gmail,calendar"). Default: "sheets". Prefer the narrowest set you need — requesting a service whose Google API is not enabled on th…

gog_auth_add_complete

Complete REMOTE/headless Google authorization (step 2 of 2). Takes the full redirected localhost URL the user copied after finishing gog_auth_add_url, exchanges it for a refresh token, and stores it. Use the SAME `services` value you passed to gog_auth_add_url. Must run within 10 minutes of step 1 and against the same gogcli host.

ParameterTypeDescription
email *stringGoogle account email being authorized (same as step 1)
redirectUrl *stringThe full localhost redirect URL the user copied from the browser address bar after signing in (contains code and state; the page itself fails to load, which is expected).
extraScopesstringExtra OAuth scope URIs — MUST match the value passed to gog_auth_add_url, for the same reason `services` must: the two steps have to describe the same grant.
servicesstringServices authorized — MUST match the value passed to gog_auth_add_url. Default: "sheets".

gog_auth_run

Run any gog auth subcommand not covered by the other tools. Run `gog auth --help` for the full list of subcommands, or `gog auth <subcommand> --help` for flags on a specific subcommand. Only these subcommands are available: list, status, services, alias. Flags that override server safety controls (--readonly, --enable-commands, --disable-commands, --account, --access-token, --home, --client, --gmail-no-send, --no-input) and a bare "--" are refused. Local file paths (--out, --out-dir, --attach, --file, --*-file, @file JSON) must be inside GOG_FILE_ROOTS; subcommands that take a local path posit…

ParameterTypeDescription
args *arrayAdditional positional args and flags
subcommand *stringThe gog auth subcommand to run, e.g. "alias", "list", "status"

gog_sheets_get

Read values from a Google Sheets range. Returns a JSON object with a "values" array of rows.

ParameterTypeDescription
range *stringRange in A1 notation, e.g. Sheet1!A1:B10 or a named range
spreadsheetId *stringSpreadsheet ID (from the URL)
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_update

Write values to a Google Sheets range, overwriting existing content. Values may be strings, numbers, booleans, or null. Strings starting with "=" are interpreted as formulas (e.g. "=SUM(A1:A10)").

ParameterTypeDescription
range *stringTop-left cell or range in A1 notation, e.g. Sheet1!A1
spreadsheetId *stringSpreadsheet ID (from the URL)
values *array2D array of values (rows of columns). Cells may be string/number/boolean/null; strings starting with "=" are formulas.
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
dry_runbooleanPreview the operation without modifying the sheet (gog --dry-run): reports the intended actions and exits without writing.
fail_if_not_emptybooleanSafety guard against silent overwrites: before writing, read the target range and refuse the write if any target cell already holds data. Costs one extra read. Anchor ranges (e.g. "Sheet1!A1") are exp…
fail_on_formula_errorbooleanAfter writing, read the range back and fail if any cell holds a Sheets formula error (#REF!, #DIV/0!, etc.).

gog_sheets_append

Append rows to a Google Sheet after the last row with data in the given range. Values may be strings, numbers, booleans, or null. Strings starting with "=" are interpreted as formulas.

ParameterTypeDescription
range *stringRange indicating which sheet/columns to append to, e.g. Sheet1!A:C
spreadsheetId *stringSpreadsheet ID (from the URL)
values *array2D array of rows to append. Cells may be string/number/boolean/null; strings starting with "=" are formulas.
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
dry_runbooleanPreview the operation without modifying the sheet (gog --dry-run): reports the intended actions and exits without writing.

gog_sheets_clear

Clear all values in a Google Sheets range (formatting is preserved).

ParameterTypeDescription
range *stringRange in A1 notation to clear
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
dry_runbooleanPreview the operation without modifying the sheet (gog --dry-run): reports the intended actions and exits without writing.

gog_sheets_metadata

Get spreadsheet metadata: title, named ranges, and per-tab properties including grid dimensions (gridProperties.rowCount / columnCount). Use this to learn a sheet's current size before writing — a write outside the grid fails.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_create

Create a new Google Spreadsheet. Returns JSON with the new spreadsheetId and URL.

ParameterTypeDescription
title *stringTitle for the new spreadsheet
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_find_replace

Find and replace text across an entire Google Spreadsheet.

ParameterTypeDescription
find *stringText to find
replace *stringReplacement text
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_run

Run any gog sheets subcommand not covered by the other tools. Run `gog sheets --help` for the full list of subcommands, or `gog sheets <subcommand> --help` for flags on a specific subcommand. Flags that override server safety controls (--readonly, --enable-commands, --disable-commands, --account, --access-token, --home, --client, --gmail-no-send, --no-input) and a bare "--" are refused. Local file paths (--out, --out-dir, --attach, --file, --*-file, @file JSON) must be inside GOG_FILE_ROOTS; subcommands that take a local path positionally (e.g. drive upload) are refused in favour of their dedi…

ParameterTypeDescription
args *arrayAdditional positional args and flags
subcommand *stringThe gog sheets subcommand to run, e.g. "freeze", "add-tab", "rename-tab"
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_batch_begin

Open a persisted, revision-locked Sheets request batch. Pass its returned batchId to gog_sheets_batch_request using batch=<id>; no spreadsheet changes are submitted until gog_sheets_batch_end.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID the batch is locked to
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
namestringOptional batch label

gog_sheets_batch_end

Submit a persisted Sheets request batch atomically against its locked revision. The queued requests are shown for review and require confirmation before they are applied.

ParameterTypeDescription
batchId *stringBatch ID returned by gog_sheets_batch_begin
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…

gog_sheets_list_tabs

List tabs (sheets) in a spreadsheet with their titles, sheetIds, and indices. A friendlier view than gog_sheets_metadata when you only need the tab list — useful for restructuring a workbook over a long agent session without losing track of names.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID (from the URL)
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_add_tab

Add a new sheet tab to a spreadsheet.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID (from the URL)
tabName *stringName for the new tab
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_delete_tab

Delete a sheet tab from a spreadsheet.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
tabName *stringName of the tab to delete
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_rename_tab

Rename a sheet tab.

ParameterTypeDescription
newName *stringNew tab name
oldName *stringCurrent tab name
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_copy

Copy a spreadsheet to a new spreadsheet with the given title.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID to copy
title *stringTitle for the new copy
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
parentstringParent folder ID to place the copy in

gog_sheets_export

Export a spreadsheet as CSV, TSV, or PDF.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
formatstringExport format: csv, tsv, pdf (default: csv)
outstringOutput file path
overwritebooleanOverwrite the output file if it already exists (gog refuses otherwise)

gog_sheets_freeze

Freeze rows and/or columns in a sheet.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
colsnumberNumber of columns to freeze
rowsnumberNumber of rows to freeze
sheetstringSheet tab name (default: first sheet)

gog_sheets_insert

Insert rows or columns into a sheet. With after:false (default), the new dimension lands at start. With after:true, the new dimension lands at start+1 (the existing dimension at start is preserved).

ParameterTypeDescription
dimension *stringDimension to insert: ROWS or COLUMNS
sheet *stringSheet tab name
spreadsheetId *stringSpreadsheet ID
start *numberStart index (0-based)
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
afterbooleanInsert after the start index instead of before. With after:true the new dimension lands at start+1, leaving the existing dimension at start untouched.
countnumberNumber of rows/columns to insert (default: 1)
inheritFromBeforebooleanInherit number format / styling from the row/column before the insertion. Defaults to true with after:true, false otherwise; pass false to inherit from the row/column after the insertion instead. Cann…

gog_sheets_copy_paste

Copy a source range's values/formulas/format to a destination range via the Sheets CopyPasteRequest. A destination larger than the source tiles the source to fill it — the canonical way to fill formulas down or across with relative references adjusted (aliases: fill, copy-range). Use type to control what is pasted (NORMAL pastes everything; FORMULA fills formulas with adjusted references; VALUES/FORMAT/etc. paste only that aspect).

ParameterTypeDescription
dest *stringDestination range (e.g. Sheet1!A2:H120). Larger than the source tiles/fills it.
source *stringSource range (e.g. Sheet1!A2:H71)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
transposebooleanPaste transposed (swap rows and columns)
typestringPaste type (default: NORMAL pastes everything)

gog_sheets_merge

Merge cells in a range.

ParameterTypeDescription
range *stringRange to merge (e.g. Sheet1!A1:C3)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
typestringMerge type: MERGE_ALL, MERGE_COLUMNS, MERGE_ROWS

gog_sheets_unmerge

Unmerge previously merged cells in a range.

ParameterTypeDescription
range *stringRange to unmerge (e.g. Sheet1!A1:C3)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_format

Apply cell formatting to a range. The named flags (bold, italic, backgroundColor, etc.) compose into a Sheets API CellFormat — use them for the 90% case. For full API control, pass formatJson + formatFields (Sheets CellFormat + field mask) directly.

ParameterTypeDescription
range *stringRange to format (e.g. Sheet1!A1:C3)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
backgroundColorstringCell background color as #RRGGBB or #RGB
boldbooleanSet bold
fontFamilystringFont family (e.g. Arial)
fontSizenumberFont size in points
formatFieldsstringComma-separated field mask (e.g. textFormat.bold,backgroundColor). Required when using formatJson; auto-computed when using named flags.
formatJsonstringEscape hatch: raw CellFormat JSON. When provided, named flags above are ignored and formatJson is sent as-is.
horizontalAlignmentstringHorizontal alignment
italicbooleanSet italic
strikethroughbooleanSet strikethrough
textColorstringText color as #RRGGBB or #RGB
underlinebooleanSet underline
verticalAlignmentstringVertical alignment
wrapStrategystringText wrap strategy

gog_sheets_number_format

Set number format on a range (currency, percentage, date, etc.). When type is DATE or DATE_TIME, the target range is peeked first; if every numeric cell is a small integer (< 10000), a warning is prepended to the response because Sheets will render those as 1899/1900 day-serials. Pass force:true to skip the check.

ParameterTypeDescription
range *stringRange to format (e.g. Sheet1!A1:A10)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
forcebooleanSkip the DATE/DATE_TIME small-integer warning check
patternstringCustom format pattern (e.g. "#,##0.00", "yyyy-mm-dd")
typestringFormat type: NUMBER, CURRENCY, PERCENT, DATE, DATE_TIME, TIME, SCIENTIFIC, etc.

gog_sheets_read_format

Read cell formatting for a range.

ParameterTypeDescription
range *stringRange to read formatting from
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
effectivebooleanReturn effective (computed) format including inherited styles

gog_sheets_resize_columns

Resize column widths. Use --auto for auto-fit or --width for a specific pixel width.

ParameterTypeDescription
columns *stringColumn range (e.g. A:C, or Sheet1!A:C)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
autobooleanAuto-fit column width to content
widthnumberWidth in pixels

gog_sheets_resize_rows

Resize row heights. Use --auto for auto-fit or --height for a specific pixel height.

ParameterTypeDescription
rows *stringRow range (e.g. 1:10, or Sheet1!1:10)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
autobooleanAuto-fit row height to content
heightnumberHeight in pixels

gog_sheets_notes

Read cell notes in a range.

ParameterTypeDescription
range *stringRange to read notes from (e.g. Sheet1!A1:B5)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_update_note

Add, update, or clear a cell note. Pass an empty string to clear the note.

ParameterTypeDescription
note *stringNote text (empty string clears the note). Large notes are written to a temp file and passed to gog as --note-file automatically.
range *stringCell or range to set the note on (e.g. Sheet1!A1)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_validation_get

Read the data-validation rules (dropdowns, checkboxes, number/date conditions, custom formulas) applied to a range.

ParameterTypeDescription
range *stringRange to inspect (e.g. Sheet1!A1:A10)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_validation_set

Set a data-validation rule on a range — dropdowns (ONE_OF_LIST / ONE_OF_RANGE), checkboxes (BOOLEAN), number/date conditions, or custom formulas. Overwrites any existing rule on the range. Repeat values for list entries or between-bounds.

ParameterTypeDescription
range *stringRange to apply the rule to (e.g. Sheet1!A1:A10)
spreadsheetId *stringSpreadsheet ID
type *stringCondition type, e.g. ONE_OF_LIST, ONE_OF_RANGE, NUMBER_BETWEEN, NUMBER_GREATER, DATE_AFTER, BOOLEAN, CUSTOM_FORMULA
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
filteredRowsIncludedbooleanApply the rule to filtered rows too; required for table-managed dropdown columns
inputMessagestringMessage shown when the cell is selected
showCustomUibooleanShow dropdown or checkbox UI where supported
strictbooleanReject invalid input instead of showing a warning
valuesarrayCondition values (repeatable): list entries for ONE_OF_LIST, two bounds for *_BETWEEN, a range for ONE_OF_RANGE, a formula for CUSTOM_FORMULA

gog_sheets_validation_clear

Remove all data-validation rules from a range.

ParameterTypeDescription
range *stringRange to clear (e.g. Sheet1!A1:A10)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
filteredRowsIncludedbooleanClear rules from filtered rows too; required for table-managed dropdown columns

gog_sheets_delete_dimension

Delete a span of rows or columns, table-aware: intersecting table objects are preserved (shrunk) along with their remaining data, instead of being corrupted as with a raw DeleteDimension batch update. Target by A1 range (e.g. Sheet1!5:7 or Sheet1!C:D) or by sheet name plus start/end.

ParameterTypeDescription
dimension *stringDimension to delete
rangeOrSheet *stringA1 range covering the rows/columns to delete, or a sheet name (then start/end are required)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
endintegerLast row/column to delete (1-based, inclusive; required with a sheet-name target)
startintegerFirst row/column to delete (1-based, inclusive; required with a sheet-name target)

gog_sheets_named_ranges_list

List all named ranges in a spreadsheet.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_named_ranges_get

Get a named range by name or ID.

ParameterTypeDescription
nameOrId *stringNamed range name or ID
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_named_ranges_add

Create a new named range.

ParameterTypeDescription
name *stringName for the range
range *stringCell range (e.g. Sheet1!A1:B10)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_named_ranges_update

Update a named range (change its name, range, or both).

ParameterTypeDescription
nameOrId *stringCurrent named range name or ID
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
namestringNew name
rangestringNew cell range

gog_sheets_named_ranges_delete

Delete a named range.

ParameterTypeDescription
nameOrId *stringNamed range name or ID to delete
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_batch_update

Update values in multiple ranges with one Sheets API request. dataJson is a JSON array of {range, values} objects — pass it inline as a literal JSON string. Atomic — either all ranges update or none do. (The CLI also accepts "@/path/to/file.json", but that file is read on the gog server's filesystem, not the caller's, so inline JSON is the right form for remote MCP callers.)

ParameterTypeDescription
dataJson *stringValue ranges as an inline JSON array, e.g. [{"range":"Sheet1!A1:B2","values":[["a","b"]]}]. (An "@/path" form is read on the gog server filesystem, not yours — inline the JSON instead.)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
includeValuesInResponsebooleanInclude updated values in the response
inputstringValue input option (default: USER_ENTERED)
responseDateTimeRenderstringResponse date/time render option
responseRenderstringResponse value render option

gog_sheets_batch_request

Submit a Google Sheets API structural request array atomically (for example addDimension, repeatCell, mergeCells, or updateSheetProperties). requestsJson must be a JSON array of Sheets API Request objects. Requests are previewed and require confirmation before submission. Use batch=<id> to append these requests to a persisted Sheets batch instead of submitting immediately.

ParameterTypeDescription
requestsJson *stringJSON array of Google Sheets API Request objects, e.g. [{"addSheet":{"properties":{"title":"Archive"}}}]
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
batchstringPersisted Sheets batch ID; append requests without submitting yet
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…

gog_sheets_reorder_tab

Move a tab to a specific 0-based position. `tab` is the tab name or numeric sheetId; `to=0` is the leftmost slot.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
tab *stringTarget tab by name or numeric sheet ID
to *integerDestination final 0-based tab index
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_chart_list

List embedded charts in a spreadsheet (chartId, type, position).

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_chart_get

Get the full definition (spec + position) of a single chart by its numeric chart ID.

ParameterTypeDescription
chartId *stringNumeric chart ID (from gog_sheets_chart_list)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_chart_create

Create an embedded chart from a JSON spec. specJson is a Sheets API ChartSpec (or full EmbeddedChart) — inline or @/path/to/file.json. Anchor the chart with sheet + anchor (A1 cell), and optionally size it with width/height pixels.

ParameterTypeDescription
specJson *stringChartSpec or EmbeddedChart JSON (inline or @file)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
anchorstringAnchor cell in A1 notation (e.g. A1, E10)
heightnumberChart height in pixels (default: 371)
sheetstringSheet name for the anchor (resolved to sheetId)
widthnumberChart width in pixels (default: 600)

gog_sheets_chart_update

Replace a chart spec by chart ID. specJson is a Sheets API ChartSpec (or full EmbeddedChart) — inline or @/path/to/file.json.

ParameterTypeDescription
chartId *stringNumeric chart ID to update
specJson *stringChartSpec or EmbeddedChart JSON (inline or @file)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_chart_delete

Delete a chart by its numeric chart ID.

ParameterTypeDescription
chartId *stringNumeric chart ID to delete
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_table_list

List Google Sheets tables in a spreadsheet (tableId, name, range).

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_table_get

Get a single Google Sheets table (definition + columns) by its table ID.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
tableId *stringTable ID (from gog_sheets_table_list)
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_table_create

Create a Google Sheets table over a range. columnsJson is a JSON array of column definitions (each {columnName, columnType?}); valid columnType values: TEXT, DOUBLE, BOOLEAN, DATE, DROPDOWN. Inline JSON or @/path/to/file.json.

ParameterTypeDescription
columnsJson *stringColumn definitions as JSON array or @file (columnName + optional columnType)
name *stringTable name
range *stringRange the table covers (e.g. Sheet1!A1:D20)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_table_append

Append data rows to a table. valuesJson is a JSON 2D array of row values.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
tableId *stringTable ID to append to
valuesJson *stringValues as JSON 2D array (e.g. [["a",1],["b",2]])
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
inputstringValue input option (default: USER_ENTERED)

gog_sheets_table_clear

Clear all data rows from a table (keeps the table and its columns).

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
tableId *stringTable ID to clear
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_table_delete

Delete a Google Sheets table. WARNING: the underlying `gog`/Sheets behaviour is that deleting a table also DESTROYS every cell value in the table range — not just the table styling/columns. By default this tool prevents that data loss by emulating the Sheets UI's "Convert to range": it reads the table's cells (values AND formulas) first, deletes the table, then restores the data into the now-plain range. Formatting and banding are still lost; data-validation dropdowns are also not restored automatically, but you can snapshot them first with gog_sheets_validation_get and re-apply with gog_she…

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
tableId *stringTable ID to delete
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
keep_databooleanDefault true: preserve the table's cell values and formulas (read → delete → restore), emulating "Convert to range". Set false to delete the table AND its data.

gog_sheets_banding_list

List alternating-color banded ranges. Optionally scope to a single sheet.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
sheetstringOnly list banding from this sheet

gog_sheets_banding_set

Apply alternating colors to a range. Provide rowPropertiesJson and/or columnPropertiesJson — each a Sheets API BandingProperties JSON object ({headerColor, firstBandColor, secondBandColor, footerColor}). At least one is required.

ParameterTypeDescription
range *stringRange to band (e.g. Sheet1!A1:D20)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
columnPropertiesJsonstringBandingProperties JSON for column colors
rowPropertiesJsonstringBandingProperties JSON for row colors

gog_sheets_banding_clear

Remove alternating-color banding. Pass id to remove a single banded range, or all:true with sheet to remove every banding on that sheet.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
allbooleanRemove all banding from the sheet (requires sheet)
idnumberBanded range ID to remove
sheetstringSheet name (used with all:true)

gog_sheets_filter_set

Set a basic filter on a range (the filter/sort header Sheets shows on a data range). A sheet can hold one basic filter; replacing an existing one requires replace=true — without it, gog refuses rather than silently overwriting.

ParameterTypeDescription
range *stringRange to filter (A1 notation with sheet name, e.g. Sheet1!A1:C100, or a named range name)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
replacebooleanReplace the sheet's existing basic filter if one is set (appends --force)

gog_sheets_conditional_format_list

List conditional formatting rules. Optionally scope to a single sheet.

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
sheetstringOnly list rules from this sheet

gog_sheets_conditional_format_add

Add a conditional formatting rule to a range. Boolean rules: type picks the condition, expr is its value/formula (omit for blank/not-blank), formatJson is the CellFormat to apply when the condition matches (inline or @file); use formatFields to force-send zero/false fields (e.g. backgroundColor,textFormat.bold). Gradient rules (color scales): pass gradientRuleJson instead — a GradientRule JSON with minpoint/maxpoint (and optional midpoint), each {"color":{...},"type":"MIN|MAX|NUMBER|PERCENT|PERCENTILE","value":"..."}. The two modes are mutually exclusive.

ParameterTypeDescription
range *stringRange the rule applies to (e.g. Sheet1!A1:A100)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
exprstringExpression value or custom formula (omit for blank/not-blank)
formatFieldsstringFormat field mask for force-sending zero/false fields (e.g. backgroundColor,textFormat.bold)
formatJsonstringCellFormat JSON to apply when a boolean rule matches (inline or @file; required with type)
gradientRuleJsonstringGradientRule JSON for gradient conditional formats (inline or @file; must include minpoint and maxpoint)
typestringBoolean rule type (required unless gradientRuleJson is used)

gog_sheets_conditional_format_clear

Remove conditional formatting rules from a sheet. Pass index to remove a single rule by its 0-based index, or all:true to remove every rule on the sheet.

ParameterTypeDescription
sheet *stringSheet name to clear rules from
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
allbooleanRemove all conditional formatting rules from the sheet
indexnumber0-based rule index to remove

gog_sheets_snapshot

Make a backup copy of an entire spreadsheet — a one-call safety snapshot to take BEFORE a risky or destructive edit (table delete, bulk clear, large rewrite). Returns the new copy's file ID and URL; if the edit goes wrong, restore by copying the backup back or sharing it. The copy is independent — later edits to the original do not affect it.

ParameterTypeDescription
name *stringName for the backup copy, e.g. "Budget — backup before table delete"
spreadsheetId *stringSpreadsheet ID to back up
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
parentstringDestination folder ID for the copy (default: same location as the original)

gog_sheets_datasource_list

List the Connected Sheets data sources in a spreadsheet (BigQuery or Looker), each joined with its DATA_SOURCE sheet and current execution status. This is the discovery call — start here to get the dataSourceId the describe tool wants. Deliberately does not print custom SQL; use gog_sheets_datasource_describe for that. BIGQUERY-BACKED SOURCES NEED AN EXTRA SCOPE: ordinary sheets authorization does not request https://www.googleapis.com/auth/bigquery.readonly, and Google refuses the whole response without it. A permission error here means the token is missing that scope, NOT that the spreadsh…

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_datasource_describe

Describe one Connected Sheets data source in full: the complete API DataSource spec (including the BigQuery raw query, which gog_sheets_datasource_list withholds), its sheet properties, its DataExecutionStatus and any refresh schedules. Refreshes are asynchronous and this tool cannot start one — poll it until state is SUCCEEDED or FAILED, and read the status error text when it is FAILED. BIGQUERY-BACKED SOURCES NEED AN EXTRA SCOPE: ordinary sheets authorization does not request https://www.googleapis.com/auth/bigquery.readonly, and Google refuses the whole response without it. A permission e…

ParameterTypeDescription
dataSourceId *stringData source ID, as reported by gog_sheets_datasource_list
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_datasource_table_list

List the data-source tables — "extracts" in the Sheets editor — anchored in a spreadsheet. A data-source table has NO id of its own in the Sheets API: its definition lives on its top-left cell, so every extract is identified by a sheet-qualified A1 anchor (e.g. "Extracts!B3"). That anchor is what the describe and read tools take. Filter with dataSourceId to see only one source's extracts. BIGQUERY-BACKED SOURCES NEED AN EXTRA SCOPE: ordinary sheets authorization does not request https://www.googleapis.com/auth/bigquery.readonly, and Google refuses the whole response without it. A permissio…

ParameterTypeDescription
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
dataSourceIdstringOnly list tables belonging to this data source ID

gog_sheets_datasource_table_describe

Describe the data-source table (extract) anchored at an A1 cell: its source, configured columns, sort/filter spec and row limit. Read this before gog_sheets_datasource_table_read when you need to know what the columns MEAN — the read returns values, not the extract's definition. BIGQUERY-BACKED SOURCES NEED AN EXTRA SCOPE: ordinary sheets authorization does not request https://www.googleapis.com/auth/bigquery.readonly, and Google refuses the whole response without it. A permission error here means the token is missing that scope, NOT that the spreadsheet has no data sources — re-authorize…

ParameterTypeDescription
anchor *stringSheet-qualified A1 anchor of the extract's top-left cell, e.g. "Extracts!B3". Get it from gog_sheets_datasource_table_list — an extract has no other identifier.
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.

gog_sheets_datasource_table_read

Read the values out of the data-source table (extract) anchored at an A1 cell. Bounded on purpose: at most maxRows data rows (gog default 1000) plus the header row, which is returned separately. The JSON reports "truncated": true when the configured extract can hold more rows than were returned — treat that exactly like a truncated search, i.e. do not conclude a value is absent from it; raise maxRows or narrow the extract instead. Use render=UNFORMATTED_VALUE for arithmetic (FORMATTED_VALUE returns display strings) or render=FORMULA to see the cell formulas. BIGQUERY-BACKED SOURCES NEED AN E…

ParameterTypeDescription
anchor *stringSheet-qualified A1 anchor of the extract's top-left cell, e.g. "Extracts!B3" (from gog_sheets_datasource_table_list)
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
maxRowsintegerMaximum data rows to read (gog default: 1000). The header row is returned separately and does not count against this.
renderstringHow cell values are rendered (gog default: FORMATTED_VALUE)

gog_sheets_datasource_add

Add a BigQuery Connected Sheets data source to a spreadsheet, creating its linked DATA_SOURCE sheet. Point it at EITHER a custom SQL query (query) OR an existing native table (dataset + table) — never both. billingProject is the BigQuery project charged for the query; tableProject only names which project OWNS the table, and defaults to the billing project. Returns the new dataSourceId, which every other datasource tool takes. COSTS MONEY AND RUNS ASYNCHRONOUSLY: this starts a BigQuery execution billed to the billing project, and returns once the execution has been REQUESTED — not once it…

ParameterTypeDescription
billingProject *stringBilling-enabled BigQuery project charged for this source's queries
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
datasetstringBigQuery dataset ID of an existing table. Requires table; mutually exclusive with query.
querystringBigQuery SQL to run. Mutually exclusive with dataset/table/tableProject.
tablestringBigQuery table ID. Requires dataset; mutually exclusive with query.
tableProjectstringBigQuery project that owns the table (default: the billing project). Only valid with dataset/table.

gog_sheets_datasource_update

Repoint an existing BigQuery Connected Sheets data source: new SQL for a query-backed source, a new dataset/table for a table-backed one, or a new billing project for either. Only the fields you pass are changed. You cannot convert a source between the two kinds — gog refuses SQL on a table source and table fields on a query source — so read gog_sheets_datasource_describe first if you are unsure which kind it is. Replacing the SQL DISCARDS the source's current results. COSTS MONEY AND RUNS ASYNCHRONOUSLY: this starts a BigQuery execution billed to the billing project, and returns once the…

ParameterTypeDescription
dataSourceId *stringData source ID, as reported by gog_sheets_datasource_list
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
billingProjectstringNew billing-enabled BigQuery project to charge executions to
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
datasetstringReplacement dataset ID. Only valid on a table-backed source.
querystringReplacement SQL. Only valid on a query-backed source; mutually exclusive with the table fields.
tablestringReplacement table ID. Only valid on a table-backed source.
tableProjectstringReplacement project owning the table. Only valid on a table-backed source.

gog_sheets_datasource_refresh

Re-run a Connected Sheets data source so its sheet and extracts pick up current BigQuery data. Google refuses to refresh a source whose previous execution FAILED; forceRefresh overrides that, which is what you want after fixing the underlying query or permissions. COSTS MONEY AND RUNS ASYNCHRONOUSLY: this starts a BigQuery execution billed to the billing project, and returns once the execution has been REQUESTED — not once it has finished. Poll gog_sheets_datasource_describe until its dataExecutionStatus state is SUCCEEDED or FAILED before treating the data as current. Because it bills, it f…

ParameterTypeDescription
dataSourceId *stringData source ID, as reported by gog_sheets_datasource_list
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.
confirmTokenstringONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has see…
forceRefreshbooleanRefresh even when the previous execution failed

gog_sheets_datasource_delete

Delete a Connected Sheets data source. This is WIDER than it sounds: it also deletes the source's linked DATA_SOURCE sheet, and unlinks every extract, chart and pivot table built on it elsewhere in the spreadsheet — objects on other tabs that the caller never named. Take gog_sheets_snapshot first if any of that matters. The BigQuery data itself is untouched; only the spreadsheet's connection to it goes away. BIGQUERY-BACKED SOURCES NEED AN EXTRA SCOPE: ordinary sheets authorization does not request https://www.googleapis.com/auth/bigquery.readonly, and Google refuses the whole response witho…

ParameterTypeDescription
dataSourceId *stringData source ID, as reported by gog_sheets_datasource_list
spreadsheetId *stringSpreadsheet ID
accountstringGoogle account email to use, e.g. you@gmail.com — must be the full address, not a bare username. Overrides the GOG_ACCOUNT env var. Omit to use the single configured account.