Authentication and enablement
Requires a workspace Google Sheets OAuth integration.access_token is injected
(x-variable-service: google_sheets) and is never chosen by the model. Enable the
tool on the agent and bind the integration.
Inputs
spreadsheet_id(required): the spreadsheet ID from the URL.sheet_name(optional): defaults to the first sheet. Ignored whengidis set.gid(optional): the tab id (the number after#gid=in the spreadsheet URL). Takes precedence oversheet_namewhen both are set.match_criteria(required unlessrawis true): column/value filters, AND’d across criteria, OR’d within a criterion’svalues. Supportsexact,prefix, andfuzzymatching viamatching_strategy/ per-criterionmatch_mode.return_column(optional): extract one column’s value per match intofound_valuesinstead of returning full rows.raw(optional, default false): skipmatch_criteriaand header extraction entirely, and return every row of the tab unfiltered inraw_rows— an array of arrays, cell values in column order, row 0 not assumed to be a header row. Use this for sheets whose structure can’t be expressed as column-value filters (e.g. grouping/header rows interleaved with data rows), typically feeding the raw grid into apython_code_toolthat parses the structure itself.
Output
Filtered mode:columns (headers), found_rows (matched rows keyed by header
name) or found_values (when return_column is set), matched_values,
row_numbers, match_count, match_type.
Raw mode (raw: true): raw_rows only — every row, unfiltered, in sheet order.
columns/found_rows/found_values are empty in this mode.
Limits and side effects
- Read-only; no writes.
- Filtered mode does one uncapped
values.getcall per invocation. - Raw mode uses a capped fetch (15 MB) and refuses cleanly on an oversized response, since it always returns the whole tab rather than a filtered subset — filtered mode is unaffected by this cap.
Expected errors
- Missing/invalid Sheets integration token.
- Spreadsheet not found, or has no sheets.
gidset but no tab with that id exists in the spreadsheet.sheet_nameset but no tab matches it (exact or fuzzy).match_criteriaempty whenrawis not set.- Referenced column not found, or out of range.