snipara_context_query
Query project documents and business files to retrieve source-grounded answers and context. Returns ranked sections, retrieval diagnostics, and an answer pack with verification checks.
Instructions
Query project documents, parsed business files, and shared context. Use this first for source truth and narrative documentation. Returns a source-grounded answer_pack plus retrieval_diagnostics and 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 snipara_search; for structural code context use snipara_code_neighbors, snipara_code_callers, or snipara_code_imports.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | Optional task label that scopes the live-join fallback and retrieval correlation; persisted outcome posterior statistics remain project-wide | |
| 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 |
| 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_metadata | No | Include document, section, tier, and retrieval metadata with returned context. | |
| prefer_summaries | No | Prefer stored summaries when available without excluding authoritative source matches. | |
| 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. | |
| return_references | No | Return chunk references (IDs + previews) instead of full content. Use snipara_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. | |
| correlation_context | No | Optional retrieval-correlation context. Reuse session_id across retrieval and outcome calls so telemetry can be joined inside the authenticated project. These identifiers never change authorization or project scope; do not include secrets, tenant IDs, or user data. | |
| include_answer_pack | No | Include a structured answer pack with source facts, caveats, verification checklist, and code/context hints before the ranked context sections. | |
| context_chunk_outcome_rerank_mode | No | Requested bounded chunk-outcome rerank mode. This request can disable or lower the server-configured mode but cannot escalate beyond it. | disabled |
| context_chunk_outcome_window_hours | No | Strict attribution window for compatible chunk outcomes. |