gogcli-mcp-docs
v4.12.0Extended Google Docs for Claude via gogcli — auth + full Docs and comments 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.
| Parameter | Type | Description |
|---|---|---|
email * | string | Google account email to authorize |
extraScopes | string | Additional 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… |
services | string | Services to authorize: "all" or comma-separated list (e.g. "sheets,gmail,calendar"). Default: "docs". Prefer the narrowest set you need — requesting a service whose Google API is not enabled on the… |
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…
| Parameter | Type | Description |
|---|---|---|
email * | string | Google account email to authorize |
extraScopes | string | Additional 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… |
services | string | Services to authorize: "all" or comma-separated list (e.g. "sheets,gmail,calendar"). Default: "docs". Prefer the narrowest set you need — requesting a service whose Google API is not enabled on the… |
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.
| Parameter | Type | Description |
|---|---|---|
email * | string | Google account email being authorized (same as step 1) |
redirectUrl * | string | The 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). |
extraScopes | string | Extra 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. |
services | string | Services authorized — MUST match the value passed to gog_auth_add_url. Default: "docs". |
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…
| Parameter | Type | Description |
|---|---|---|
args * | array | Additional positional args and flags |
subcommand * | string | The gog auth subcommand to run, e.g. "alias", "list", "status" |
gog_docs_info
Get Google Doc metadata: title, ID, and other properties.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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_docs_cat
Read a Google Doc as plain text.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
chips | boolean | Render Google Docs smart chips (people, dates, rich links) inline in the text output |
gog_docs_create
Create a new Google Doc. Returns JSON with the new docId and URL.
| Parameter | Type | Description |
|---|---|---|
title * | string | Title for the new document |
account | string | Google 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_docs_write
Write text content to a Google Doc, replacing existing body content by default. Set append=true to add after existing content.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
text * | string | Text content to write |
account | string | Google 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. |
append | boolean | Append to existing content instead of replacing (default: false) |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin in gogcli-mcp-docs) instead of applying it — nothing changes in the doc until the batch is submitted. |
bulletPreset | string | Write a bulleted list with a specific Google Docs bullet glyph preset (e.g. BULLET_DISC_CIRCLE_SQUARE) |
bullets | boolean | Write the paragraphs as a bulleted list with the default disc preset |
checkOrphans | boolean | Block the write (exit code 11) if it would orphan an open comment — i.e. remove the text the comment is anchored to. Recommended for replacement writes on commented docs. |
indentEnd | number | Paragraph end indentation in points |
indentFirstLine | number | Paragraph first-line indentation in points |
indentStart | number | Paragraph start indentation in points |
keepLinesTogether | boolean | Keep all lines of the paragraph on one page/column (true) or clear that setting (false) |
keepWithNext | boolean | Keep the paragraph with the next paragraph (true) or clear that setting (false) |
noBullets | boolean | Remove bullets or numbering from the written paragraphs |
ordered | boolean | Write the paragraphs as a numbered list with the default decimal preset |
spaceAbove | number | Space above the paragraph in points |
spaceBelow | number | Space below the paragraph in points |
gog_docs_find_replace
Find and replace text in a Google Doc.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
find * | string | Text to find |
replace * | string | Replacement text |
account | string | Google 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_docs_structure
Show a Google Doc's structure with numbered paragraphs. Useful for understanding the document layout before making index-based edits.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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_docs_run
Run any gog docs subcommand not covered by the other tools. Run `gog docs --help` for the full list of subcommands, or `gog docs <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 dedicated…
| Parameter | Type | Description |
|---|---|---|
args * | array | Additional positional args and flags |
subcommand * | string | The gog docs subcommand to run, e.g. "copy", "clear", "insert", "sed", "export" |
account | string | Google 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_docs_copy
Copy a Google Doc to a new document with the given title.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
title * | string | Title for the new copy |
account | string | Google 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. |
parent | string | Parent folder ID to place the copy in |
gog_docs_delete
Delete content within a Google Doc by character index range. To remove the entire document (move to Drive trash), use gog_docs_trash.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
at | string | Anchor by literal text and delete that matched range, instead of supplying start/end indices. |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
end | number | End index (character position, exclusive). Required unless `at` is set. |
matchCase | boolean | Case-sensitive `at` matching |
occurrence | integer | Use the Nth `at` match (1-based; required when `at` is ambiguous) |
segment | string | Target an exact header, footer, or footnote segment ID (header/footer IDs come from gog_docs_header_list / gog_docs_footer_list; footnote segment IDs appear in gog_docs_read json mode) instead of the… |
start | number | Start index (character position, 1-based). Required unless `at` is set. |
tabId | string | Tab ID to delete content from (for multi-tab docs) |
gog_docs_trash
Move an entire Google Doc to Drive trash. Convenience wrapper around `gog drive delete` so docs-only users can clean up without installing gogcli-mcp-drive. The doc remains recoverable from Drive trash for ~30 days.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID to move to trash |
account | string | Google 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_docs_edit
Edit a Google Doc by finding and replacing text (stream-edit style).
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
find * | string | Text to find |
replace * | string | Replacement text |
account | string | Google 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. |
matchCase | boolean | Case-sensitive matching |
gog_docs_read
Read the content of a Google Doc. Default: plain text body. Use format="json" for the raw Google Docs API response (lossless, includes character indices needed for index-based gog_docs_insert / gog_docs_delete calls). For markdown output, use gog_docs_export with format="md" — it writes to a file. Use gog_docs_structure to see paragraph-by-paragraph layout with indices.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
allTabs | boolean | Show all tabs. In json mode, returns the canonical Document response with all tab content populated. |
chips | boolean | Render Google Docs smart chips (people, dates, rich links) inline in text mode; ignored in json mode |
format | string | Output format (default: text) |
maxBytes | number | Max bytes to read in text mode (0 = unlimited; default 2000000) |
tab | string | Target tab title or ID. In json mode, returns that one tab in the legacy top-level Document shape. |
gog_docs_format
Apply text or paragraph formatting to a Google Doc. Use `match` to format a specific text occurrence, `matchAll` to format every occurrence, or omit both to format the whole doc. Boolean flags (bold/italic/etc.) set the attribute; negated flags (noBold/noItalic/etc.) clear it.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
alignment | string | Paragraph alignment |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
bgColor | string | Text background color as #RRGGBB or #RGB |
bold | boolean | Set bold |
bulletPreset | string | Create a bulleted list with a specific Google Docs bullet glyph preset (e.g. BULLET_DISC_CIRCLE_SQUARE) |
bullets | boolean | Turn the matched paragraphs into a bulleted list with the default disc preset |
code | boolean | Apply code style (Courier New monospace + grey background) |
fontFamily | string | Font family (e.g. Arial, Georgia) |
fontSize | number | Font size in points |
headingLevel | integer | Set paragraph named style to HEADING_1..HEADING_6 (shortcut for namedStyle=HEADING_N) |
indentEnd | number | Paragraph end indentation in points |
indentFirstLine | number | Paragraph first-line indentation in points |
indentStart | number | Paragraph start indentation in points |
italic | boolean | Set italic |
keepLinesTogether | boolean | Keep all lines of the paragraph on one page/column (true) or clear that setting (false) |
keepWithNext | boolean | Keep the paragraph with the next paragraph (true) or clear that setting (false) |
lineSpacing | number | Line spacing percentage (e.g. 100 for single, 150 for 1.5x, 200 for double) |
link | string | Set a hyperlink on the matched text. Accepts http://, https://, mailto:, #bookmarkId, or #heading-slug. |
match | string | Format only the first text match |
matchAll | boolean | Format all matches instead of only the first |
matchCase | boolean | Case-sensitive matching |
namedStyle | string | Set paragraph named style explicitly |
noBold | boolean | Clear bold |
noBullets | boolean | Remove bullets or numbering from the matched paragraphs |
noItalic | boolean | Clear italic |
noLink | boolean | Clear any hyperlink on the matched text |
noStrikethrough | boolean | Clear strikethrough |
noUnderline | boolean | Clear underline |
ordered | boolean | Turn the matched paragraphs into a numbered list with the default decimal preset |
segment | string | Target an exact header, footer, or footnote segment ID (header/footer IDs come from gog_docs_header_list / gog_docs_footer_list; footnote segment IDs appear in gog_docs_read json mode) instead of the… |
spaceAbove | number | Space above the paragraph in points |
spaceBelow | number | Space below the paragraph in points |
spacingMode | string | Paragraph spacing collapse behavior: NEVER_COLLAPSE always keeps space-above/space-below; COLLAPSE_LISTS collapses spacing between list items |
strikethrough | boolean | Set strikethrough |
tab | string | Target tab title or ID |
textColor | string | Text color as #RRGGBB or #RGB |
underline | boolean | Set underline |
gog_docs_suggestions_list
List pending suggestions (suggested text insertions and deletions) in a Google Doc, with exact UTF-16 ranges and segment context. Read-only; does not accept or reject suggestions.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
tab | string | Tab title or ID (omit for the first tab) |
gog_docs_export
Export a Google Doc as PDF, plain text, HTML, DOCX, or other format.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
format | string | Export format: pdf, txt, html, docx, rtf, odt, epub (default: pdf) |
out | string | Output file path |
overwrite | boolean | Overwrite the output file if it already exists (gog refuses otherwise) |
gog_docs_insert
Insert text at a specific character index in a Google Doc. When `index` is omitted, gog defaults to 1 (the very beginning), NOT the end — sequential inserts without an explicit index produce reversed output. To append at the end of the doc, use gog_docs_append (which uses `gog docs write --append` and is the right tool for iterative document construction). To find a valid index for mid-document inserts, call gog_docs_structure or gog_docs_read first.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
at | string | Anchor by literal text and insert at the start of the matched range, instead of computing an index. |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
content | string | Text content to insert |
file | string | Path to a file whose content to insert |
index | number | Character index to insert at (1-based; default: 1 = start of doc). Prefer gog_docs_append when you want to add at the end. |
matchCase | boolean | Case-sensitive `at` matching |
occurrence | integer | Use the Nth `at` match (1-based; required when `at` is ambiguous) |
segment | string | Target an exact header, footer, or footnote segment ID (header/footer IDs come from gog_docs_header_list / gog_docs_footer_list; footnote segment IDs appear in gog_docs_read json mode) instead of the… |
tabId | string | Tab ID to insert into (for multi-tab docs) |
gog_docs_append
Append text to the end of a Google Doc. This is the right tool for iterative document construction — multiple sequential calls produce content in the order they were called. Use gog_docs_insert only when you need to insert at a specific character position. Known markdown=true limitations (tracked upstream): (a) 3+ tables in one call reorders the trailing punctuation of the paragraph before the 3rd table — split into multiple calls with ≤2 tables each (openclaw/gogcli#607); (b) inline **bold** / *italic* / `code` inside table cells renders as literal characters — pre-format cell text se…
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
file | string | Path to a text file to append, read on the gog server. gog also accepts "-" for stdin, but this server never writes to gog's stdin, so "-" would hang until the call times out. |
markdown | boolean | Convert markdown to Google Docs formatting (headings, bold, lists, etc.). See the tool description for known upstream limitations around tables. |
tab | string | Target tab title or ID (for multi-tab docs) |
text | string | Text content to append |
gog_docs_list_tabs
List all tabs in a Google Doc.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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_docs_sed
Stream-edit a Google Doc with sed-like regex expressions (s/find/replace/ syntax).
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
expression | string | Single sed expression (e.g. "s/old/new/g") |
expressions | array | Multiple sed expressions |
file | string | Path to a sed script file |
tab | string | Tab name to edit |
gog_docs_update
Update a Google Doc — insert or replace text at a specific position.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
at | string | Anchor by literal text and replace that matched range, instead of supplying an index or replaceRange. |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
file | string | Path to a file whose content to use |
index | number | Character index to insert at |
markdown | boolean | Convert markdown in the text/file to Google Docs formatting (headings, bold, lists, etc.) instead of inserting it literally. |
matchCase | boolean | Case-sensitive `at` matching |
occurrence | integer | Use the Nth `at` match (1-based; required when `at` is ambiguous) |
pageless | boolean | Set document to pageless format |
replaceRange | string | Replace a UTF-16 Docs API range START:END (e.g. "25:40") instead of inserting at index. The replacement text/file content overwrites the range. |
segment | string | Target an exact header, footer, or footnote segment ID (header/footer IDs come from gog_docs_header_list / gog_docs_footer_list; footnote segment IDs appear in gog_docs_read json mode) instead of the… |
tabId | string | Tab ID for multi-tab docs |
text | string | Text content to write |
gog_docs_comments_list
List comments on a Google Doc. Returns open comments by default; set includeResolved=true to include resolved comments. Set locate=true (or pass tab) to attach each comment's tab and Docs index ranges as location.matches[] plus location.orphaned — that costs one extra document fetch, but only one for the whole listing, where gog_docs_comments_locate costs one per comment. Either flag additionally requires the Docs scope; the plain listing needs only Drive. matches[] always spans every tab, so a quote appearing in two tabs is visible as an ambiguity rather than silently resolved. tab keeps on…
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
all | boolean | Fetch all pages |
includeResolved | boolean | Include resolved comments (default: false, open only) |
locate | boolean | Attach each comment's tab and Docs index ranges (location.matches[] + location.orphaned) using one extra document fetch shared across the whole listing |
max | integer | Max results |
page | string | Deprecated alias for pageToken, accepted so existing callers keep working. Use pageToken — it matches the nextPageToken field in the response. |
pageToken | string | Cursor for the NEXT page. Pass back the nextPageToken from a previous response verbatim, keeping the query and max identical: call once, then call again with pageToken=<that value>. A response with NO… |
since | string | Only return comments modified at or after this RFC3339 timestamp (e.g. 2026-06-01T00:00:00Z) |
tab | string | Only return comments whose quoted text resolves inside this tab (title or ID). Implies locate, and drops orphaned and unquoted comments. |
gog_docs_comments_get
Get a single comment by ID, including its replies.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | Comment ID |
docId * | string | Doc ID (from the URL) |
account | string | Google 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_docs_comments_add
Add a comment to a Google Doc. Optionally attach quoted text that appears as the highlighted passage in the Google Docs UI. The Doc's owner and everyone the text +mentions are notified, so this reads the Doc and asks the MCP host to show the user a confirmation prompt with the Doc, the text and who is mentioned first; nothing is posted unless they accept. If the client cannot show that prompt (no MCP elicitation, e.g. claude.ai), a two-step flow applies instead: call WITHOUT confirmToken and nothing is sent or changed — the result has status "confirmation-required", the full preview and a co…
| Parameter | Type | Description |
|---|---|---|
content * | string | Comment text |
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
confirmToken | string | ONLY 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… |
quoted | string | Quoted text to attach to the comment (shown in UIs when available) |
gog_docs_comments_reply
Reply to an existing comment on a Google Doc. Everyone on the thread and anyone the reply +mentions is notified, so this reads the Doc and the comment and asks the MCP host to show the user a confirmation prompt with both and the reply first; nothing is posted unless they accept. If the client cannot show that prompt (no MCP elicitation, e.g. claude.ai), a two-step flow applies instead: call WITHOUT confirmToken and nothing is sent or changed — the result has status "confirmation-required", the full preview and a confirmToken. Follow its instruction (by default: show the preview to the user…
| Parameter | Type | Description |
|---|---|---|
commentId * | string | Comment ID to reply to |
content * | string | Reply text |
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
confirmToken | string | ONLY 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_docs_comments_resolve
Resolve a comment (mark as done). Optionally include a closing message.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | Comment ID to resolve |
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
message | string | Optional message to include when resolving |
gog_docs_comments_delete
Delete a comment from a Google Doc. This action is permanent.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | Comment ID to delete |
docId * | string | Doc ID (from the URL) |
account | string | Google 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_docs_comments_reopen
Reopen a previously resolved comment (flip resolved → open).
| Parameter | Type | Description |
|---|---|---|
commentId * | string | Comment ID to reopen |
docId * | string | Doc ID (from the URL) |
account | string | Google 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_docs_comments_locate
Locate a comment's anchor in a Google Doc — resolves the comment's quoted text to its current Docs API index range, or reports the comment as orphaned if the quote can no longer be found (e.g. the anchored text was edited away). Read-only; useful before an index-based edit near a comment.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | Comment ID to locate |
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
matchCase | boolean | Case-sensitive matching of the comment quote |
normalizeWhitespace | boolean | Collapse whitespace while matching the comment quote |
tab | string | Target a specific tab by title or ID |
gog_docs_find_range
Map literal text in a Google Doc to its Docs API UTF-16 index range(s). Read-only helper for computing the start/end indices that index-based tools (gog_docs_delete, gog_docs_update --replace-range) need. Returns the first match by default; use occurrence to pick a specific one or all to return every match.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
text * | string | Literal text to locate |
account | string | Google 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. |
all | boolean | Return all matches instead of just one |
failEmpty | boolean | Treat no matches as an error instead of returning an empty result |
matchCase | boolean | Case-sensitive matching |
normalizeWhitespace | boolean | Collapse whitespace while matching |
occurrence | integer | Return the Nth occurrence (1-based; default: first) |
segment | string | Target an exact header, footer, or footnote segment ID (header/footer IDs come from gog_docs_header_list / gog_docs_footer_list; footnote segment IDs appear in gog_docs_read json mode) instead of the… |
tab | string | Target a specific tab by title or ID |
gog_batch_begin
Open a persisted, revision-locked request batch for a Google Doc. Subsequent docs mutation tools called with batch=<batchId> append their requests locally instead of applying them; gog_batch_end submits everything atomically. Returns the batchId.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Google Doc ID the batch is locked to |
account | string | Google 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. |
name | string | Optional batch label |
gog_batch_end
Submit a persisted batch: applies every composed request to the doc in one atomic batchUpdate against the locked revision. Atomic by default — set autoSplit to submit >500-request batches as ordered chunks (non-atomic), or continueOnError to retry individually after an atomic validation failure, retaining failures in the batch.
| Parameter | Type | Description |
|---|---|---|
batchId * | string | Batch ID (from gog_batch_begin) |
account | string | Google 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. |
autoSplit | boolean | Submit batches over 500 requests as ordered chunks (non-atomic) |
continueOnError | boolean | After an atomic validation failure, submit requests individually and retain failures |
gog_batch_abort
Discard a persisted batch and its composed requests without applying anything to the doc.
| Parameter | Type | Description |
|---|---|---|
batchId * | string | Batch ID to discard |
account | string | Google 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_batch_list
List persisted Docs request batches (id, doc, label, request count, status).
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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_batch_show
Show one persisted batch: its doc, locked revision, and the composed requests awaiting submission.
| Parameter | Type | Description |
|---|---|---|
batchId * | string | Batch ID |
account | string | Google 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_batch_prune
Delete stale persisted batches (not updated within olderThan).
| Parameter | Type | Description |
|---|---|---|
account | string | Google 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. |
olderThan | string | Delete batches not updated within this duration (e.g. 72h, 7d) |
gog_docs_table_column_width
Set a fixed width (in points) for a table column, or reset columns to Docs-managed even distribution. Target the table by 1-based index in document order (negative counts from the end) and the column by 1-based number. Pass evenlyDistributed without col to reset every column in the table.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
col | integer | 1-based column number. Omit with evenlyDistributed to reset all columns. |
evenlyDistributed | boolean | Reset the selected column (or all columns when col is omitted) to Docs-managed equal width. |
tab | string | Target tab title or ID |
tableIndex | integer | 1-based table index in document order; negative counts from the end (default: 1) |
width | number | Fixed column width in points (minimum 5pt). Mutually exclusive with evenlyDistributed. |
gog_docs_table_row_insert
Insert a row into a native Google Docs table, optionally populated from a JSON string array. Inserts before the 1-based position given by `at` (negative counts from the end; "end" appends — the default).
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
at | string | Insert before this 1-based row, a negative index from the end, or "end" to append (default: end) |
tab | string | Target a specific tab by title or ID |
table | string | Table selector: 1-based index (negative from the end), exact first-cell text, * for the only table, or text:VALUE for numeric/syntax-looking first-cell text (default: 1) |
valuesJson | string | JSON string array with the new row's cell values, e.g. ["Name","Qty"] |
gog_docs_table_row_delete
Delete a row from a native Google Docs table by 1-based row number (negative counts from the end). The row's cell content is lost.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
row * | integer | 1-based row number; negative indexes count from the end |
account | string | Google 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. |
tab | string | Target a specific tab by title or ID |
table | string | Table selector: 1-based index (negative from the end), exact first-cell text, * for the only table, or text:VALUE for numeric/syntax-looking first-cell text (default: 1) |
gog_docs_table_column_insert
Insert a column into a native Google Docs table. Inserts before the 1-based position given by `at` (negative counts from the end; "end" appends — the default).
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
at | string | Insert before this 1-based column, a negative index from the end, or "end" to append (default: end) |
tab | string | Target a specific tab by title or ID |
table | string | Table selector: 1-based index (negative from the end), exact first-cell text, * for the only table, or text:VALUE for numeric/syntax-looking first-cell text (default: 1) |
gog_docs_table_column_delete
Delete a column from a native Google Docs table by 1-based column number (negative counts from the end). The column's cell content is lost.
| Parameter | Type | Description |
|---|---|---|
col * | integer | 1-based column number; negative indexes count from the end |
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
tab | string | Target a specific tab by title or ID |
table | string | Table selector: 1-based index (negative from the end), exact first-cell text, * for the only table, or text:VALUE for numeric/syntax-looking first-cell text (default: 1) |
gog_docs_table_merge
Merge a rectangular cell range in a native Google Docs table. Content of non-first cells in the range is absorbed/discarded by the merge — use gog_docs_table_unmerge to split back.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
range * | string | 1-based cell range r1,c1:r2,c2 (e.g. "1,1:2,3") |
account | string | Google 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. |
tab | string | Target a specific tab by title or ID |
table | string | Table selector: 1-based index (negative from the end), exact first-cell text, * for the only table, or text:VALUE for numeric/syntax-looking first-cell text (default: 1) |
gog_docs_table_unmerge
Unmerge (split) the merged region containing a given cell in a native Google Docs table.
| Parameter | Type | Description |
|---|---|---|
cell * | string | 1-based cell r,c inside the merged region (e.g. "1,1") |
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
tab | string | Target a specific tab by title or ID |
table | string | Table selector: 1-based index (negative from the end), exact first-cell text, * for the only table, or text:VALUE for numeric/syntax-looking first-cell text (default: 1) |
gog_docs_named_range_create
Create a named range — a durable, tab-aware anchor over a span of document text that survives subsequent edits (unlike raw indices). Anchor by literal text (`at`) or explicit UTF-16 start/end indices. Pair with gog_docs_named_range_replace for repeatable templated updates.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
name * | string | Unique named range name |
account | string | Google 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. |
at | string | Create the range around this literal matched text, instead of start/end indices |
end | integer | Range end UTF-16 index (exclusive). Required with start unless `at` is set. |
matchCase | boolean | Case-sensitive `at` matching |
occurrence | integer | Use the Nth `at` match (1-based; required when `at` is ambiguous) |
start | integer | Range start UTF-16 index (inclusive). Required with end unless `at` is set. |
tab | string | Target a specific tab by title or ID |
gog_docs_named_range_list
List named ranges in a Google Doc, optionally filtered by name.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
name | string | Only return ranges with this name |
tab | string | Target a specific tab by title or ID |
gog_docs_named_range_delete
Delete a named range (the anchor only — the underlying document text is untouched).
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
nameOrId * | string | Named range name or ID |
account | string | Google 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. |
tab | string | Target a specific tab by title or ID |
gog_docs_named_range_replace
Replace the text inside a named range with new content (inline or from a file), keeping the anchor for future updates — the templated-update workhorse.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
nameOrId * | string | Named range name or ID |
account | string | Google 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. |
file | string | Path to a file with the replacement text |
tab | string | Target a specific tab by title or ID |
text | string | Replacement text |
gog_docs_tables_list
Enumerate the native tables in a Google Doc (dimensions, position) — the index/first-cell-text it reports feeds the `table` selector on the table-row/column/merge tools.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
tab | string | Tab title or ID (omit for default) |
gog_docs_images_list
Enumerate inline/positioned images in a Google Doc.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
tab | string | Tab title or ID (omit for default) |
gog_docs_headings_list
Enumerate headings in a Google Doc (a lightweight outline view), optionally filtered to one heading level.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
level | integer | Only return this heading level (1-6) |
tab | string | Tab title or ID (omit for default) |
gog_docs_paragraphs_list
Enumerate paragraphs in a Google Doc with emptiness, text-run ranges, styles, and links — richer than gog_docs_structure when you need per-run detail. Optionally filter to one named style.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
style | string | Only return this named style (e.g. NORMAL_TEXT or HEADING_2) |
tab | string | Tab title or ID (omit for default) |
gog_docs_insert_page_break
Insert a Google Docs page break via InsertPageBreakRequest — the only path for multi-page deliverables (markdown has no page-break construct). Specify `index` for a precise character position, or `atEnd` for end-of-doc.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
at | string | Anchor by literal text and insert the page break at the start of the matched range, instead of an index. |
atEnd | boolean | Insert at end-of-doc/tab (mutually exclusive with index) |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
index | integer | Character index to insert at (1 = beginning). Omit or use atEnd for end-of-doc. |
matchCase | boolean | Case-sensitive `at` matching |
occurrence | integer | Use the Nth `at` match (1-based; required when `at` is ambiguous) |
tab | string | Target a specific tab by title or ID |
gog_docs_page_layout
Toggle the page layout (pageless | pages) of an existing Google Doc. Sibling to the --pageless flag on docs create/write/update for docs that were already created (e.g. by Drive markdown conversion) without the desired layout.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
layout | string | Page layout (default: pageless) |
marginBottom | string | Bottom page margin (points by default; supports pt, in, cm, mm) |
marginLeft | string | Left page margin (points by default; supports pt, in, cm, mm) |
marginRight | string | Right page margin (points by default; supports pt, in, cm, mm) |
marginTop | string | Top page margin (points by default; supports pt, in, cm, mm) |
pageHeight | string | Page height (points by default; supports pt, in, cm, mm) |
pageSize | string | Named page size preset (only applies in paged layout) |
pageWidth | string | Page width (points by default; supports pt, in, cm, mm — e.g. "8.5in") |
gog_docs_insert_table
Insert a native Google Docs table via InsertTableRequest, bypassing the markdown writer. Use this instead of writing a markdown table when you need precise dimensions or to avoid the markdown writer's table limitations. `valuesJson` is a JSON 2D string array whose dimensions must match rows x cols.
| Parameter | Type | Description |
|---|---|---|
cols * | integer | Number of columns (>=1) |
docId * | string | Doc ID (from the URL) |
rows * | integer | Number of rows (>=1) |
account | string | Google 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. |
atEnd | boolean | Insert at end-of-doc/tab (mutually exclusive with index) |
index | integer | Character index to insert at (1 = beginning). Omit or use atEnd for end-of-doc. |
tab | string | Target a specific tab by title or ID |
valuesJson | string | Cell values as a JSON 2D string array; dimensions must match rows x cols when supplied |
gog_docs_cell_update
Replace (or append to) the content of a single table cell, addressed by table / row / column — non-destructive to the rest of the table, unlike index-based edits that shift on every change. Provide content inline or read it from contentFile. Note: row/col/tableIndex are 1-based here; the sibling gog_docs_cell_style uses 0-based addressing.
| Parameter | Type | Description |
|---|---|---|
col * | integer | 1-based column number |
docId * | string | Doc ID (from the URL) |
row * | integer | 1-based row number |
account | string | Google 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. |
append | boolean | Append inside the cell instead of replacing existing cell content |
content | string | Replacement content (omit when using contentFile). Pass an empty string to clear the cell. Large values are written to a temp file and passed to gog as --content-file automatically. |
contentFile | string | Read replacement content from a file instead of content. Mutually exclusive with content — gog rejects both together. |
format | string | Content format (default: markdown) |
tab | string | Target a specific tab by title or ID |
tableIndex | integer | 1-based table index in document order; negative counts from the end (default: 1) |
gog_docs_cell_style
Apply background color and/or inline text styling (bold, italic, underline, colors) to one or more table cells, addressed by 0-based row/column with optional spans. Sibling to gog_docs_cell_update, which changes cell content rather than styling. Note: row/col/tableIndex are 0-based here; gog_docs_cell_update uses 1-based addressing.
| Parameter | Type | Description |
|---|---|---|
col * | integer | 0-based column number |
docId * | string | Doc ID (from the URL) |
row * | integer | 0-based row number |
account | string | Google 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. |
backgroundColor | string | Cell background color as #RRGGBB or #RGB |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
bold | boolean | Set cell text bold |
borderAll | string | All borders as WIDTH[,COLOR[,SOLID|DOT|DASH]] (e.g. 1pt,#000,DASH) |
borderBottom | string | Bottom border (same format as borderAll); overrides borderAll |
borderLeft | string | Left border (same format as borderAll); overrides borderAll |
borderRight | string | Right border (same format as borderAll); overrides borderAll |
borderTop | string | Top border (same format as borderAll); overrides borderAll |
colSpan | integer | Number of columns to style (default: 1) |
contentAlign | string | Vertical content alignment within the cell |
italic | boolean | Set cell text italic |
paddingAll | string | All cell padding (points by default; supports pt, in, cm, mm) |
paddingBottom | string | Bottom cell padding; overrides paddingAll |
paddingLeft | string | Left cell padding; overrides paddingAll |
paddingRight | string | Right cell padding; overrides paddingAll |
paddingTop | string | Top cell padding; overrides paddingAll |
rowSpan | integer | Number of rows to style (default: 1) |
tab | string | Target a specific tab by title or ID |
tableIndex | integer | 0-based table index in document order (default: 0) |
textColor | string | Text color as #RRGGBB or #RGB |
underline | boolean | Set cell text underline |
gog_docs_insert_image
Insert an image into a Google Doc from a local file or a public HTTPS URL. file: uploaded to Drive, temporarily shared so Docs can fetch it, inserted, then the public permission is revoked. url: inserted directly with no Drive upload or temporary sharing. Replaces placeholder text (at) or appends at end-of-doc. On a hosted deployment, where no path on your machine exists, upload the image with gog_upload_slots and pass blobKeys instead of file.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
after | string | Insert the image immediately after the first literal text match (no text is deleted) |
at | string | Placeholder text to replace, or "end" to append (default: end) |
before | string | Insert the image immediately before the first literal text match (no text is deleted) |
blobKeys | array | Hosted deployments: blobKeys from gog_upload_slots for files you have ALREADY PUT to their uploadUrl. This is how to send a file you hold (a photo, a PDF) when this server is remote: no base64 in the… |
file | string | PNG, JPEG, or GIF image on the gog server to upload and insert (exactly one of file, url or blobKeys) |
height | number | Image height in points (optional; width-only preserves aspect ratio) |
name | string | Override the uploaded Drive filename |
onRestricted | string | If public sharing is blocked: error out, or fall back to a linked image (default: error) |
parent | string | Drive folder ID for the uploaded image |
tab | string | Target a specific tab by title or ID |
url | string | Public HTTPS image URL to insert directly — no Drive upload or temporary public sharing (exactly one of file, url or blobKeys) |
width | number | Image width in points (default: 468) |
gog_docs_insert_person
Insert a native Google Docs person smart chip (the interactive @-mention chip) for an email address, at a character index or end-of-doc.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
email * | string | Email address for the person chip |
account | string | Google 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. |
at | string | Anchor by literal text, delete the match, and insert the person chip there, instead of an index. |
atEnd | boolean | Insert at end-of-doc/tab (mutually exclusive with index) |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
index | integer | Character index to insert at. Omit or use atEnd for end-of-doc. |
matchCase | boolean | Case-sensitive `at` matching |
occurrence | integer | Use the Nth `at` match (1-based; required when `at` is ambiguous) |
tab | string | Target a specific tab by title or ID |
gog_docs_insert_date_chip
Insert a native Google Docs date smart chip, at a character index or end-of-doc.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
atEnd | boolean | Insert at end-of-doc/tab (mutually exclusive with index) |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
date | string | Date to insert as YYYY-MM-DD (default: today) |
format | string | Date display format (default: abbreviated) |
index | integer | Character index to insert at. Omit or use atEnd for end-of-doc. |
tab | string | Target a specific tab by title or ID |
gog_docs_add_tab
Add a tab to a Google Doc. Tabs partition a doc into independently-addressable sections (multi-tab docs). Optionally set the title, zero-based position, parent tab (for nesting), and an emoji icon.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
iconEmoji | string | Emoji icon for the tab |
index | integer | Zero-based tab position within the parent |
parentTab | string | Parent tab title or ID to nest this tab under |
title | string | User-visible tab title |
gog_docs_rename_tab
Rename a tab in a Google Doc. Identify the existing tab by title or ID and give it a new title.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
tab * | string | Existing tab title or ID to rename |
title * | string | New user-visible tab title |
account | string | Google 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_docs_delete_tab
Delete a tab (and its content) from a Google Doc. Identify the tab by title or ID. This permanently removes the tab and everything in it.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
tab * | string | Existing tab title or ID to delete |
account | string | Google 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_docs_clear
Clear all content from a Google Doc, leaving an empty document. The doc itself is preserved (same ID/URL); only its body content is removed. To delete the whole doc instead, use gog_docs_trash.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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_docs_insert_footnote
Insert a footnote at a character index (or end-of-doc) and populate its text. The footnote reference mark is placed in the body; the footnote content goes in the new footnote segment.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
at | string | Anchor by literal text and place the reference mark at the start of the matched range |
atEnd | boolean | Target end-of-doc/tab (mutually exclusive with index and at) |
file | string | Read footnote text from a file on the gog server. gog also accepts "-" for stdin, but this server never writes to gog's stdin, so "-" would hang until the call times out. |
index | integer | Character index to place the reference mark at (1 = beginning). Omit or use atEnd for end-of-doc. |
matchCase | boolean | Case-sensitive `at` matching |
occurrence | integer | Use the Nth `at` match (1-based; required when `at` is ambiguous) |
tab | string | Target a specific tab by title or ID |
text | string | Footnote text |
gog_docs_insert_section_break
Insert a continuous or next-page section break at a character index (or end-of-doc). Section breaks enable per-section layout such as column counts (see gog_docs_section_columns).
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
at | string | Anchor by literal text and insert at the start of the matched range |
atEnd | boolean | Target end-of-doc/tab (mutually exclusive with index and at) |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
index | integer | Character index to insert at (1 = beginning). Omit or use atEnd for end-of-doc. |
matchCase | boolean | Case-sensitive `at` matching |
occurrence | integer | Use the Nth `at` match (1-based; required when `at` is ambiguous) |
tab | string | Target a specific tab by title or ID |
type | string | Section break type (default: next-page) |
gog_docs_insert_horizontal_rule
Insert a horizontal rule (paragraph border) at a character index (or end-of-doc).
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
at | string | Anchor by literal text and insert at the start of the matched range |
atEnd | boolean | Target end-of-doc/tab (mutually exclusive with index and at) |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
index | integer | Character index to insert at (1 = beginning). Omit or use atEnd for end-of-doc. |
matchCase | boolean | Case-sensitive `at` matching |
occurrence | integer | Use the Nth `at` match (1-based; required when `at` is ambiguous) |
tab | string | Target a specific tab by title or ID |
gog_docs_section_columns
Set the column count (1-3) for the document section containing the target position. Use count=1 to reset to a single column. Anchor by index, end-of-doc, or literal text.
| Parameter | Type | Description |
|---|---|---|
count * | integer | Number of columns (1-3; 1 resets to one column) |
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
at | string | Anchor by literal text and target the section at the start of the matched range |
atEnd | boolean | Target end-of-doc/tab (mutually exclusive with index and at) |
batch | string | Append this mutation to a persisted batch (from gog_batch_begin) instead of applying it — nothing changes in the doc until gog_batch_end submits the batch. |
index | integer | Character index identifying the section (1 = beginning). Omit or use atEnd for end-of-doc. |
matchCase | boolean | Case-sensitive `at` matching |
occurrence | integer | Use the Nth `at` match (1-based; required when `at` is ambiguous) |
separator | string | Column separator line: none or between |
tab | string | Target a specific tab by title or ID |
gog_docs_header_list
List a Google Doc's headers and their segment IDs. Use a segment ID with the segment param on gog_docs_insert / gog_docs_update / gog_docs_delete / gog_docs_format / gog_docs_find_range to edit inside a header.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
tab | string | Limit results to a tab title or ID |
gog_docs_header_create
Create a header in a Google Doc and optionally populate its initial text. Returns the new header segment ID.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
at | string | Anchor by literal text and target the section at the start of the matched range |
atEnd | boolean | Target end-of-doc/tab (mutually exclusive with index and at) |
file | string | Read initial header text from a file on the gog server. gog also accepts "-" for stdin, but this server never writes to gog's stdin, so "-" would hang until the call times out. |
index | integer | Character index identifying the section the header belongs to (1 = beginning). Omit or use atEnd for end-of-doc. |
matchCase | boolean | Case-sensitive `at` matching |
occurrence | integer | Use the Nth `at` match (1-based; required when `at` is ambiguous) |
tab | string | Target a specific tab by title or ID |
text | string | Initial header text |
gog_docs_header_delete
Delete a header from a Google Doc by its segment ID (from gog_docs_header_list).
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
headerId * | string | Header segment ID (from gog_docs_header_list) |
account | string | Google 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. |
tab | string | Tab title or ID containing the header |
gog_docs_replace_image
Replace an existing image in a Google Doc in place — keeping its position and bounds — with a new image from a local file or public HTTPS URL. Target the image by exact object ID (from gog_docs_images_list), by alt-text substring, or leave both off to replace the only image in the doc/tab. On a hosted deployment, where no path on your machine exists, upload the image with gog_upload_slots and pass blobKeys instead of file.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
blobKeys | array | Hosted deployments: blobKeys from gog_upload_slots for files you have ALREADY PUT to their uploadUrl. This is how to send a file you hold (a photo, a PDF) when this server is remote: no base64 in the… |
file | string | PNG, JPEG, or GIF image on the gog server to upload and use (exactly one of file, url or blobKeys) |
matchAlt | string | Select the image whose alt text contains this value (case-insensitive) |
name | string | Override the uploaded Drive filename (file mode) |
objectId | string | Exact image object ID to replace (from gog_docs_images_list) |
parent | string | Drive folder ID for an uploaded local image (file mode) |
tab | string | Target a specific tab by title or ID |
url | string | Public HTTPS image URL to use directly — no Drive upload (exactly one of file, url or blobKeys) |
gog_docs_table_row_pin_header
Pin (or unpin) leading rows of a native Google Docs table as repeating header rows. rows=N pins the first N rows; rows=0 unpins all header rows.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
rows * | integer | Number of leading rows to pin as headers; 0 unpins all header rows |
account | string | Google 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. |
tab | string | Target a specific tab by title or ID |
table | string | Table selector: 1-based index (negative from the end), exact first-cell text, * for the only table, or text:VALUE for numeric/syntax-looking first-cell text (default: 1) |
gog_docs_table_row_style
Set native table row height and page-overflow behaviour. Target a 1-based row (negative counts from the end) or omit row to style every row in the table.
| Parameter | Type | Description |
|---|---|---|
docId * | string | Doc ID (from the URL) |
account | string | Google 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. |
minHeight | string | Minimum row height (points by default; supports pt, in, cm, mm) |
preventOverflow | boolean | Keep the row within one page or column (true) or clear that setting (false) |
row | integer | 1-based row number; negative indexes count from the end; omit to style all rows |
tab | string | Target a specific tab by title or ID |
table | string | Table selector: 1-based index (negative from the end), exact first-cell text, * for the only table, or text:VALUE for numeric/syntax-looking first-cell text (default: 1) |
gog_upload_slots
HOSTED DEPLOYMENTS: how to give this server a FILE you hold (a photo, a PDF, an .eml). This server runs remotely and cannot read paths on your machine, so call this first with the files' names: it returns one signed upload slot per file. PUT each file's bytes to its uploadUrl (each slot carries a ready `curl` command — replace the <path to …> placeholder; the Content-Type must be exactly the slot's mimeType), then pass the slots' blobKeys in the `blobKeys` parameter of the tool that takes the file: gog_gmail_send, gog_gmail_reply, gog_gmail_reply_all, gog_gmail_drafts_create, gog_gmail_dra…
| Parameter | Type | Description |
|---|---|---|
files * | array | One entry per file: {filename, mimeType?}. The filename is the name the recipient / Drive will show, and its extension is how gog types an attachment — give it the right one. |