Search effectively
Get better retrieval with strategies, typed sub-queries, and ranged reads.
search_context works well with a plain query, but hard questions benefit from the knobs it exposes. This guide applies to both the REST endpoint (POST /api/v1/search_context) and the MCP tool.
Start simple
The query supports websearch syntax: "quoted phrases" for exact matches and -excluded terms. strategy can force keyword or semantic retrieval; the default hybrid fuses both.
Add typed sub-queries
When one phrasing is not enough, supply 1 to 8 typed sub-queries. They are fused with the original query by weighted reciprocal-rank fusion, and the original always runs at double weight so sub-queries broaden recall without hijacking the ask.
lexcarries exact keywords to full-text search.veccarries a natural-language restatement to vector search.hydecarries a 30 to 80 word hypothetical answer passage that is embedded in place of the question. Write it as if you were the document you hope to find.
Control the output
limit: maximum chunks (default 10, max 50)minScore: drop weak results below a score thresholdtokenBudget: approximate token budget for the returned contentexplain: attach per-result score traces when you need to debug ranking
Decide how fresh the answer has to be
mode controls how far a search reaches into connected sources whose bodies are cataloged but not indexed:
faststays inside retained content and never contacts a provider. Use it in tight loops where latency matters more than coverage.balancedis the default. It also searches the catalog and live-fetches a few decisively matching bodies.freshadds live-answering providers such as issue trackers, at the cost of more upstream calls.
sourceIds narrows a search to specific sources. When the question is really about one provider, query_source goes straight at it, and fetch_source_document pulls one document's full body by external ID.
Read the coverage block alongside results: it names what was fetched live, what the catalog lists but was not fetched, and whether a daily provider budget cut the search short. Treat it as routing information, not as evidence to quote.
Read ranges, not files
Every result carries a location with startLine/endLine anchors and the Markdown headingPath. Follow up with a ranged get_file:
This keeps agent context small and cites the exact lines that answered the question.
Prefer bundles for known workflows
If the task matches a curated workflow, load a bundle instead of searching: list_bundles shows each bundle's useWhen guidance, and get_bundle returns the complete current contents of its files. See Retrieval.