create_sheet_filter

Create a filter view on a range: a named, saved filter anyone can open from Data > Filter views without touching the tab's one basic filter (set_sheet_basic_filter sets that).

writeGoogle Sheets, Docs & Drive

Call it

In an AI client (MCP)

tools/call
{
  "name": "create_sheet_filter",
  "arguments": {
    "spreadsheet_id": "<spreadsheet_id>",
    "range_": "<range_>",
    "title": "<title>"
  }
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/create_sheet_filter \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"spreadsheet_id":"<spreadsheet_id>","range_":"<range_>","title":"<title>"}'
Early access — the Tool API is open on request, contact us.

Arguments

NameTypeDescription
spreadsheet_idrequiredstringthe spreadsheet ID (from its URL or get_sheet_metadata).
range_requiredstringA1 notation range, header row included (e.g. 'Sheet1!A1:D100').
titlerequiredstringthe filter view's name.

Result

Every tool answers {notification, data, human_action}; data carries:

  • data.filterViewId — the new filter view's id.
  • data.title — its name.

Gotchas

  • The view starts with no criteria; set them, or delete the view, with sheet_batch_update (updateFilterView / deleteFilterView with data.filterViewId). Every range here must name its tab; an open end is allowed ('Tab!C7:C' runs to the bottom, 'Tab!A:D' is whole columns); a range without a tab ('A1:D10') is refused.

Example

create_sheet_filter("1ABC...", "Sheet1!A1:D100", "My Filter")

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude