find_facts
Find facts in a channel by exact substring match. Returns facts sorted by importance then recency. Use for deterministic fact retrieval.
Instructions
Find facts in one channel whose text literally CONTAINS a substring
(deterministic, case-insensitive). Call it when you know an exact keyword
and want every matching raw fact row, not a ranked or synthesized result.
Returns a bare LIST and collapses missing-auth, access-denied,
empty-query, and internal errors into an EMPTY LIST — so [] means no
match OR no access; it never returns a structured error object.
Disambiguation: find_facts is a deterministic substring filter (predictable, no relevance ranking). For meaning-based / fuzzy retrieval use search_channel_facts (BM25+vector). For a synthesized answer use ask_channel. For decisions with rationale use find_decisions.
When to use: exact-keyword scans ("every fact mentioning 'rollback'"), optionally narrowed by fact_type. When NOT to use: you want semantically related results for a phrase (use search_channel_facts).
Prerequisites: a channel_id from list_channels.
Returns (instant, read-only): a LIST (not a dict) of up to limit facts,
sorted by importance DESC then recency (message_ts) DESC. The importance
values that drive the sort rank, highest first, are 'critical' > 'high' >
'medium' > 'low' (any other/empty value sorts lowest). Each item is
{fact_id, memory_text, fact_type, importance, author_name, message_ts, page_slug (empty if not yet on a page)}. No side effects.
Error handling: on missing auth, access denial, empty query, or internal
error this tool returns an EMPTY LIST [] (it never raises) — an empty
list means no match OR no access; confirm with list_channels if
unexpected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | Channel id. Get it from list_channels (e.g. 'ch-eng'). Required. | |
| query | Yes | Case-insensitive substring matched literally inside each fact's text (e.g. 'rollback'). NOT semantic — exact substring only. Required. | |
| fact_type | No | Optional type filter. One of: 'decision', 'observation', 'opinion', 'question', 'action_item'. Omit for all types. Default null. | |
| limit | No | Max facts to return, 1-100 (out-of-range values are clamped). Default 20. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |