claude-skills/

Anthropic公式スキル・プラグインの日本語ディレクトリ

last sync 22h ago
スキルOfficialproductivity

🔍airtable-filters

プラグイン
airtable
ライセンス
MIT

説明

Airtableのレコードを一覧表示または表示するMCPツール向けに、フィルターパラメーターを構築します。 フィールドタイプに応じた比較演算子、選択肢・コラボレーターのID、日付範囲、そしてネストされたAND/ORロジックに対応しています。 次のような場合に使用: ユーザーがフィールド値を条件にAirtableのレコードを検索・絞り込み・フィルタリングしたい場合。「フィルター」という言葉を明示的に使っていなくても対象となります。

原文を表示

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."

ユースケース

  • Airtableのレコードを条件で検索したい
  • 特定フィールド値でレコードを絞り込みたい
  • 複数条件でレコードをフィルタリングしたい
  • AND/ORロジックで高度に検索したい

本文(日本語訳)

Airtable MCP フィルター

テーブルやインターフェースページからレコードを一覧表示・表示する MCP ツールは、同一スキーマを使用したオプションの filters パラメーターを受け付けます。

インターフェースページからレコードをクエリする場合、これらのフィルターはページ組み込みのフィルターと AND で結合されます。

スキーマの構造

トップレベルの operator が指定されていない場合、条件は AND で結合されます。 条件の operands 配列の最初の要素は常に フィールド ID です。フィルタリングの前にテーブルのスキーマを参照してフィールド ID を確認してください。

フィールド種別カテゴリー

  • テキスト系: singleLineText, multilineText, email, url, phoneNumber, richText, barcode
  • 数値系: number, percent, currency, rating, duration, autoNumber, count
  • 日付系: date, dateTime, createdTime, lastModifiedTime
  • 単一選択: singleSelect
  • 複数選択: multipleSelects
  • 単一コラボレーター: singleCollaborator
  • 複数コラボレーター: multipleCollaborators
  • リンクレコード: multipleRecordLinks
  • 添付ファイル: multipleAttachments
  • チェックボックス: checkbox

計算フィールド(formula, rollup, lookup)は、その結果の型に対応するオペレーターをサポートします。

比較オペレーター

オペレーター 第2オペランド 対応フィールドカテゴリー
= 文字列、数値、真偽値、選択肢 ID テキスト系、数値系、日付系、チェックボックス、単一選択、複数選択、単一コラボレーター、複数コラボレーター、リンクレコード
!= 文字列、数値、選択肢 ID テキスト系、数値系、日付系、単一選択、単一コラボレーター
<, >, <=, >= 数値または日付値オブジェクト 数値系、日付系
contains 文字列 テキスト系、リンクレコード
doesNotContain 文字列 テキスト系、リンクレコード
doesNotContain ID の配列 複数選択、複数コラボレーター
isEmpty, isNotEmpty (なし) テキスト系、数値系、日付系、単一選択、複数選択、単一コラボレーター、複数コラボレーター、リンクレコード、添付ファイル
hasAnyOf, hasAllOf ID の配列 複数選択、複数コラボレーター、リンクレコード
isAnyOf ID の配列 単一選択、単一コラボレーター
isNoneOf ID の配列 単一選択、単一コラボレーター、リンクレコード
isWithin 日付範囲オブジェクト 日付系
filename, fileType 文字列または "image" / "text" 添付ファイル

フィールドを複数の値に対して照合する場合、or/and で複数の = 条件を組み合わせるよりも、 そのフィールド種別で利用可能であれば専用オペレーター(isAnyOf, isNoneOf, hasAnyOf, hasAllOf)を優先して使用してください。

フィールド種別ごとのルール

選択フィールド

選択フィールドのオペランド値は、表示名ではなく 選択肢 ID(例: "selEXAMPLEchoice1")を使用する必要があります。 フィルタリングの前にテーブルのスキーマを参照して選択肢 ID を確認してください。

コラボレーターフィールド

コラボレーターグループ ID でフィルタリングする場合、グループ ID そのものではなくグループの個々のメンバーに一致させるために operatorOptions を使用してください。 詳細はツールの operatorOptions パラメーターを参照してください。

オペランドの例: {"operator": "hasAnyOf", "operands": ["fldEXAMPLEfield03", "ugpEXAMPLEgroup01"], "operatorOptions": {"matchGroupsByMembership": true}}

添付ファイルフィールド

ユーザーがファイル種別を指定した場合は、isNotEmpty ではなく fileType を使用して添付ファイルを種別(例: "image", "text")でフィルタリングしてください。

日付フィールド

日付の比較(=, !=, <, >, <=, >=)では、生の日付文字列ではなく日付値オブジェクトを使用し、 isWithin では日付範囲オブジェクトを使用します。 ツールのスキーマに各オペレーターで利用可能なモードが定義されています。timeZone は必ず指定してください。

条件の組み合わせ

フィルターのトップレベル operands 配列には2つ以上の条件を含めることができ、 それらはトップレベルの operator(デフォルトは AND)で結合されます。 シンプルな複数条件フィルターであれば、このフラットな構造で十分です。

AND と OR を混在させたロジックが必要な場合は、オペランドの1つとしてフィルターオブジェクトをネストします。 ネストされた各フィルターは独自の operator と operands を持ちます。

AND の中の OR — 1つの条件が固定で、別の条件が複数の選択肢を許容する場合に有効:

「スクリプト動画のうち、Writing または Pre-Production のもの」 → Bucket = Scripted AND (Status = Writing OR Status = Pre-Production)

OR の中の AND — 単純な条件か、条件の組み合わせのどちらかに一致するレコードが必要な場合に有効:

「承認済みの動画、または Bailey にアサインされて Cut 2 ステータスの動画」 → Status = Approved OR (Editor = Bailey AND Status = Cut 2 Ready)

異なるフィールドに対して多数の条件を組み合わせる場合は、不必要なネストを避けてフラットな AND を優先してください。 ネストは、異なるレベルで AND/OR を混在させるロジックが本当に必要な場合にのみ行ってください。

複数の呼び出しに条件を分割するのではなく、すべての条件を単一の filters オブジェクトにまとめることを優先してください。 条件を組み合わせた単一の呼び出しはより効率的で、正しい結果セットを直接返します。

テキストフィールドが "orange" と等しい、または数値フィールドが 5 より大きいレコードのフィルター:

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

日付フィールドが過去1週間以内のレコードのフィルター:

{
    "operands": [
        {
            "operator": "isWithin",
            "operands": ["fldEXAMPLEdate001", {"mode": "pastWeek", "timeZone": "America/New_York"}]
        }
    ]
}
原文(English)を表示

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

Operator Second operand Field categories
= string, number, boolean, choice ID text-like, numeric, date, checkbox, single select, multiple selects, single collaborator, multiple collaborators, linked records
!= string, number, choice ID text-like, numeric, date, single select, single collaborator
<, >, <=, >= number or date value object numeric, date
contains string text-like, linked records
doesNotContain string text-like, linked records
doesNotContain array of IDs multiple selects, multiple collaborators
isEmpty, isNotEmpty (none) text-like, numeric, date, single select, multiple selects, single collaborator, multiple collaborators, linked records, attachment
hasAnyOf, hasAllOf array of IDs multiple selects, multiple collaborators, linked records
isAnyOf array of IDs single select, single collaborator
isNoneOf array of IDs single select, single collaborator, linked records
isWithin date range object date
filename, fileType string 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:

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

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

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

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。