gworkspace-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GSHEETS_PROFILE | No | Profile to load, same as --profile. | |
| GSHEETS_AUDIT_LOG | No | Alternative audit log path. | |
| GSHEETS_CLIENT_ID | No | OAuth client ID, used instead of client.json. | |
| GSHEETS_READ_ONLY | No | Set to 1 to register only the discovery and read tools, same as --read-only. | |
| GSHEETS_CONFIG_DIR | No | Where profiles live. Defaults to config/ beside dist/. | |
| GSHEETS_ALLOWED_IDS | No | Comma-separated spreadsheet and document ids; writes to anything else are refused. | |
| GSHEETS_CLIENT_FILE | No | Alternative path to the client JSON. | |
| GSHEETS_CLIENT_SECRET | No | OAuth client secret, used with GSHEETS_CLIENT_ID instead of client.json. | |
| GSHEETS_DEFAULT_ACCOUNT | No | Account to act as when a tool call does not name one. | |
| GSHEETS_FORCE_FILE_TOKENS | No | Set to 1 to skip the Keychain and use the 0600 file store. | |
| GSHEETS_ENABLE_TITLE_SEARCH | No | Set to 1 to add the drive.metadata.readonly scope at next login; no tool uses it yet. Off by default. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Google Sheets and Google Docs, full API coverage. SHEETS: call sheets_describe first — it returns each tab's sheetId and used range, which every other tool needs and which stops reads from asking for empty cells. Reads are capped and report a nextRange when truncated. DOCS: call docs_describe for the outline, then docs_find to get exact index ranges for text you want to change. Docs indices are document-wide character offsets that shift on every edit, so never reuse an index across separate calls — batch edits instead, and this server reorders them back-to-front for you. docs_replace_text carries no indices at all and is the safest way to change wording. Every mutating tool accepts dryRun:true, which returns the request it would send without sending it.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| sheets_describeA | Structure of a spreadsheet with no cell data: tabs with sheetId, index, allocated and USED ranges, frozen rows/columns, named ranges, protected ranges, and chart/conditional-format counts. Call this before any read or structural edit — the used range is what lets a read target A1:G412 instead of A:ZZ. |
| sheets_accountsB | Google accounts this server can act as, the active default, granted scopes, and write configuration. |
| sheets_readA | Read one or more A1 ranges in a single call. valueRender FORMULA returns formula text rather than results. Output is TSV by default and capped; a truncated range reports nextRange to continue from. |
| sheets_inspectC | Per-cell detail values cannot express: formulas, notes, data validation rules, effective formatting, hyperlinks. Keep the range small — the payload per cell is large. |
| docs_describeA | Outline of a Google Doc without its full text: title, heading tree with index ranges, table positions, body length, named styles, tabs. Call this first to see the shape of a document before reading or editing it. |
| docs_readA | Plain text of a document, optionally sliced by index range and capped. Set withIndices to get per-run index boundaries for targeting edits. |
| docs_findA | Locate exact text and return document index ranges for each match. This is the safe way to obtain indices for docs_format or docs_delete — they are measured now rather than guessed, and matches spanning formatting boundaries are handled. Indices are valid only until the next edit. |
| sheets_writeC | Write values to one or more A1 ranges in a single batch. valueInput USER_ENTERED (default) parses input as if typed, so formulas and dates work; RAW stores literal text. Supports dryRun. |
| sheets_appendB | Append rows below the last populated row of a table. Supports dryRun. |
| sheets_clearB | Clear values from A1 ranges, leaving formatting intact. Supports dryRun. |
| sheets_find_replaceA | Find and replace across a range, a tab, or every tab. Optional regex, case and whole-cell matching. Returns the number of occurrences changed. Supports dryRun. |
| sheets_createB | Create a new spreadsheet with the given title and tabs. Returns its id and URL. |
| sheets_manage_tabsC | Add, delete, duplicate, rename, reorder, hide/show or resize tabs. Supports dryRun. |
| sheets_formatB | Number formats, fonts, colours, borders, alignment, wrapping, merges, frozen panes, and column/row sizing. Uses a precise field mask, so formatting you do not mention is left alone. Supports dryRun. |
| sheets_data_toolsC | Data validation rules, conditional formatting, basic filters and range sorting. Supports dryRun. |
| sheets_named_rangesB | Create, update and delete named ranges; protect and unprotect ranges or whole tabs. Supports dryRun. |
| sheets_batch_update_rawA | Send literal Sheets API v4 Request objects. Covers the entire API, including charts, pivot tables, slicers and developer metadata, which the grouped tools do not wrap. GridRange indices are zero-based and end-exclusive. Take sheetId values from sheets_describe, and run with dryRun first when the request shape is not obvious. |
| docs_insertA | Insert text at an index, at the end of the body, or before/after existing text. Several insertions are applied back-to-front in one batch so earlier ones cannot shift the indices later ones rely on. Supports dryRun. |
| docs_replace_textA | Find and replace text throughout a document. Carries no indices, so it is immune to index drift and is the safest way to change wording. Supports dryRun. |
| docs_deleteA | Delete index ranges, end-exclusive. Get the ranges from docs_find. Applied back-to-front. Supports dryRun. |
| docs_formatA | Bold/italic/underline, font, size, colours, links; paragraph named styles (headings), alignment, spacing; bullets and numbering. Uses a precise field mask, so styling you do not mention is left alone. Supports dryRun. |
| docs_tableB | Insert a table, optionally populating its cells. Populating costs a second round trip, because cell indices do not exist until the table does. Supports dryRun. |
| docs_createB | Create a new Google Doc with a title and optional initial text. Returns its id and URL. |
| docs_batch_update_rawA | Send literal Docs API v1 Request objects. Covers the whole API, including inline images, headers and footers, footnotes, bookmarks and positioned objects, which the grouped tools do not wrap. Indices are document-wide and end-exclusive; requests are reordered back-to-front automatically. Use dryRun first. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 24 tools
Most tools target a clearly distinct resource+action, and the docs/sheets prefix plus explicit guidance (describe before read, find before format/delete) keeps selection predictable. The main soft spots are the catch-all groupings — sheets_data_tools vs sheets_format vs sheets_named_ranges, and sheets_write vs sheets_append vs the two *_batch_update_raw escape hatches — where an agent must read descriptions carefully to know which wrapper owns a given operation.
Every tool follows the same snake_case prefix_action pattern (docs_*, sheets_*), with consistent verb placement and parallel operations across the two surfaces (describe/read/format/create/batch_update_raw). Minor outliers like sheets_accounts and sheets_data_tools are still readable and clearly namespaced.
24 tools is on the heavy side but is defensible for two large Google APIs, with grouped wrappers and a raw escape hatch rather than one tool per API endpoint. A few grouped tools (sheets_data_tools, sheets_named_ranges) could plausibly be merged, so it is slightly over the ideal band rather than badly scoped.
Both domains have full lifecycle coverage: create/read/describe, insert/append/write, find, replace, delete/clear, format, and structural edits, plus *_batch_update_raw to reach anything unwrapped. No obvious dead ends for document or spreadsheet editing workflows.