gws-mcp__sheets_find_rows
Find the rows in a spreadsheet range whose value in one column matches what you are looking for, and get back their ROW NUMBERS. Use this instead of reading a whole sheet and filtering the values yourself: on any real sheet that burns context on rows nobody asked for. Searches MANY values in a single call, so looking up twenty customers is one call and not twenty. Each match comes back with its 1-based sheet row number and a ready-made A1 range for that row, which is what lets a find be followed directly by a sheets_update. Values that matched nothing are listed separately, so an empty result cannot be mistaken for a broken call.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"spreadsheet_id": "<spreadsheet_id>",
"range": "<range>",
"column": "<column>",
"values": "<values>"
},
"name": "gws-mcp__sheets_find_rows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| match | No | "exact" (default) compares the whole cell, case-sensitively, after trimming both sides. "contains" and "prefix" are substring tests and are case-INsensitive. Exact is the default because a lookup that quietly folded case would make two different rows interchangeable without ever saying so. | |
| query | No | One value to look for, taken as values with that single value. Give values or query, not both. The answer names it under aliased. | |
| range | Yes | The range to search: a tab name on its own searches that whole tab (the simplest correct call), or A1 notation naming a real tab, e.g. "TabName!A:D" for whole columns or "TabName!A1:D500" for a block — TabName stands for a tab the spreadsheet actually has. Row numbers in the result are absolute sheet rows, so a range starting at A10 reports its first data row as 11. | |
| column | Yes | Which column to match on: a header name taken from the first row of the range ("Email"), or an A1 column letter ("B"). | |
| values | Yes | The values to look for. Pass every value you need in ONE call, e.g. ["ana@example.com", "bo@example.com"]. | |
| account | No | Optional email address of the connected account to use (e.g. 'user@gmail.com'). If omitted, the default account is used. | |
| max_results | No | Maximum matching rows returned per searched value. Default 50. A capped result says truncated: true, because a silent truncation reads exactly like a complete answer. | |
| has_header_row | No | Default true: the first row of the range is headers, is used to resolve a column name, and is never returned as a match. Set false when the range is pure data. | |
| spreadsheet_id | Yes | The spreadsheet ID |