read_sheet

Read cell values from a range.

readGoogle Sheets, Docs & Drive

To get the formulas, formats, notes and links of a few cells in one call, use get_sheet_cell.

Call it

In an AI client (MCP)

tools/call
{
  "name": "read_sheet",
  "arguments": {
    "spreadsheet_id": "<spreadsheet_id>",
    "range_": "<range_>"
  }
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/read_sheet \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"spreadsheet_id":"<spreadsheet_id>","range_":"<range_>"}'
Early access — the Tool API is open on request, contact us.

Arguments

NameTypeDescription
spreadsheet_idrequiredstringthe spreadsheet ID (from its URL or get_sheet_metadata).
range_requiredstringA1 notation, e.g. 'Store Reports!A1:I100'. For tab names with hyphens / spaces / parens (e.g. 'STA-BoxFirst!A1'), pass the bare name — the MCP layer single-quotes it internally where the Google Sheets API requires (otherwise the API parses 'STA-BoxFirst' as a subtraction and returns 400 once the tab has formula content).
value_render_optionstringHow to render cell values. Default: 'FORMATTED_VALUE'. 'FORMATTED_VALUE' — display values (what users see). Default. 'FORMULA' — raw formulas, e.g. '=IMAGE("url")' or '=SUM(A1:A10)'. Use this to read URLs from =IMAGE() formula cells. 'UNFORMATTED_VALUE' — raw numbers/dates without formatting. Note: =IMAGE() cells read back as '' under the default FORMATTED_VALUE (the image has no display text) — pass value_render_option='FORMULA' to see the underlying URL. Note: written datetimes read back as the sheet's DISPLAYED format (locale-dependent) under FORMATTED_VALUE — use 'UNFORMATTED_VALUE' to get the raw date serial for math/sorting.Default: "FORMATTED_VALUE"

Result

Every tool answers {notification, data, human_action}; data carries:

  • values — the rows, at the top level (not under data). Google leaves out trailing empty rows and cells, so pad a short row before you map columns by position.
  • rowCount — the number of rows returned, up to the last non-empty row (not the height of the range).

Gotchas

  • The spreadsheet must be shared with SellerSheet's Google service account as Editor (workbooks set up by the SellerSheet sidebar already are); a permission error means the user has to share it.

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude