deep_search_messages
Search chat history for keywords and retrieve surrounding context messages to see full conversation snippets.
Instructions
Full-text search messages via FTS5, then expand each hit with surrounding context messages. Use for "did anyone mention X" style queries where conversation context matters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID | |
| keywords | Yes | Keywords to search (FTS5 MATCH, joined by OR) | |
| sender_id | No | Restrict to a specific sender (numeric member.id) | |
| start_time | No | Start time (Unix seconds) | |
| end_time | No | End time (Unix seconds) | |
| limit | No | Max hits before context expansion (default 100, max 1000) | |
| context_before | No | Context messages before each hit (default 2, max 20) | |
| context_after | No | Context messages after each hit (default 2, max 20) | |
| format | No | Output format: text (default) or json | |
| timezone | No | Timezone for time display (default Asia/Shanghai) |