rlm_context_query
Query project documents, parsed business files, and shared context to retrieve ranked sections as source truth and narrative documentation.
Instructions
Query project documents, parsed business files, and shared context. Use this first for source truth and narrative documentation. Returns ranked sections within token budget. If a broad query times out, retry once with a narrow 3-8 term query, max_tokens 800-1500, search_mode='keyword', return_references=true, auto_decompose=false, and include_all_tiers=false. For exact text use rlm_search; for structural code context use rlm_code_neighbors, rlm_code_callers, or rlm_code_imports.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Documentation, business-context, or current-truth question. For timeout recovery, narrow this to the key file, feature, symbol, or 3-8 terms. | |
| max_tokens | No | Token budget. Use 800-1500 for fast recovery retries after a timeout. | |
| search_mode | No | Search strategy. Use keyword for fast retry/recovery paths; use hybrid for normal documentation discovery. | hybrid |
| include_metadata | No | ||
| prefer_summaries | No | ||
| return_references | No | Return chunk references (IDs + previews) instead of full content. Use rlm_get_chunk to retrieve full content by ID. Reduces hallucination by maintaining clear source attribution and is the preferred fast retry path after a timeout. | |
| auto_decompose | No | Auto-decompose complex queries into sub-queries (Pro+ only). Complex queries (50+ words, multiple questions, comparisons) are automatically broken down and results merged. Set to False for fast timeout recovery retries. | |
| include_all_tiers | No | Include all context tiers including COLD and ARCHIVE. By default, searches only HOT and WARM tiers for faster, more relevant results. |