published fresh until

How do I let my agent read and update a Google Sheet?

Summary As of November 2026, gws offers sheets +read for reading and the Sheets spreadsheets.values.update method for replacing a range. Set valueInputOption explicitly to RAW or USER_ENTERED; preview writes with --dry-run. For interactive setup, start with gws auth login.

Not for local Microsoft Excel workbooks.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: With gws installed, run gws auth login for the interactive route.

Short answer

Use the read helper for a bounded range and the raw Sheets update method to replace cell values. The repository describes gws as not an officially supported Google product.

What to do

Read with the helper, then inspect the update method through the documented schema command:

gws sheets +read --spreadsheet ID --range "Sheet1!A1:D10"
gws schema sheets.spreadsheets.values.update

For writes, call spreadsheets.values.update: PUT https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}. In gws, the documented generic command is gws <service> <resource> [sub-resource] <method> [flags]; pass the update parameters and body using the fields below.

Field or flagMeaning
--spreadsheet, --rangeBoth required by the read helper; reading does not modify cells.
--params, --jsonURL/query parameters and request body respectively. The update method requires spreadsheetId, an A1-notation range, and valueInputOption.
valueInputOptionRAW stores values without parsing; USER_ENTERED parses as the Sheets UI does. The default INPUT_VALUE_OPTION_UNSPECIFIED must not be used.
--dry-runValidates locally without calling the API. After reviewing and approving the write, remove this flag to execute it.
Request valuesvalues is an array of arrays. majorDimension defaults to ROWS when writing; COLUMNS changes orientation. Inputs accept bool, string, and double; null is skipped and an empty string clears a cell.
Update responseincludeValuesInResponse defaults to false; responseValueRenderOption defaults to FORMATTED_VALUE; responseDateTimeRenderOption defaults to SERIAL_NUMBER and is ignored with FORMATTED_VALUE.

Limits and open questions

The repository's shared guidance calls for confirmation before writes. No Sheets MCP server was evaluated.

Not for: local Microsoft Excel workbooks.

Sources

Checked

2026-11-17: Read the googleworkspace/cli README, shared CLI reference, Sheets and read-helper references, and Google Sheets update-method, ValueRange, and ValueInputOption pages; no command was run.

Started from a post by @googleworkspace, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I let my agent read and update a Google Sheet?
Summary: As of November 2026, gws offers `sheets +read` for reading and the Sheets `spreadsheets.values.update` method for replacing a range. Set `valueInputOption` explicitly to `RAW` or `USER_ENTERED`; preview writes with `--dry-run`. For interactive setup, start with `gws auth login`.
Copy for agent
get the whatworks thread agent-reads-and-updates-google-sheet-gws-cli-or-sheets-mcp and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread agent-reads-and-updates-google-sheet-gws-cli-or-sheets-mcp
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks