Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoserve only. The HTTP port.3000
RAGDOWN_TOKENNoserve: the bearer token /mcp and /api/context require. Hook: the token it sends.
RAGDOWN_WATCHNoWatch the folder; without a watcher, sync on start and on ragdown_reindex only.true
RAGDOWN_MODELSNoModel cache, shared by every folder.~/.cache/ragdown/models
RAGDOWN_THREADSNoONNX Runtime threads for bge-small.half the cores
RAGDOWN_DATA_DIRNoThe index. Deleting it only costs a rebuild.~/.cache/ragdown/<hash of docs dir>
RAGDOWN_DOCS_DIRYesThe Markdown folder, walked recursively. Dot-folders and node_modules are skipped, and symlinks are not followed. Indexes .md, .markdown and .mdx.
RAGDOWN_EMBEDDERNobge-small, openai:<model> (any OpenAI-compatible /embeddings endpoint, such as Ollama or llama.cpp), or hash (tests only).bge-small
SECURE_LOCAL_NETNoserve only. Skip the token on a trusted network. serve refuses to start with neither.false
RAGDOWN_NOTES_DIRNoWhere ragdown_remember writes. Must be inside the docs folder.notes
RAGDOWN_READ_ONLYNoHide the write tools.false
RAGDOWN_HOOK_TOP_KNoMost sections injected per prompt.4
RAGDOWN_TEXT_LIMITNoCharacters per hit in text output. Every cut names the ragdown_read_doc call that returns the rest.2000
RAGDOWN_EMBEDDING_URLNoFor openai:<model>. The URL of the OpenAI-compatible embeddings endpoint.OpenAI
RAGDOWN_HOOK_MAX_CHARSNoMost characters injected per prompt.6000
RAGDOWN_HOOK_MIN_SCORENoLowest cosine similarity the hook injects.0.7
RAGDOWN_HOOK_TIMEOUT_MSNoHow long the hook waits for the server.5000
RAGDOWN_EMBEDDING_API_KEYNoFor openai:<model>. The API key for the OpenAI-compatible embeddings endpoint.OpenAI

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
ragdown_recallA

Hybrid (semantic + keyword) search over the user's Markdown documents. Returns the most relevant sections with file path, line range, heading breadcrumb and cosine similarity (above ~0.8 is usually on topic) and the day the file last changed. A section of a document an agent wrote says so. Use it before answering anything the documents may cover; follow up with ragdown_read_doc for the surrounding text.

ragdown_contextA

For hooks that run before a turn: the documents related to a user prompt, as a ready-to-inject block, or empty text when nothing is similar enough. Unlike ragdown_recall it filters by min_score, skips short prompts and slash commands, and never returns a section twice for the same session_id. reset: true first forgets what that session was given; call it with an empty prompt after the client compacts or clears its context. format: 'claude-code' wraps the block as the JSON a Claude Code UserPromptSubmit hook adds to the prompt.

ragdown_read_docA

Read a Markdown file from the documents folder, whole or by line range, straight from disk. Never clipped. Use it to see the context around a ragdown_recall hit, or to follow a [[wikilink]] in a document. The first line is 'path:start-end of total_lines (hash …)', the hash being the whole file's, for base_hash; the text follows from the second line, exactly as it is in the file.

ragdown_backlinksA

The documents that link to a document — by [[wikilink]], alias, or relative Markdown link — each with the lines the links are on. Use it to find what depends on or refers to a document, e.g. before changing or superseding it.

ragdown_listA

Browse the documents rather than search them. Returns one line per document: its path, title, tags and last change, who wrote it and in which session when an agent did, and its description when its frontmatter has one. Optionally under a subfolder, with a tag, by who wrote it, or from one session. sort: 'recent' puts the most recently changed first.

ragdown_statsB

The documents folder, index size (files, chunks), embedder, whether this process is the indexing primary, and the last sync. include_files lists every indexed file.

ragdown_rememberA

Save something worth keeping (a decision, a fix, a how-to) as a new Markdown document in the documents folder, indexed immediately so later searches find it. Never overwrites an existing file. When this document replaces an earlier one, pass that document's path as supersedes so searches stop returning the old version.

ragdown_writeA

Rewrite or append to an existing document, or create one at a path you choose. To change part of a document, use ragdown_edit, which sends only the passages that change. By default text replaces the whole file (frontmatter included), which for an existing document needs base_hash: the hash ragdown_read_doc returned, so you never overwrite a version you have not read. A document this creates gets created_by: ragdown_write in its frontmatter, so the hash returned is of the file as written, not of text. append: true adds text at the end of the document, or with heading at the end of that section, leaving the rest as it is. If the file changed since base_hash, nothing is written: read it again and redo the edit.

ragdown_editA

Change part of an existing document without sending the rest of it: each edit swaps one exact passage (old_text) for another (new_text). old_text must match the document character for character, as ragdown_read_doc returned it, and be there exactly once unless replace_all is true, so include enough of the surrounding text to make it unique. Edits are made in order, each on the result of the one before, and if any of them does not apply nothing is written. An empty new_text deletes the passage. A passage that is not found is answered with the nearest one the document does have.

ragdown_moveA

Rename or move a document, or a subfolder with everything in it, to a new path inside the documents folder. Every link that pointed at what moved ([[wikilinks]] and relative Markdown links, in any document) is rewritten to still point at it, and the result names the documents that were updated. Never overwrites: if something is already at to, nothing moves. Use this rather than ragdown_write plus a delete, which would break the links.

ragdown_deleteA

Permanently delete a document, or a subfolder, from the documents folder and the index. There is no trash and no undo. Call ragdown_backlinks first: links to a deleted document are left as they are, pointing at nothing. When a document is out of date rather than unwanted, prefer ragdown_remember with supersedes, which keeps the old text readable. A subfolder that holds anything is deleted only with recursive: true. Pass base_hash to delete a document only if it is still the version you read.

ragdown_reindexA

Bring the index up to date with the folder now. Changes are normally picked up automatically within a second; use this after bulk edits made while no server was running, or full: true to re-embed everything.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 12 tools

Disambiguation4/5

Each tool targets a distinct action (recall=search, list=browse, backlinks=referrers, context=hook injection), and descriptions carefully differentiate close pairs like recall vs context and write vs edit. The only mild overlap is remember vs write, since both create documents, though descriptions clarify remember never overwrites and is intent-specific.

Naming Consistency5/5

Every tool uses the same ragdown_ prefix with snake_case, and verb-based names (read_doc, write, edit, move, delete, list, recall, remember) dominate. The few noun names (backlinks, context, stats) still fit the uniform convention.

Tool Count5/5

12 tools is well within the ideal 3-15 range and each one earns its place in a document-RAG workflow. No redundant or filler tools are present.

Completeness5/5

Full lifecycle coverage exists: create (remember/write), read (read_doc/list), update (edit/write), delete, plus move with link rewriting, search (recall), backlinks, reindex, and stats. This covers the domain thoroughly with no obvious dead ends.

Maintenance

ActivityMaintained
ResponsivenessUnresponsive