> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ja/llms.txt # createNotificationInboxTool() **追加バージョン:** `@mastra/core@1.39.0` `createNotificationInboxTool()` は、現在の Thread の通知受信ボックスレコードを Agent が確認、管理できる Mastra Tool を作成します。 この Tool は Durable Notification Signal とともに使用します。通知レコードの送信については、[`Agent.sendNotificationSignal()`](https://mastra.zisheng.pro/ja/reference/agents/agent) を参照してください。 ## 使用例 次の例では、受信ボックス Tool を Agent に追加します。 ```typescript import { Agent } from '@mastra/core/agent' import { createNotificationInboxTool } from '@mastra/core/notifications' const notificationsStorage = await storage.getStore('notifications') export const supportAgent = new Agent({ id: 'support-agent', name: 'Support Agent', instructions: 'Help the user triage updates.', model: 'openai/gpt-5.6-sol', tools: { notificationInbox: createNotificationInboxTool({ storage: notificationsStorage }), }, }) ``` ## パラメーター **options** (`object`): Tool の設定。 **options.storage** (`NotificationsStorage`): storage.getStore('notifications') が返す通知ストレージドメイン。 ## Tool の入力 生成される Tool の ID は `notification-inbox` で、次の入力フィールドを受け取ります。 **action** (`'list' | 'read' | 'markSeen' | 'dismiss' | 'archive' | 'search'`): 実行する受信ボックス Action。 **threadId** (`string`): 確認する Thread ID。利用可能な場合は、現在の Agent Thread がデフォルトになります。 **id** (`string`): 通知 ID。markSeen、dismiss、archive では必須です。read では省略できます。 **status** (`'pending' | 'delivered' | 'seen' | 'dismissed' | 'archived' | 'discarded'`): list、read、search Action のステータスフィルター。 **priority** (`'low' | 'medium' | 'high' | 'urgent'`): list、read、search Action の優先度フィルター。 **source** (`string`): list、read、search Action の Source フィルター。 **query** (`string`): 検索クエリ。action が search の場合は必須です。 **limit** (`number`): 返す通知の最大数。正の整数である必要があります。 ## Action | Action | 説明 | | ---------- | ---------------------------------------------- | | `list` | 条件に一致する通知を返します。 | | `read` | 読み取り可能な通知内容を Signal として配信し、配信済みのレコードを確認済みにします。 | | `markSeen` | 1 件の通知を確認済みにします。 | | `dismiss` | 1 件の通知を破棄済みにします。 | | `archive` | 1 件の通知をアーカイブ済みにします。 | | `search` | クエリと省略可能なフィルターを使用して通知を検索します。 | `read` が保留中または配信済みの通知を検出すると、通常の Tool 出力として全内容を返す代わりに、その内容を Notification Signal として配信します。Agent が `` Signal の背後にある完全なレコードを必要とする場合に、その Signal の後で使用してください。