search_index
Search course threads with full-text ranking and filters, supporting phrases, boolean, prefix, and column-specific queries. Auto-syncs the index, so results stay current.
Instructions
DEFAULT thread search/browse tool. Searches the local BM25-ranked index over all threads in a course. Returns ranked results with full content for top hits. Auto-syncs when the index is missing or stale (>30 min) — you do NOT need to call sync_index first in normal use. Supports phrases, prefix, boolean, and column-specific queries. If a refresh fails but a prior index exists, falls back to the stale data — check the returned last_synced timestamp before treating results as fresh. First call on a large unsynced course may take several seconds while the initial sync runs. Use this for any thread lookup, search, or filtered browse before falling back to list_threads/search_threads.
Args: course_id: The course ID (use list_courses to find it). query: Search query. Supports phrases ("peer review"), prefix (assign*), boolean (AND/OR/NOT), and column-specific (title:exam, staff_replies:deadline). Implicit AND between terms. limit: Max results (default 20). category: Filter by category name (e.g. "Assignments"). type: Filter by thread type — "question", "post", or "announcement". has_staff_reply: If true, only threads with staff/admin replies. is_answered: If true, only answered threads.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | ||
| limit | No | ||
| query | Yes | ||
| category | No | ||
| course_id | Yes | ||
| is_answered | No | ||
| has_staff_reply | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |