search_records
Search records in Kintone apps using query syntax to filter, sort, and retrieve specific data based on field conditions and criteria.
Instructions
kintoneアプリのレコードを検索します。事前に対象アプリのフィールド一覧を把握するため、`get_form_fields` ツールで利用予定のフィールドコードやフィールドタイプを確認してからクエリーを作成することを推奨します。
【よく使用されるクエリ例】 • 文字列検索: Customer = "サイボウズ株式会社" (完全一致) • 部分一致: Customer like "株式会社" (部分一致) • ドロップダウン: Status in ("対応中","未対応") (複数値の選択) • 日付範囲: LimitDay >= "2022-09-29" and LimitDay <= "2022-10-29" • 日付関数: LimitDay < TODAY() (今日より前) • 複数条件: Status in ("対応中") and LimitDay < TODAY() • ソート: Status = "対応中" order by 更新日時 desc • ページング: Status = "対応中" order by $id desc limit 20 offset 20 • 空欄チェック: Detail is empty (文字列複数行の空欄) • 非空欄チェック: Detail is not empty (文字列複数行の非空欄) • 添付ファイル有無: Attachments is empty / is not empty • ユーザー検索: 作成者 in (LOGINUSER()) (自分が作成したレコード)
注意: is empty / is not empty は「文字列(複数行)」と「添付ファイル(FILE)」に対してのみ使用でき、「文字列(1行)」などの他のフィールドタイプに対しては使用できません。 クエリ式の詳細仕様や構文とすべての演算子や関数、フィールド別の使用可否といったkintoneの仕様については get_query_language_documentation ツールを実行して確認してください。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | kintoneアプリのID | |
| query | No | kintoneクエリ構文での検索条件。 基本形式: "フィールドコード 演算子 値" 例: • Status = "完了" (完全一致) • Customer like "株式会社" (部分一致) • Status in ("対応中","未対応") (複数選択) • LimitDay >= "2022-09-29" and LimitDay <= "2022-10-29" (範囲指定) • Detail is empty (文字列複数行の空欄チェック) • Detail is not empty (文字列複数行の非空欄チェック) • Attachments is empty / is not empty (添付ファイルの有無) • Status not in ("完了") order by 更新日時 desc limit 10 (ソート付き) 注意: is empty / is not empty は「文字列(1行)」では使用できません(文字列(複数行)と添付ファイル(FILE)は可)。 不明点は get_query_language_documentation ツールで仕様を確認してください。 オプション順序: order by → limit → offset 詳細はget_query_language_documentationを参照 | |
| fields | No | 取得するフィールド名の配列(省略時は全フィールド取得) |