Skip to main content
Glama

Update Items By Filter

item.update_where
Destructive

Set 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

NameRequiredDescriptionDefault
fieldsYesAttribute 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.
filterYes
reasonNoWhy you are doing this, in one sentence the approver reads if Ask first holds the call
sheetIdYes
confirmRowsNoMCP 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.
targetNotesNoA short note per target, keyed by the id or Index you pass

Output Schema

NameRequiredDescriptionDefault
urlNoPanel link to the sheet
statusNoThe call waits for a person's approval; nothing has changed
batchIdNoId of the batch; pass it with sheetId to item.undo_batch to undo the whole batch. Null when nothing was written
createdNoRows created
messageNo
sheetIdNoSheet the rows are in
skippedNoRows left unchanged and why; at most 20 are listed
spaceIdNoSpace of that sheet; null for a sheet outside a space
stoppedNoSet when a row failed unexpectedly: rows after it were not attempted; the rest stay written
updatedNoRows updated
approverNoWho decides it
unchangedNoMatching rows that already held every value
approvalIdNoThe approval the call waits on
skippedCountNoAll rows skipped, including ones not listed
nothingToChangeNoSet when every matching row already held the values

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Why you are doing this, in one sentence the approver reads if Ask first holds the call",
      +  "type": "string"
      +}
    • addedInput schema / properties / targetNotes
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "A short note per target, keyed by the id or Index you pass",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Changed5 schema fields changed
    • addedOutput schema / properties / approvalId
      Added value: +{
      +  "description": "The approval the call waits on",
      +  "type": "string"
      +}
    • addedOutput schema / properties / approver
      Added value: +{
      +  "description": "Who decides it",
      +  "type": "string"
      +}
    • addedOutput schema / properties / message
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "const": "pending_approval",
      +  "description": "The call waits for a person's approval; nothing has changed",
      +  "type": "string"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "batchId",
      -  "created",
      -  "updated",
      -  "skipped",
      -  "skippedCount",
      -  "url",
      -  "sheetId",
      -  "spaceId",
      -  "unchanged"
      -]
  3. Changed1 schema field changed
    • addedInput schema / properties / confirmRows
      Added value: +{
      +  "description": "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.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
  4. Changed1 schema field changed
    • changedOutput schema / properties / batchId / description
      Previous value: -"Id of the batch; pass it to item.undo_batch to undo the whole batch. Null when nothing was written"New value: +"Id of the batch; pass it with sheetId to item.undo_batch to undo the whole batch. Null when nothing was written"
  5. Added

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, it discloses that unchanged rows are left alone and archived/read-only rows are skipped. It also details the confirmation flow, the MCP-only ROWS_NEED_CONFIRM refusal, the 1,000-row cap, batch undo via item.undo_batch, and the pending_approval behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose and routing guidance are front-loaded, and nearly every sentence carries operational detail. However, the description is a dense single paragraph, making the many constraints and special cases harder to scan than they could be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, filtered, batch-mutating tool with nested parameters, the description covers limits, skipped rows, confirmation, approval, undo, and return fields. The output schema exists, and the description still gives enough behavioral context for an agent to call it safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds substantial meaning beyond the schema: filter structure and limits, fields as one literal human value per field, option/member matching behavior, markdown syntax for text fields, ISO date and interval formats, and exactly how confirmRows and reason are used in the confirmation/approval path.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: it sets the same field values on every matching row of one sheet in one call. It explicitly distinguishes itself from reading rows plus item.update_many, and from item.update_many for File List fields.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit routing guidance: prefer this over reading rows and calling item.update_many whenever rows are described by a condition. It also states when not to use it (File List fields), references operator behavior via sheet.aggregate, and explains the >20-row confirmation and approval flows.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources