Ask the wiki
wiki_queryFind prior decisions and fixes by querying wiki pages and raw session transcripts with keyword-ranked results and optional project, type, tag, lifecycle, and date filters.
Instructions
Start here for questions about the user's past work ('what did I decide about X'), in any language: session pages keep the user's original request. Ranks wiki/ pages by keyword matches, rare words weighted higher (no LLM, no embeddings). Service pages are skipped; project hubs rank below sessions. Pages sharing a tool or topic name with two or more top hits rank too, marked 'via '. If no wiki page matches, falls back to raw transcripts (see include_raw). Returns up to max_pages paths, each with a status line (type, lifecycle, confidence, date, sources; raw hits marked not yet in wiki) and a ~400-character snippet, plus the start of overview.md (index.md when nothing matches). max_pages clamps to 1-50. Optional filters: project and type match frontmatter exactly; tag equals one whole tag, ignoring case; lifecycle takes comma-separated states; date_from/date_to are YYYY-MM-DD, invalid dates ignored. Filters apply to both layers. Open a full page with wiki_read_page; use wiki_search for exact wording.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"question": "<question>"
},
"name": "wiki_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Only pages with this tag, e.g. the agent: claude-code, codex-cli, zcode, opencode. | |
| type | No | Only this page type: source, entity, concept, synthesis, ... | |
| date_to | No | Only pages dated on or before YYYY-MM-DD. | |
| project | No | Only pages of this project (frontmatter project). | |
| question | Yes | Natural-language question or keyword(s) to search for. | |
| date_from | No | Only pages dated on or after YYYY-MM-DD. | |
| lifecycle | No | Only pages in these lifecycle states, comma-separated: draft, reviewed, verified, stale, archived. | |
| max_pages | No | Maximum pages to return (default 5). Values are clamped to 1-50. | |
| include_raw | No | Raw session transcripts: true = always rank them too, false = never. Omit it to read them only when no wiki page matches. |