loci
The server exposes your personal knowledge base to MCP hosts, letting agents search, ask grounded questions, explore note links, inspect the index, and trigger re-indexing.
brain_search – hybrid (vector + BM25) ranked search with optional filters:
khit count,tag, and path substring (in); returns excerpts withpath > sectionbreadcrumbs.brain_ask – ask a question and get an LLM answer grounded in retrieved excerpts, with
[source: path > section]citations; setverify=trueto append a claim-by-claim faithfulness audit.brain_links – look up a note by name and see its outbound/inbound
[[wikilink]]graph.brain_stats – get an index overview: total chunks and chunks per source file.
brain_ingest – incrementally re-index configured source directories; safe to call repeatedly,
force=truere-embeds everything.
Indexes and searches Obsidian vaults as a queryable knowledge base, with support for frontmatter tags, [[wikilinks]], and cross-vault retrieval with section-level citations.
loci 🧠
Two thousand years ago, orators stored their speeches in the rooms of a palace and walked through them to remember. loci does the same for your files.
Loci is the method behind every memory palace: place knowledge in locations, recall it by walking the path.
A queryable "second brain" for the project docs, notes, and chat logs scattered across a dozen directories — and an MCP server so your AI agents can use it too.
Local files → heading-aware chunking → embeddings → hybrid retrieval (vector + BM25) → LLM answer with section-level citations. The index lives entirely on your machine; only embedding/chat calls go out, to any OpenAI-compatible API (Zhipu / DeepSeek / Kimi / OpenAI / …).
The thesis (from studying the 90k-star platforms and the graveyard of dead lightweight tools — see our competitive landscape study): don't build another chat app. Build the memory layer that every chat app can mount. Claude Desktop, Cursor, Cline, or any MCP host becomes this project's UI, for free.
Demo
Real session, indexed against the docs of minimax-h3-turing (paths shortened for display):
$ python main.py search "what the 22G card can and cannot do" -k 3
[1] minimax-h3-turing/docs/en/01-hardware-limits.md > 01 · What a 2080Ti 22G Can and Cannot Do (similarity 0.562)
[2] minimax-h3-turing/docs/en/02-w4a8-vs-w4a4.md > 02 · Quantization Measured > You Can Try Without 22G (similarity 0.446)
[3] minimax-h3-turing/docs/en/01-hardware-limits.md > ... > 3. VRAM is just barely enough — manage it (similarity 0.504)
$ python main.py ask "How should I choose between T8 aggressive mode and the final-render mode, and why?"
Answer:
* Drafts / preview / shot selection: use T8 aggressive mode — a 43% speedup
(2.7 min/clip), and "a different picture of equal quality" is fine for picking shots.
* Final shots: use final-render mode (no T8). T8 makes the numerical trajectory
fork, so re-running with the same seed produces a different clip — which breaks
the reproducibility final outputs need.
[source: docs/en/08-t8-blockcache-4step.md > Practical Advice (4-step Turbo route)]
[source: docs/en/06-faq.md > 12. Cache-style accelerators break "same-seed re-runs"]Hybrid retrieval means a Chinese query still finds the English doc (and vice
versa) — keyword evidence (BM25) catches what embeddings miss, and every
citation points at a section, not just a file.
Does hybrid actually help? (mini-eval, 10 bilingual queries)
$ python scripts/eval_retrieval.py scripts/eval_cases.example.jsonl
vector-only: 9/10 → hybrid: 10/10Hybrid also fixed the #1 ranking on keyword-ish queries (e.g. "T8 block cache threshold speedup": vector put an FAQ first, hybrid puts the actual T8 writeup first). Run it against your own corpus with your own cases file.
Reranking: two providers
--rerank reorders the fused candidates for precision:
Provider | How | Cost |
| pointwise 0–3 relevance scoring by your chat model | one extra LLM call |
| cross-encoder, via | ~30–70 ms for 5 pairs on GPU — offline, free |
python main.py search "T8 speedup" --rerank # provider from config
python main.py search "T8 speedup" --rerank local # cross-encoder (BAAI/bge-reranker-base)The local model downloads on first use (~1.1 GB; set HF_ENDPOINT=https://hf-mirror.com
if HuggingFace is slow in your region). Measured on a 2080 Ti, bilingual query.
Office documents, PDF tables, chat logs
PDFs: with the
[pdf]extra, PyMuPDF4LLM extracts pages as markdown — tables come through as pipe rows (plain pypdf text is the fallback)Word: with the
[docx]extra,.docxparagraphs and table rows are indexedChat exports: drop a ChatGPT or Claude
conversations.jsoninto any source directory — it becomes one searchable document per conversation, taggedchatlog(search --tag chatlogscopes to chat history)
Related MCP server: Hoard
How it relates to Obsidian / your note app
It doesn't compete — the two layer up. Obsidian (or any editor) is the
note-taking frontend; this is the cross-vault search engine: point
sources at any directories (Obsidian vaults, project docs, chat exports)
and query all of them at once — from your terminal, your scripts, or your AI
agent via MCP. Obsidian-native details are understood: frontmatter tags:
(filter with search --tag), [[wikilinks]] (walk the graph with links),
code blocks are never cut mid-block, and one-line notes stay searchable.
Install & quick start
Requires Python 3.11+ (uses the stdlib tomllib).
# option A: install as a package (adds `loci` and `loci-mcp` commands)
pip install -e ".[pdf,docx]" # optional extras: PDF w/ tables, Word documents
# option B: zero-install quickstart
pip install -r requirements.txt
# 1. Configure: copy the example and fill in your values
cp config.example.toml config.toml
# 2. Ingest (incremental — deduplicated by content hash, safe to re-run)
loci ingest # or: python main.py ingest
# 3. Ask
loci ask "what did I write about X?"Commands
Command | What it does |
| scan sources, index new/changed files, prune deleted ones ( |
| retrieval only — ranked excerpts with |
| retrieval + LLM answer with |
| additionally audit the answer claim-by-claim against the sources (✓ supported, ~ partial, ✗ unsupported) |
Filter operators (combine freely, on search and ask):
Flag | Filters to |
| files whose frontmatter tags contain |
| files whose path contains the substring |
| files modified on/after that date |
| chunks containing the exact phrase |
| return N hits (default 5) |
| show the |
| multi-turn Q&A loop with conversation memory ( |
| keep the index current by polling sources (interval in |
| what's in the index: chunks per source, models, retrieval settings |
| health check: config, source dirs, embed/LLM endpoints, store (exit code 1 on failure — CI-friendly) |
| MCP server over stdio (see below) |
One memory, every IDE
Because every MCP host mounts the same loci server (same config.toml, same
index), memory written from one tool is recalled from every other:
# Claude Code
claude mcp add loci -- loci-mcp// Cursor / Cline / Qoder / Trae (mcpServers JSON — same shape everywhere)
{ "mcpServers": { "loci": { "command": "loci-mcp" } } }Then, from any of them: "remember that the staging password rotates on
Mondays" → brain_remember → later, from a different IDE:
"when does the staging password rotate?" → answered, with the memory cited.
Memories live as plain markdown in the memories directory (git-friendly, no
lock-in) and are tagged memory, so loci search --tag memory scopes to them.
Mount it in any MCP host
Add to claude_desktop_config.json (Claude Desktop) or your MCP client's
config:
{
"mcpServers": {
"loci": {
"command": "python",
"args": ["/path/to/loci/mcp_server.py"]
}
}
}The server exposes three tools (zero dependencies beyond the core):
Tool | Purpose |
| ranked excerpts with breadcrumbs |
| grounded answer with citations; |
| outbound/inbound |
| index overview (chunks per source) |
| write a memory — durable, shared across sessions and IDEs |
| soft-delete matching memories (they go to a |
| incremental re-index |
Beyond tools, the server speaks the full protocol:
Resources —
resources/listexposesbrain://statsplus onebrain://note/…resource per indexed file (raw markdown viaresources/read)Prompts — three ready-made templates:
brain-briefing,study-plan,contradiction-check; hosts render them with your topic pre-filled
Fully offline with Ollama
The index is local by design — and the embedding/chat calls can be too. Any OpenAI-compatible server works; Ollama is verified end-to-end:
[llm]
base_url = "http://localhost:11434/v1"
api_key = "ollama" # any non-empty placeholder
model = "qwen2.5:0.5b"
[embed]
base_url = "http://localhost:11434/v1"
api_key = "ollama"
model = "all-minilm"With this config, ingest / search / ask make zero cloud calls.
Swap in a bigger local chat model for better answers — the pipeline is
model-agnostic.
Configuration
Key | Meaning |
| base_url / api_key / model — any OpenAI-compatible endpoint |
| same; the model must be an embedding model (e.g. |
| document directories, scanned recursively for |
| optional per-directory chunking override — wins over the global |
| chunking params (default 800 chars / 100 overlap) |
| number of hits per search (default 5) |
|
|
| poll |
API keys can also come from the environment variables BRAIN_LLM_API_KEY /
BRAIN_EMBED_API_KEY (these override the config file).
Design decisions
~300 lines of core, no LangChain — every stage is readable, hackable, and learnable. The whole engine fits in one sitting.
MCP-first — the agent ecosystem is the UI layer. No web app to maintain.
Hybrid retrieval on by default — vector search fused with a native ~60-line BM25 (CJK-aware tokenizer) via Reciprocal Rank Fusion.
Citations always, with breadcrumbs —
path > section, so claims are verifiable at a glance.Robust, inspectable indexing — defensive loaders (skip what can't be parsed, never hang), content-hash incrementality, real pruning,
statsanddoctorso the index is never a black box.Tiny notes stay searchable — no minimum-chunk filter; a one-line note is still indexed (a lesson from watching other tools drop or choke on them).
Keys never in code —
config.toml(gitignored) or env vars.
Where it sits
loci | AnythingLLM (65k★) | Khoj (37k★) | RAGFlow (90k★) | |
Positioning | personal retrieval backend + MCP | all-in-one chat platform | self-hosted AI assistant | enterprise RAG engine |
Footprint | 2 runtime deps, no Docker | desktop app / Docker | Django server + workers | Docker, DeepDoc models |
UI | your terminal & your agents | built-in web/desktop | web + Obsidian/Emacs | web |
MCP server | ✅ native | consumer | — | — |
Hackable core | ✅ ~300 lines | ❌ | ❌ | ❌ |
Multi-user | by design, no | ✅ | ✅ | ✅ |
(Full data and reasoning: competitive landscape study.)
Roadmap
See docs/roadmap.md — reranking, GraphRAG experiments, more loaders.
License
MIT
Available Tools
7 toolsbrain_askA
Ask the knowledge base a question. Behavior: retrieves the most relevant excerpts, then an LLM synthesizes an answer grounded ONLY in them, ending with [source: path > section] citations. Usage: prefer this over brain_search whenever a question needs synthesis or an explanation; set verify=true to get a claim-by-claim audit (supported / partial / unsupported) when accuracy matters more than speed.
| Name | Required | Description | Default |
|---|---|---|---|
| verify | No | audit the answer against the sources | |
| question | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It transparently describes the retrieval, synthesis, grounding, and citation behaviors, as well as the verify audit option. However, it does not mention potential limitations (e.g., could be slow with verify, might not find relevant excerpts) or side effects, which would have made it more transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured with clear 'Behavior' and 'Usage' sections. It conveys all necessary information without redundancy or excessive length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description adequately differentiates brain_ask from the sibling brain_search and explains the verify option. It covers the tool's purpose and usage context well. However, it does not mention any edge cases (e.g., what happens if no relevant excerpts are found) or input/output examples, which would make it complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema describes only the verify parameter ('audit the answer against the sources'), while the question parameter has no description in the schema. The tool description implicitly clarifies that 'question' is a natural-language query, but the descriptions are minimal and do not add much beyond the schema. Parameter semantics are adequate but not enriched.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: asking a question, retrieving relevant excerpts, synthesizing an answer grounded only in those excerpts, and providing source citations. It explicitly contrasts with brain_search, making the purpose distinct and specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit usage guidance: prefer brain_ask over brain_search when synthesis or explanation is needed, and set verify=true when accuracy matters more than speed. This provides clear when-to-use and trade-off direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_forgetA
Retract memories that are wrong or outdated. Behavior: memory notes matching the query move to a .trash folder (recoverable by hand) and their chunks leave the index immediately; nothing is permanently destroyed. Usage: use when a remembered fact was superseded or was a mistake; check with brain_search first if you are unsure what matches.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | matches memory filenames or content |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully carries the behavioral disclosure burden. It explains that matching memory notes move to a .trash folder, are recoverable by hand, and that chunks leave the index immediately while nothing is permanently destroyed. This gives the agent an accurate model of consequences and reversibility.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three tightly packed sentences: what it does, what happens behaviorally, and when to use it. Every sentence adds distinct value and the important purpose is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter, recoverable mutation tool with no output schema and no annotations, this description is complete. It covers semantics, behavior, recovery, and usage, leaving no significant gap an agent would need to resolve before invoking it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents the single parameter 'query' as matching filenames or content, and the description does not add new parameter-specific semantics beyond restating matching behavior. Since schema description coverage is 100%, a baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource, 'Retract memories that are wrong or outdated,' which clearly identifies the tool's function. It also distinguishes itself from siblings like brain_remember and brain_search by focusing on removal/retraction rather than storage or retrieval.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The 'Usage' sentence explicitly states when to use the tool: when a remembered fact was superseded or was a mistake. It also names brain_search as the tool to consult first if uncertain, giving the agent a clear decision path.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_ingestA
Incrementally (re)index the configured source directories. Safe to call repeatedly; only changed files are re-embedded.
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | re-embed everything, ignoring hashes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It clearly discloses idempotency and incremental behavior ('only changed files are re-embedded'), but does not mention potential side effects, configuration dependencies, or what happens if source files are removed. These behaviors would be useful but not critical for calling it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences with no filler. The key benefit (safe to call repeatedly) and the mechanism (incremental re-index with only changed files) are directly stated, making it very efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one parameter, no output schema, and no annotations, the description provides the key operational facts (what it indexes) and behavioral facts (idempotent, incremental). It doesn't connect to a larger workflow (e.g., 'run before using brain_search'), but the sibling list makes that context implicit. This is sufficient for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single parameter 'force' is fully described in the input schema (100% coverage). The description does not otherwise add any meaning to the parameter, so the baseline score of 3 is appropriate, even though the description does not mention it explicitly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('index') and resource ('configured source directories'), and adds 'incrementally/reindex' to distinguish from the read-only sibling tools like brain_search and brain_stats. An agent can immediately tell this is the ingestion tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description notes that it is 'safe to call repeatedly', which is a usage hint, but it does not explicitly say when to use the tool verse the siblings or describe any exclusions. The sibling names make the distinction fairly clear, but no direct guidance is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_linksA
Show the Obsidian-style [[wikilink]] graph around a note. Behavior: lists every note the given note links to (outbound) and every note that links back to it (inbound), based on the current index. Usage: use to explore how a topic connects to others before asking questions, or to find related notes when search keywords fail.
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | note name (file stem) to look up |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full transparency burden. It accurately describes a read-only operation that lists links without any side effects. The wording 'based on the current index' implies reading from an existing index, and nothing suggests destructive or modifying behavior, making it fully transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: two sentences for behavior and one for usage. There is no redundant information; every sentence contributes to understanding the tool's function and use case.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having no output schema, the description explains what the tool returns: 'lists every note the given note links to (outbound) and every note that links back to it (inbound)'. This fully covers the expected output, and the parameter is clearly defined, so no critical context is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers 100% of parameters and describes the single 'note' parameter as 'note name (file stem) to look up'. The description adds no additional semantic detail beyond the schema, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Show the Obsidian-style [[wikilink]] graph around a note' and explicitly details the behavior as listing outbound and inbound links. This distinguishes it from sibling tools like brain_search or brain_ask, especially with the phrase 'based on the current index'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidance: 'use to explore how a topic connects to others before asking questions, or to find related notes when search keywords fail.' This clarifies when to prefer this tool over alternatives, such as when search fails or before asking questions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_rememberA
Store a durable memory (decision, fact, preference, lesson learned) into the shared knowledge base. Behavior: writes a markdown note with frontmatter tags into the memories directory and indexes it immediately, so it is searchable within the same call. Memories persist across sessions and are shared by every MCP host that mounts loci — write from one IDE, recall from any other with brain_search or brain_ask. Usage: use for decisions, facts, preferences and lessons worth recording; do not use for ephemeral chit-chat.
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | optional extra tags (a 'memory' tag is always added) | |
| text | Yes | what to remember (plain text) | |
| title | No | short title; defaults to first line |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden and does so thoroughly: it discloses that the tool writes a markdown note with frontmatter tags, indexes it immediately for same-call searchability, persists across sessions, and shares memories across all MCP hosts mounting loci. This is rich, non-obvious behavior beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-structured: purpose first, then behavior, then usage. Every sentence adds distinct value—storage semantics, indexing behavior, persistence/sharing, and explicit usage boundaries—with no filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given there is no output schema and no annotations, the description covers all essential operational context: what is written, where it is written, how it is indexed, how long it persists, who can access it, and when to use it. An agent has enough information to invoke the tool correctly without further inference.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already clearly documents text, tags, and title. The description adds context about markdown/frontmatter formatting but does not materially expand on the individual parameters beyond what the schema provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Store a durable memory (decision, fact, preference, lesson learned) into the shared knowledge base.' It clearly distinguishes this from recall tools by naming brain_search and brain_ask for retrieval, and from ephemeral use by explicitly excluding chit-chat.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides explicit when-to-use guidance ('use for decisions, facts, preferences and lessons worth recording') and when-not-to-use ('do not use for ephemeral chit-chat'). It also names the recall alternatives (brain_search, brain_ask) and explains cross-session, cross-host persistence, giving an agent clear context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_searchA
Search the personal knowledge base with hybrid retrieval (vector similarity fused with BM25 keyword matching). Behavior: returns up to k ranked excerpts, each with file path, heading breadcrumb and similarity score; no LLM call is made. Usage: reach for this when you need source material to quote, verify a claim, or see what exists on a topic; use brain_ask when you want a synthesized answer instead. Results are limited to the indexed sources — run brain_ingest first if recent files are missing.
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | number of hits to return, 1-20 (default 5) | |
| in | No | only results whose source path contains this substring, e.g. 'docs/en' or 'projects' | |
| tag | No | only results whose frontmatter tags contain this, e.g. 'rag' or 'memory' | |
| query | Yes | what to look for, in any language |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does well: it discloses hybrid retrieval, ranked excerpts with file path, heading breadcrumb and similarity score, no LLM call, and the indexed-source limitation. It does not explicitly state the operation is read-only with no side effects, but 'search' plus 'no LLM call' strongly implies it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core behavior, followed by usage guidance and a concrete limitation. Each sentence earns its place, and the labeled Behavior/Usage structure makes scanning easy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having no output schema, the description covers return values (ranked excerpts with file path, breadcrumb, score), key constraints (k limit, indexed sources), and usage context well. Combined with the schema and sibling names, an agent has enough to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already documents all four parameters with clear descriptions, so schema coverage is 100%. The description adds context about ranking and results but does not add parameter-level detail beyond the schema; baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource ('Search the personal knowledge base') and specifies the retrieval method (hybrid vector + BM25). It clearly distinguishes itself from sibling tools by naming brain_ask as the alternative for synthesized answers.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use this tool: when source material is needed to quote, verify a claim, or see what exists on a topic. It also gives a concrete alternative (brain_ask) and a prerequisite action (brain_ingest) when recent files are missing, leaving no ambiguity about selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_statsA
Report what the index currently contains. Behavior: returns the store path, total chunk count, chunk count per source file, the embedding and chat models in use, and retrieval settings (hybrid, rrf_k, top_k). Reads local metadata only — no LLM or embedding calls. Usage: call before searching to see what is indexed, after brain_ingest to confirm what changed, or whenever answers seem to be missing a file you expected to be there. Takes no parameters.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses behavior beyond basic function: it reads local metadata only and makes no LLM or embedding calls. The returned data is specified, and there is no indication of side effects or hidden costs, making the tool's behavior fully transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is structured with clear sections (Behavior, Reads, Usage) and is concise yet complete. Every sentence adds value, and there is no redundant or vague content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Even without an output schema, the description enumerates the exact return fields (path, counts, models, settings) and provides usage context. The tool's purpose, behavior, and expected output are fully understandable from the description alone.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema is empty and the description explicitly states 'Takes no parameters.' There is no ambiguity about expected inputs, and the schema coverage is complete by virtue of having no parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reports what the index currently contains and enumerates specific returned metrics (store path, total chunk count, per-file chunk counts, embedding/chat models, retrieval settings). It is unambiguous and easily distinguished from sibling tools that query or modify the index.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit usage scenarios: call before searching, after ingestion, or when answers seem incomplete. Also notes it reads local metadata only, implying a lightweight, safe alternative to tools that invoke LLM/embeddings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v0.1.2- Added
brain_forget - Added
brain_remember - Changed
brain_search4 fields changed- changed
Input schema / properties / in / descriptionPrevious value: -"only hits whose source path contains this substring"New value: +"only results whose source path contains this substring, e.g. 'docs/en' or 'projects'" - changed
Input schema / properties / k / descriptionPrevious value: -"number of hits (default 5)"New value: +"number of hits to return, 1-20 (default 5)" - changed
Input schema / properties / query / descriptionPrevious value: -"what to look for"New value: +"what to look for, in any language" - changed
Input schema / properties / tag / descriptionPrevious value: -"filter by frontmatter tag"New value: +"only results whose frontmatter tags contain this, e.g. 'rag' or 'memory'"
5 tool updates
v0.1.0- First observed
brain_ask - First observed
brain_ingest - First observed
brain_links - First observed
brain_search - First observed
brain_stats
TDQS
Each tool maps to a distinct operation: ingest, search, ask, link exploration, stats, remember, and forget. brain_search and brain_ask are clearly separated as raw excerpt retrieval versus synthesized grounded answers, with usage guidance reinforcing when to use each.
All tools share the brain_ prefix and use consistent lowercase snake_case naming. The minor noun-style names like brain_links and brain_stats still fit naturally as actions on those resources, so the overall pattern is predictable.
Seven tools is well-scoped for a personal knowledge base: indexing, retrieval, synthesis, graph navigation, memory write/retract, and status inspection are all covered. There are no redundant utilities and no obvious missing categories at this level of abstraction.
The core workflow is covered: ingest sources, search and ask over them, explore backlinks, store and retract durable memories, and inspect index state. The main gap is the lack of a direct update/delete tool for individual indexed notes, though re-ingestion and brain_forget provide workarounds.
Maintenance
Related MCP Connectors
Self-hosted AI-native knowledge workspace with hybrid search, GraphRAG, and MCP.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Self-hostable shared brain for you and your AI agents — docs, flows, meetings, decisions, rationale
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA private, local AI second brain for Markdown notes, providing hybrid search and read/write tools for MCP-compatible AI clients like Claude and Cursor.6MIT
- AlicenseNot gradedqualityDmaintenanceLocal MCP server for indexing personal knowledge into SQLite with hybrid search, chunk-level citations, memory tools, and agent orchestration.4MIT
- AlicenseNot gradedqualityAmaintenanceMCP server for local RAG over personal notes, PDFs, and documents, enabling plain-English querying and hybrid search with multi-hop context expansion.MIT
- AlicenseNot gradedqualityAmaintenanceLocal-first MCP server for retrieval over markdown wikilink vaults, offering hybrid vector+lexical search, note reading, neighbor expansion, and recent activity tracking with fully local embeddings and no network egress.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/IvenKooLab/loci'
If you have feedback or need assistance with the MCP directory API, please join our Discord server