ragtrail
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| db | Yes | Path to the ragtrail SQLite trails database (--db). | |
| embed | No | Pass --embed to also match paraphrases by embeddings using a local CPU model. | |
| scope | Yes | Scope the server is bound to (--scope). | |
| resolver | No | Import path to a custom NodeResolver, e.g. mypkg.index:make_resolver (--resolver). | |
| subforest | No | Path to a subforest index for node hash checking and text prefetching (--subforest). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
ragtrail remembers which documentation nodes answered similar questions before.
At the start of a question, call
recallwith the user's question copied verbatim (do not rephrase it or turn it into keywords: matching works on the original wording).mode=prefetch: the useful node texts are included; answer from them, search only if something is missing.
mode=hint: read the listed node ids first, before searching.
mode=miss: search as usual.
After answering, call
recordwith the question, the node ids your answer cites and the tool calls you made. Only record when the answer is grounded in those nodes. Never pass the answer text.If the user rejects the answer that a recalled path led to, call
rejectwith the same question so the path is not served for it again.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| recallA | Look up the retrieval path of a similar question answered before. Call it first, with the user's question copied verbatim (not rephrased or reduced to keywords). Returns mode=prefetch (node texts included), hint (node ids to read first) or miss (search). |
| recordB | Save the path that answered |
| rejectA | Report that the user rejected the answer to |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 3 tools
The three tools map cleanly to distinct stages of the retrieval-path lifecycle: recall reads paths, record saves them, and reject demotes them. Their descriptions make the boundaries explicit, including what arguments each expects and when to call them. There is no practical overlap that would cause misselection.
All tools use a single, lowercase verb (recall, record, reject) following the same concise convention. The naming is predictable and immediately readable. No mixed styles or inconsistent verb patterns are present.
Three tools is a well-scoped surface for this narrow retrieval-memory loop. Each tool corresponds to a necessary operation—lookup, save, and feedback—without redundant or filler tools. The count matches the focused purpose.
The core lifecycle is covered: recall retrieves a prior path, record persists a successful one, and reject handles negative feedback by demoting a path. Minor gaps exist, such as no explicit update/edit operation for an existing record or a way to list stored paths, but these are not essential to the stated workflow.