Update Items By Filter
item.update_whereSet the same field values on EVERY row of one sheet that matches a filter, in ONE call — e.g. "Country = Germany where Country is DE or Deutschland". Prefer it over reading rows and calling item.update_many whenever the rows to change are described by a condition. filter is { operator: AND|OR, conditions: [{ column, operator, value }] } (≤ 10 conditions, operators as in sheet.aggregate) and fields maps field name → ONE literal human value (≤ 30); columns take names or codes and option/member values are matched as in item.update_humanized. Text fields take markdown: bold, italic, strikethrough, code, links (http, https and mailto only) and - or 1. lists; put a backslash before a * _ ~ [ ] meant literally. Date fields take an ISO 8601 date or datetime, or a range as [start, end] or an ISO interval start/end (e.g. 2026-12-01/2026-12-05); times are UTC unless they carry an offset, and an end before the start is refused. File List fields are set per row with item.update_many, not here. Rows already holding the values are left alone; archived and read-only rows are skipped. When more than 20 rows would change, the user confirms first: in a chat on a preview card (the call waits for it); over MCP the call is refused with ROWS_NEED_CONFIRM, the count and a sample, and nothing changes — show the user and call again withconfirmRowsset to that count only once they accept. At most 1,000 rows per call — narrow the filter otherwise. The change is one batch:item.undo_batchwith the returnedbatchIdandsheetIdrestores the previous values. Returns{ batchId, updated, unchanged, skipped, skippedCount, url }. When the agent this app signs in as has Ask first on for this, the call waits for its manager's approval and returns status: "pending_approval"; nothing changes until they approve. Pass reason(andtargetNotes` per target) so the approver sees why.
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": {
"sheetId": "<sheetId>",
"filter": "<filter>",
"fields": "<fields>"
},
"name": "item.update_where"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | Yes | Attribute name/code → human value, as in item.create_humanized, at most 30 per row. Select/Status/Member/Team/Job values are matched to the sheet's real options. | |
| filter | Yes | ||
| reason | No | Why you are doing this, in one sentence the approver reads if Ask first holds the call | |
| sheetId | Yes | ||
| confirmRows | No | MCP only: the number of rows the user accepted after a ROWS_NEED_CONFIRM refusal. Needed when more than 20 rows would change; never set it before the user agrees. | |
| targetNotes | No | A short note per target, keyed by the id or Index you pass |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Panel link to the sheet | |
| status | No | The call waits for a person's approval; nothing has changed | |
| batchId | No | Id of the batch; pass it with sheetId to item.undo_batch to undo the whole batch. Null when nothing was written | |
| created | No | Rows created | |
| message | No | ||
| sheetId | No | Sheet the rows are in | |
| skipped | No | Rows left unchanged and why; at most 20 are listed | |
| spaceId | No | Space of that sheet; null for a sheet outside a space | |
| stopped | No | Set when a row failed unexpectedly: rows after it were not attempted; the rest stay written | |
| updated | No | Rows updated | |
| approver | No | Who decides it | |
| unchanged | No | Matching rows that already held every value | |
| approvalId | No | The approval the call waits on | |
| skippedCount | No | All rows skipped, including ones not listed | |
| nothingToChange | No | Set when every matching row already held the values |