Skip to main content
Glama

Find context for a message

rhebok_context
Read-onlyIdempotent

Retrieves the excerpts from your knowledge base that rhebok would attach to a message, so answers reflect your own projects, notes, decisions and past sessions.

Instructions

Call this FIRST, before answering, whenever the user's message touches their own work: their projects, code, notes, decisions, past sessions, people or plans. Pass the user's message verbatim as message. It returns the excerpts from the user's knowledge base that rhebok would add to the message, gated and budgeted like the automatic prompt hook but with more time to search. The answer is JSON: block is the context to use (null when nothing cleared the gate), hits lists the sources, and notes says when retrieval was degraded. Skip it only when a block is already in the message. Prefer it over rhebok_search for the first lookup, and over your own memory of the user.

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_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoThe directory the message was written in, which selects the rhebok project.
messageYesThe user's message, exactly as they wrote it.
prehookNoSet only by the rhebok-prehook mod: answer without searching unless `[prehook] injector` is `mod`.
sessionNoThe Claude Code session id, recorded so the command hook knows the mod is injecting there.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the read-only/idempotent annotations, it discloses that retrieval is gated and budgeted like the automatic prompt hook with more search time, that `block` may be null when nothing cleared the gate, that `hits` lists sources, and that `notes` flags degraded retrieval. That is genuine behavioral context an agent could not derive from the annotations alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the imperative "Call this FIRST", then trigger, then return shape, then exclusions and alternatives — a logical order with no filler sentences. It is dense for a single paragraph, but every clause carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description compensates by explaining the JSON return keys and null semantics; annotations cover the safety profile; and the four parameters are fully schema-documented. Nothing material is missing for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters are already documented in the schema. The description only reinforces the `message` parameter (pass verbatim); it adds no meaning for `cwd`, `session`, or `prehook` beyond what the schema states, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a concrete action (fetching the user's knowledge-base excerpts that rhebok would inject) and scopes it tightly to messages touching the user's own work. It explicitly separates itself from rhebok_search and from the model's own memory, so an agent can pick it without inspecting siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ("whenever the user's message touches their own work… projects, code, notes, decisions, past sessions, people or plans"), an explicit exclusion ("Skip it only when a <rhebok-context> block is already in the message"), and named alternatives to prefer over (rhebok_search for first lookup, the model's own memory). Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.