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 从公开仓库中收录这些内容。

举报或申请下架