Airtable Filters

作者 Airtable812ee67f1fd3MIT50 個星標收錄於 2026年10月7日更新於 2026年10月7日儲存庫2 個月前更新

Builds Airtable filters parameters for the MCP tools that list or display records — field-type-aware comparison operators, choice and collaborator IDs, date ranges, and nested AND/OR logic. Use when the user wants to find, filter, narrow down, or search Airtable records by field values, even when they don't explicitly say "filter."

僅含說明AI & Agents
AI 產生的概覽

為列出或顯示紀錄的 Airtable MCP 工具建構篩選參數,支援依欄位類型選用運算子與巢狀邏輯。

功能
這個技能說明如何為列出或顯示資料表及介面頁面紀錄的 Airtable MCP 工具建構 filters 參數。它把欄位類型類別對應到各自支援的比較運算子,涵蓋選項 ID、協作者群組比對、附件檔案類型以及日期值與日期範圍物件,並說明如何組合扁平 AND 條件或巢狀 AND/OR 邏輯。它產出的是篩選物件並附 JSON 範例,不會執行任何程式碼。
適用情境
當使用者想依欄位值尋找、篩選、縮小範圍或搜尋 Airtable 紀錄時使用,包括使用者沒有明確說出「篩選」一詞的情況。當篩選需要與介面頁面內建的篩選條件合併,或需要把多個條件組合到單次呼叫時也適用。
執行需求
僅為說明文件,不含指令碼。需要能夠使用接受 filters 參數的 Airtable MCP 工具,並能查詢資料表結構以取得欄位 ID 和選項 ID。

Airtable MCP Filters

MCP tools that list or display records from tables or interface pages accept an optional filters parameter, using the same schema.

When querying records from an interface page, these filters are combined with the page's built-in filters using AND.

Schema shape

When no top-level operator is specified, conditions are combined with AND. The first element in a condition's operands array is always a field ID — look up the table's schema to find field IDs before filtering.

Field type categories

  • Text-like: singleLineText, multilineText, email, url, phoneNumber, richText, barcode
  • Numeric: number, percent, currency, rating, duration, autoNumber, count
  • Date: date, dateTime, createdTime, lastModifiedTime
  • Single select: singleSelect
  • Multiple selects: multipleSelects
  • Single collaborator: singleCollaborator
  • Multiple collaborators: multipleCollaborators
  • Linked records: multipleRecordLinks
  • Attachment: multipleAttachments
  • Checkbox: checkbox

Computed fields (formula, rollup, lookup) support whichever operators match their result type.

Comparison operators

OperatorSecond operandField categories
=string, number, boolean, choice IDtext-like, numeric, date, checkbox, single select, multiple selects, single collaborator, multiple collaborators, linked records
!=string, number, choice IDtext-like, numeric, date, single select, single collaborator
<, >, <=, >=number or date value objectnumeric, date
containsstringtext-like, linked records
doesNotContainstringtext-like, linked records
doesNotContainarray of IDsmultiple selects, multiple collaborators
isEmpty, isNotEmpty(none)text-like, numeric, date, single select, multiple selects, single collaborator, multiple collaborators, linked records, attachment
hasAnyOf, hasAllOfarray of IDsmultiple selects, multiple collaborators, linked records
isAnyOfarray of IDssingle select, single collaborator
isNoneOfarray of IDssingle select, single collaborator, linked records
isWithindate range objectdate
filename, fileTypestring or "image"/"text"attachment

When matching a field against multiple values, prefer dedicated operators (isAnyOf, isNoneOf, hasAnyOf, hasAllOf) over combining multiple = conditions with or/and, when those operators are available for the field type.

Field-type rules

Select fields

For select fields, operand values must be choice IDs (e.g., "selEXAMPLEchoice1"), not display names. Look up the table's schema to find choice IDs before filtering.

Collaborator fields

When filtering by a collaborator group ID, use operatorOptions to match individual members of the group instead of the literal group ID. See the tool's operatorOptions parameter for details.

Example operand: {"operator": "hasAnyOf", "operands": ["fldEXAMPLEfield03", "ugpEXAMPLEgroup01"], "operatorOptions": {"matchGroupsByMembership": true}}

Attachment fields

Use fileType to filter attachments by type (e.g., "image", "text") rather than isNotEmpty when the user specifies a file type.

Date fields

Date comparisons (=, !=, <, >, <=, >=) use a date value object instead of a raw date string, and isWithin uses a date range object. The tool schema defines the available modes for each. Always include timeZone.

Composing conditions

A filter's top-level operands array can contain two or more conditions, which are combined with the top-level operator (AND by default). For simple multi-condition filters, this flat structure is sufficient.

When the logic requires mixing AND and OR, nest a filter object as one of the operands. Each nested filter has its own operator and operands.

OR inside AND — useful when one condition is fixed and another allows multiple alternatives:

"Scripted videos that are either in Writing or Pre-Production" → Bucket = Scripted AND (Status = Writing OR Status = Pre-Production)

AND inside OR — useful when you want records matching either a simple condition or a combination:

"Approved videos, or videos assigned to Bailey that are in Cut 2" → Status = Approved OR (Editor = Bailey AND Status = Cut 2 Ready)

When combining many conditions on different fields, prefer a flat AND rather than unnecessary nesting. Only nest when the logic genuinely requires mixed AND/OR at different levels.

Prefer composing all conditions into a single filters object rather than splitting them across multiple calls. A single call with a composed filter is more efficient and returns the correct result set directly.

Examples

Filter where a text field equals "orange" OR a number field is greater than 5:

json
{    "operator": "or",    "operands": [        {"operator": "=", "operands": ["fldEXAMPLEfield01", "orange"]},        {"operator": ">", "operands": ["fldEXAMPLEfield04", 5]}    ]}

Filter for records where a date field is within the past week:

json
{    "operands": [        {            "operator": "isWithin",            "operands": ["fldEXAMPLEdate001", {"mode": "pastWeek", "timeZone": "America/New_York"}]        }    ]}

來源與署名

來源:Airtable/skills位於plugins/airtable/skills/airtable-filters提交812ee67

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架