Skip to main content
Glama

gws-mcp__sheets_find_rows

Read-only

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

NameRequiredDescriptionDefault
matchNo"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.
queryNoOne value to look for, taken as values with that single value. Give values or query, not both. The answer names it under aliased.
rangeYesThe 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.
columnYesWhich column to match on: a header name taken from the first row of the range ("Email"), or an A1 column letter ("B").
valuesYesThe values to look for. Pass every value you need in ONE call, e.g. ["ana@example.com", "bo@example.com"].
accountNoOptional email address of the connected account to use (e.g. 'user@gmail.com'). If omitted, the default account is used.
max_resultsNoMaximum 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_rowNoDefault 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_idYesThe spreadsheet ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond readOnlyHint=true, it discloses multi-value searching, the 1-based row number and ready-made A1 range returned for each match, and separate reporting of values with no matches. These details clarify result interpretation and support a reliable find-then-update workflow without conflicting with the annotation.

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 purpose and key output are front-loaded, and subsequent sentences progress logically through selection guidance, batching, update handoff, and empty-result interpretation. It is slightly wordy and emphatic in phrases such as "rows nobody asked for" and "one call and not twenty," but contains no substantial irrelevant material.

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?

Together with the fully documented schema, the description supplies what an agent needs to choose and invoke the tool: lookup scope, efficient batch usage, output essentials, no-match behavior, and how to consume results in sheets_update. The schema covers the remaining invocation complexities, including match semantics, header handling, range offsets, truncation, and account selection.

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

Parameters3/5

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

Schema description coverage is 100% and already documents match modes, range syntax, column addressing, batching, headers, aliases, and result caps. The description reinforces one-column matching and one-call batching but adds little parameter-specific meaning beyond that rich schema, so the high-coverage baseline applies.

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 opening sentence precisely defines the operation and scope: find rows in a spreadsheet range by matching one column, returning row numbers rather than an entire sheet. The later sheets_update handoff further distinguishes it from general-purpose sheets_read or sheets_query retrieval.

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 explicitly says to use this instead of reading a whole sheet and filtering locally, explaining the context-saving reason. It also provides concrete batching guidance and a downstream workflow in which the returned A1 range feeds directly into sheets_update.

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.