Get context for a message
rhebok_get_contextRetrieves saved memories and excerpts matched to the user's exact message. Use it before answering questions about their projects, code, notes, decisions, or past sessions.
Instructions
Get the excerpts and saved memories that belong with the user's current message, chosen and size-limited like the automatic prompt hook, with more time to search. It takes the user's message; rhebok_search_knowledge takes a query you write.
Use it before answering whenever the message touches the user's own work: their projects, code, notes, decisions, past sessions, people or plans. Skip it when the message already contains a block, or when it asks about general knowledge. Use rhebok_search_knowledge for later, narrower lookups.
Parameters: pass message exactly as the user wrote it, typos included. The relevance gate is calibrated on real prompts, so a summary or a rewrite is judged against the wrong bar. cwd decides which project's memories count, so pass the working directory whenever you know it. prehook and session belong to rhebok's own Claude Code mod: never set them.
Behavior: it embeds the message through the configured embedding server and usually answers within a second. It changes nothing in the index or in the saved memories.
Returns: block, ready to read as context, or null when nothing cleared the gate, which is a normal answer; hits, the title and uri of each excerpt in the block; and notes, which says when retrieval was degraded, for example because the embedding server was unreachable.
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": {
"message": "<message>"
},
"name": "rhebok_get_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | The absolute path of the directory the user is working in. It selects the rhebok project the message belongs to. Omit when unknown. | |
| message | Yes | The user's message, exactly as they wrote it. Do not summarise or rephrase it: the gate is calibrated against real prompts. | |
| prehook | No | Leave unset. Set only by the rhebok-prehook mod: answer without searching unless `[prehook] injector` is `mod`. | |
| session | No | Leave unset. The Claude Code session id, sent by the rhebok-prehook mod so the command hook knows the mod is injecting there. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hits | Yes | The sources quoted in `block`, most relevant first. | |
| block | Yes | The context to use, as a <rhebok-context> block of excerpts and memories. Null when nothing cleared the relevance gate, which is a normal answer. | |
| notes | Yes | Why retrieval was degraded or partial, for example an unreachable embedding server or a skipped mount. Empty on a normal answer. | |
| project | Yes | The rhebok project `cwd` belongs to, when it belongs to one. | |
| skipped | Yes | Why no search ran at all, for example a message too short to search on. | |
| injector | No | Set only for the rhebok-prehook mod: which injector is configured. | |
| budget_ms | Yes | The time budget the lookup ran under, in milliseconds. | |
| elapsed_ms | Yes | How long the lookup took, in milliseconds. | |
| status_style | No | Set only for the rhebok-prehook mod: how it should show its status. | |
| untrusted_project_file | Yes | A project file found under `cwd` that is ignored because the user has not trusted it yet. |