-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Summary
Implementing Google Sheets write tools (create, update, append, clear, add/delete sheet) requires upgrading the OAuth scope from spreadsheets.readonly to spreadsheets (full read/write access).
The current scope is defined in workspace-server/src/index.ts:
'https://www.googleapis.com/auth/spreadsheets.readonly',This needs to become:
'https://www.googleapis.com/auth/spreadsheets',Why this matters
This scope change requires updating the Google OAuth consent screen configuration — it cannot be shipped as a code-only change. The Google Cloud project's OAuth consent screen must be configured to request the broader spreadsheets scope, and users will need to re-authorize to grant the new permission.
What this unblocks
There are several open feature requests that all depend on Sheets write access:
- feature request: sheets.insertText #232 —
sheets.insertText - feature request: sheets.create #242 —
sheets.create - feature request: sheets.batchInsertText #244 —
sheets.batchInsertText - [Feature Request] Support Direct Appending to Google Sheets #87 — Support direct appending to Google Sheets
We have a working implementation ready (with tests) for the following tools, pending this scope change:
| Tool | Description |
|---|---|
sheets.updateRange |
Write values to a specific range |
sheets.appendRange |
Append rows after last data |
sheets.clearRange |
Clear values from a range |
sheets.createSpreadsheet |
Create a new spreadsheet |
sheets.addSheet |
Add a new tab to an existing spreadsheet |
sheets.deleteSheet |
Delete a tab by its numeric sheet ID |
Considerations
- Per Feature Request: Add Support for Customizable OAuth Scopes to Prevent Unintended Email Operations #111, some users may want granular control over scopes. This change should ideally be paired with a mechanism to opt in/out of write scopes.
- Per Gemini CLI Workspace Extension wants additional access to your Google Account #86, changing scopes triggers a re-authorization prompt for existing users — the UX for this should be considered.
Action needed
The Google Cloud project owner / team needs to:
- Update the OAuth consent screen to include the
spreadsheetsscope - Ensure the scope is approved for production use (if the app is verified)