{"name":"airtable-filters","url":"https://skills.sh/airtable/skills/airtable-filters","install":"npx skills add airtable/skills --skill airtable-filters","sdk":"airtable","key":"airtable/airtable-filters","description":"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.","hasContent":true,"content":"---\nname: airtable-filters\ndescription: 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.\"\nlicense: MIT\nmetadata:\n    version: '1.0.0'\n    author: airtable\n---\n\n# Airtable MCP Filters\n\nMCP tools that list or display records from tables or interface pages accept an optional `filters` parameter, using the same schema.\n\nWhen querying records from an interface page, these filters are combined with the page's built-in filters using AND.\n\n## Schema shape\n\nWhen 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.\n\n## Field type categories\n\n-   **Text-like**: singleLineText, multilineText, email, url, phoneNumber, richText, barcode\n-   **Numeric**: number, percent, currency, rating, duration, autoNumber, count\n-   **Date**: date, dateTime, createdTime, lastModifiedTime\n-   **Single select**: singleSelect\n-   **Multiple selects**: multipleSelects\n-   **Single collaborator**: singleCollaborator\n-   **Multiple collaborators**: multipleCollaborators\n-   **Linked records**: multipleRecordLinks\n-   **Attachment**: multipleAttachments\n-   **Checkbox**: checkbox\n\nComputed fields (formula, rollup, lookup) support whichever operators match their result type.\n\n## Comparison operators\n\n| Operator                | Second operand                     | Field categories                                                                                                                   |\n| ----------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |\n| `=`                     | string, number, boolean, choice ID | text-like, numeric, date, checkbox, single select, multiple selects, single collaborator, multiple collaborators, linked records   |\n| `!=`                    | string, number, choice ID          | text-like, numeric, date, single select, single collaborator                                                                       |\n| `<`, `>`, `<=`, `>=`    | number or date value object        | numeric, date                                                                                                                      |\n| `contains`              | string                             | text-like, linked records                                                                                                          |\n| `doesNotContain`        | string                             | text-like, linked records                                                                                                          |\n| `doesNotContain`        | array of IDs                       | multiple selects, multiple collaborators                                                                                           |\n| `isEmpty`, `isNotEmpty` | _(none)_                           | text-like, numeric, date, single select, multiple selects, single collaborator, multiple collaborators, linked records, attachment |\n| `hasAnyOf`, `hasAllOf`  | array of IDs                       | multiple selects, multiple collaborators, linked records                                                                           |\n| `isAnyOf`               | array of IDs                       | single select, single collaborator                                                                                                 |\n| `isNoneOf`              | array of IDs                       | single select, single collaborator, linked records                                                                                 |\n| `isWithin`              | date range object                  | date                                                                                                                               |\n| `filename`, `fileType`  | string or `\"image\"`/`\"text\"`       | attachment                                                                                                                         |\n\nWhen 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.\n\n## Field-type rules\n\n### Select fields\n\nFor 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.\n\n### Collaborator fields\n\nWhen 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.\n\nExample operand: `{\"operator\": \"hasAnyOf\", \"operands\": [\"fldEXAMPLEfield03\", \"ugpEXAMPLEgroup01\"], \"operatorOptions\": {\"matchGroupsByMembership\": true}}`\n\n### Attachment fields\n\nUse `fileType` to filter attachments by type (e.g., `\"image\"`, `\"text\"`) rather than `isNotEmpty` when the user specifies a file type.\n\n### Date fields\n\nDate 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`.\n\n## Composing conditions\n\nA 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.\n\nWhen 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.\n\n**OR inside AND** — useful when one condition is fixed and another allows multiple alternatives:\n\n> \"Scripted videos that are either in Writing or Pre-Production\"\n> → Bucket = Scripted AND (Status = Writing OR Status = Pre-Production)\n\n**AND inside OR** — useful when you want records matching either a simple condition or a combination:\n\n> \"Approved videos, or videos assigned to Bailey that are in Cut 2\"\n> → Status = Approved OR (Editor = Bailey AND Status = Cut 2 Ready)\n\nWhen 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.\n\nPrefer 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.\n\n## Examples\n\nFilter where a text field equals \"orange\" OR a number field is greater than 5:\n\n```json\n{\n    \"operator\": \"or\",\n    \"operands\": [\n        {\"operator\": \"=\", \"operands\": [\"fldEXAMPLEfield01\", \"orange\"]},\n        {\"operator\": \">\", \"operands\": [\"fldEXAMPLEfield04\", 5]}\n    ]\n}\n```\n\nFilter for records where a date field is within the past week:\n\n```json\n{\n    \"operands\": [\n        {\n            \"operator\": \"isWithin\",\n            \"operands\": [\"fldEXAMPLEdate001\", {\"mode\": \"pastWeek\", \"timeZone\": \"America/New_York\"}]\n        }\n    ]\n}\n```\n","contentSource":"https://raw.githubusercontent.com/airtable/skills/main/plugins/airtable/skills/airtable-filters/SKILL.md","contentFetchedAt":"2026-07-27T09:02:29.639Z"}