Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
dbYesPath to the ragtrail SQLite trails database (--db).
embedNoPass --embed to also match paraphrases by embeddings using a local CPU model.
scopeYesScope the server is bound to (--scope).
resolverNoImport path to a custom NodeResolver, e.g. mypkg.index:make_resolver (--resolver).
subforestNoPath 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.

  1. At the start of a question, call recall with 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.

  2. After answering, call record with 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.

  3. If the user rejects the answer that a recalled path led to, call reject with the same question so the path is not served for it again.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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 query: the node ids the answer cites, and optionally the tool calls made (each {"tool": name, "args": {...}, "returned": [node ids]}). Never include the answer text.

rejectA

Report that the user rejected the answer to query. Pass the same question that was given to recall: the path recalled for it is demoted and the question gets a fresh search next time.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 3 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues