Skip to main content
Glama

find_in_spreadsheet

Read-only

Search cells in a Google Spreadsheet for a specific value and return matches with sheet and A1 location; optionally limit results or write output to a server-side file.

Instructions

Find cells containing a specific value in a Google Spreadsheet.

Args: spreadsheet_id: The ID of the spreadsheet (found in the URL) query: The text to search for in cell values sheet: Optional sheet name to search in. If not provided, searches all sheets. case_sensitive: Whether the search should be case-sensitive (default False) max_results: Maximum number of results to return (default 50) local_path: Optional local filesystem path (file or directory) to write the result to instead of returning it inline. Bypasses the response-size cap. A path ending in '/' is a directory, created if missing. A file in place of a parent directory, or at a path ending in '/', raises ValueError; an existing file at a plain file path is replaced. Same caveat as download_file/download_folder: this path is resolved on the server's filesystem, not the caller's.

Returns: List of found cells with their location (sheet, cell in A1 notation) and value. max_results bounds match count, not response size — matched cell values can still be large. Raises ValueError if the response exceeds a safety cap (see MAX_TOOL_RESPONSE_CHARS in docs/configuration.md for the configured default) and local_path is not set — lower max_results, or pass local_path. If local_path is set, returns {local_path, spreadsheet_id, query, match_count, bytes_written} instead.

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>",
      "query": "<query>"
    },
    "name": "find_in_spreadsheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
sheetNo
local_pathNo
max_resultsNo
case_sensitiveNo
spreadsheet_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Goes well beyond the readOnlyHint annotation: it documents the safety cap on response size, the ValueError raised when the cap is exceeded, and the fact that local_path resolves on the server's filesystem rather than the caller's. The return shape is stated for both inline and file modes. Some of this overlaps the output schema, but the failure mode and filesystem caveat are genuinely additive.

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?

Front-loads the one-line purpose, then a compact Args/Returns structure that is easy to scan. The local_path explanation is somewhat verbose (the ValueError and replacement rules take several lines), but each sentence carries operative detail rather than filler.

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 six-parameter read tool with an output schema, it covers the remaining risks an agent needs: result bounding by max_results, the response-size cap interaction, and where local_path actually writes. Nothing required to invoke it safely or recover from the cap error is missing.

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?

Schema description coverage is 0%, so the description carries the whole load, and it does: every parameter is explained, including defaults (case_sensitive False, max_results 50), the difference between a directory path and a file path, creation of missing directories, and the replacement behavior at an existing file. A caller can set every argument correctly from this text alone.

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

Purpose4/5

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

States a specific verb and resource (find cells containing a value in a Google Spreadsheet) with its scope (all sheets unless sheet is given). It does not name a sibling it is not, so an agent must infer how it differs from get_sheet_data or find_in_doc on its own.

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

Usage Guidelines3/5

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

Usage is implied by the parameters – search a whole spreadsheet or one sheet for a text value – and the sheet default clarifies scope. There is no explicit statement of when to prefer this over fetching sheet data, and no exclusions or prerequisites are given.

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

Deploy Server

Other Tools