loci
loci is an MCP server that turns your notes and agent memories into a searchable, citable knowledge base — all local.
Search (
brain_search) — hybrid vector + BM25 retrieval, with path and tag filters, returning ranked excerpts with file > section breadcrumbs and scores.Ask (
brain_ask) — LLM-synthesized answers grounded only in retrieved sources, with citations; optional claim-by-claim verification.Store memories (
brain_remember) — write durable decisions/facts/preferences as Markdown notes, indexed instantly and shared across all mounted MCP hosts.Retract memories (
brain_forget) — move outdated or wrong memories to a recoverable trash and drop their chunks from the index.Explore links (
brain_links,brain_graph) — navigate Obsidian-style wikilinks and an LLM-extracted knowledge graph of entities and relations.Consolidate (
brain_wiki) — distill scattered notes into one cross-linked markdown wiki page, written and indexed immediately.Inspect (
brain_stats,brain_harness) — view index contents, models, and retrieval settings; see per-AI-tool memory stats or refresh harness digest notes.Index (
brain_ingest) — incrementally re-index configured sources, re-embedding only changed files (or everything withforce).
Indexes and searches Obsidian vaults as a queryable knowledge base, with support for frontmatter tags, [[wikilinks]], and cross-vault retrieval with section-level citations.
Turn scattered notes, project docs and agent memories into a knowledge base you can search and ask questions about — from your terminal, browser or MCP client.
loci combines vector search with BM25 and returns answers with file > section citations. Your files and index stay on your machine. Embedding and chat requests go to the providers you configure; local endpoints can keep the entire workflow offline.
Quick start · Web console · MCP setup · Usage guide · 中文说明

Actual console UI with fictional demo data. No personal knowledge base, account or API key is connected; counts are illustrative.

What you can do
Need | How loci helps |
Find a decision buried in your notes | Hybrid search across directories, with tag, path and date filters |
Ask a question and check the evidence | Answers cite source sections; optional claim-by-claim verification |
Carry context between AI tools | MCP tools share one instance; durable memories are Markdown files |
See what each coding agent remembers | Harness discovery, file browsing, per-tool stats and digest notes |
Manage the knowledge base visually | Built-in Web console for search, Q&A, memories, indexing and audit |
Markdown, text, HTML, org-mode and chat exports work out of the box. Optional extras add PDF, Word and OCR support. Keep using your existing note editor or Obsidian vault.
Related MCP server: loci-mcp
Quick start
Try it first, with nothing configured
pip install loci-rag
loci demoloci demo copies six fictional notes into ./loci-demo-notes, chunks them and
answers three example questions — cited down to file > section — with no
config.toml, no API key and no network. It is keyword-only (BM25, the same
ranking hybrid search fuses with vector hits), which is exactly the point:
something runs before you commit a key. Add [embed] later and the same index
goes hybrid.

Actual loci demo output on the bundled sample notes; paths shortened, timings vary.
Index your own notes
Requires Python 3.11+. Start from source so the example configuration is available:
git clone https://github.com/IvenKooLab/loci.git
cd loci
python -m pip install -e .
cp config.example.toml config.tomlEdit config.toml: fill in [llm] and [embed], and change [[sources]].path to your notes directory. The embedding endpoint must support /embeddings; chat and embeddings may use different providers.
loci ingest
loci search "deployment decisions"
loci ask "What did we decide about deployment, and why?"Already have a configuration? Install the package with python -m pip install loci-rag and set LOCI_HOME to your instance directory. For optional document support, use python -m pip install 'loci-rag[pdf,docx]'.
API keys can be supplied through
BRAIN_LLM_API_KEYandBRAIN_EMBED_API_KEY. After changing the embedding model, rebuild withloci ingest --force.
Web console
loci serve-httpOpen 127.0.0.1:8765/ui to browse harness memories, search, ask questions, edit shared notes and inspect indexing activity. Clicking a search result opens an evidence pane with the passage it was cut from — the file > section citation, checkable without leaving the console. The console includes Chinese/English and light/dark switches; no frontend build is required.
By default, anonymous loopback clients have admin access. Behind a reverse proxy or SSH tunnel, set [http] local_admin = false and configure role-based tokens. See access control.
For DeepSeek Harness, loci-dsh brings search, Q&A and memory capture into the Harness workbench through the same HTTP backend.
Connect your AI tools
Point each MCP client at the same LOCI_HOME so they share the same config, index and memory files:
{
"mcpServers": {
"loci": {
"command": "loci-mcp",
"env": { "LOCI_HOME": "/absolute/path/to/your/loci-instance" }
}
}
}Use an absolute executable path if your client cannot find loci-mcp. The instance directory must contain your config.toml.
MCP tools | Purpose |
| Retrieve excerpts or get cited answers |
| Store or retract durable memories |
| Explore note links and extracted relations |
| Consolidate knowledge and inspect agent memories |
| Inspect and refresh the index |
The server also exposes note resources and briefing, study-plan and contradiction-check prompts. See the MCP guide for details.
A small daily workflow
loci watch # keep changed documents indexed
loci remember "Use staging for demos" --title "Demo environment"
loci search "demo environment" --tag memory
loci ask "How should I prepare a demo?" --verify
loci harness # inspect detected agent memoriesIndexing is incremental. Notes stay readable as Markdown. For multiple machines, sync source files and memory notes, then rebuild each local index; keep credentials out of the repository.

The usage guide includes the original bilingual retrieval example and a small evaluation you can rerun against your own corpus.
Documentation
Guide | Covers |
Commands, filters, harness setup, access control and local models | |
Provider settings, source directories and runtime options | |
Modules and the retrieval pipeline | |
Released changes and planned work | |
Development conventions and offline testing |
loci uses the OpenAI-compatible SDK and ChromaDB, with no LangChain or LlamaIndex dependency. BM25, loaders and the MCP transport are implemented in the project.
python -m pip install -e '.[dev,pdf]'
pytest # offline tests; no API keys requiredFind loci on Glama, ModelScope and awesome-mcp-servers. Source: GitHub · Gitee. Licensed under MIT.
Available Tools
10 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_graphA
Query the knowledge graph over memories and wiki pages. Behavior: with an entity, returns its outgoing/incoming relations (each cites its source file); without one, returns the top hub entities. The graph is built from loci graph build (LLM-extracted triples in graph.json). Usage: explore how concepts connect before asking questions; see the strongest entities for orientation.
| Name | Required | Description | Default |
|---|---|---|---|
| entity | No | entity name; omit to list hub entities |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure, and it delivers. It discloses both invocation modes, what each returns, that relations cite their source files, and that the graph is built from LLM-extracted triples in graph.json via `loci graph build`. This gives the agent a clear picture of behavior and data provenance.
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 front-loaded: the main action is in the first sentence, followed by behavior, provenance, and usage. Every sentence contributes a distinct piece of information, and there is no filler or redundancy.
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-optional-parameter read tool with no output schema and no annotations, the description is complete. It explains both output modes, the return characteristics (relations with source citations, hub entities), data provenance, and the intended usage context. Nothing needed to invoke it correctly 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 already documents the single optional parameter at 100% coverage, so the baseline is 3. The description adds meaningful semantics by tying the presence or absence of the entity parameter to different outputs: relations for a given entity versus top hub entities when omitted.
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: it queries the knowledge graph over memories and wiki pages. It further specifies two concrete behaviors — returning outgoing/incoming relations for an entity or top hub entities when omitted — which makes its scope and output mode clear and distinct from siblings like brain_search and brain_ask.
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 explicitly says when to use it: explore how concepts connect before asking questions and see the strongest entities for orientation. It does not name alternative tools or state when not to use it, so it stops short of full routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
brain_harnessA
Harness memory hub: per-AI-tool (zcode, codex, ...) memory stats, or refresh each one's auto-summary note into the shared memory pool. Unchanged harnesses cost nothing.
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | only this harness (optional) | |
| force | No | re-summarize even when memories are unchanged | |
| action | Yes | stats = table; summarize = regenerate digest notes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It adds real behavioral context — summarize regenerates digest notes into a shared pool, and unchanged harnesses cost nothing — but omits whether the shared pool write is durable/reversible, whether it needs elevated permissions, and what stats returns beyond the schema's 'table'.
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?
Two dense sentences with no filler, and the dual purpose is front-loaded. Mildly hurt by jargon ('harness', 'auto-summary note') that assumes context the agent may not have.
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 3-parameter tool with no annotations and no output schema, the description covers both modes and the cost behavior of the summarize path. It leaves the summarize side-effect and return shape under-specified, but nothing critical is missing for 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?
Schema description coverage is 100%, so name, force, and action are all documented in the schema, including the enum meaning. The description only loosely echoes these ('refresh each one's auto-summary note' maps to summarize) and adds no syntax or format detail beyond the schema, so baseline 3 is correct.
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 resource (harness memory hub) and two concrete operations: per-AI-tool memory stats and refreshing each harness's auto-summary note into the shared memory pool. It implies a distinction from the sibling brain_stats (which is presumably global) without naming it explicitly.
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?
Usage is implied by the two enumerated operations, and 'Unchanged harnesses cost nothing' hints at when summarize is cheap or skippable. However, it never states when to pick this over brain_stats or brain_search, nor any prerequisite for the summarize action.
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.
brain_wikiA
Generate a wiki page about a topic by distilling everything the index knows into one curated, cross-linked markdown page. Behavior: retrieves up to k source excerpts, an LLM synthesizes a structured page, and the page is written to the wiki directory and indexed immediately (loci's memory-consolidation layer). Requires a working LLM. Usage: use when scattered notes about a topic should become one stable, searchable page; regenerate the same topic to update it.
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | how many source excerpts to distill (default 12) | |
| topic | Yes | the topic to write the page about |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the full pipeline: retrieves up to k excerpts, synthesizes a structured page, writes to the wiki directory, and indexes immediately. It also mentions the dependency on a working LLM. With no annotations provided, this is strong behavioral disclosure, though it doesn't mention potential side effects like overwriting an existing page.
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 front-loaded: it states the core action first, then the behavior, then usage. Every sentence earns its place, and the structure makes it easy for an agent to parse quickly.
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 2 params, 100% schema coverage, and no output schema, the description covers the key context: what it does, how it behaves, when to use it, and a prerequisite. It doesn't describe the return value, but with no output schema and a clear write-action, that's a minor gap. The lack of mention of overwriting behavior is a small omission.
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 coverage is 100%, so the schema already documents both parameters. The description adds context for k ('how many source excerpts to distill') and topic ('the topic to write the page about'), but these are already in the schema. The description's mention of 'up to k source excerpts' adds a small behavioral nuance, but not enough to push beyond baseline 3.
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: generating a wiki page by distilling index knowledge into a curated, cross-linked markdown page. It distinguishes itself from siblings by naming the memory-consolidation layer and the specific output artifact (wiki page), which is unique among the listed brain_* tools.
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 explicitly says when to use it ('when scattered notes about a topic should become one stable, searchable page') and even covers the regeneration use case ('regenerate the same topic to update it'). It also notes the requirement of a working LLM, which is a clear prerequisite.
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.
1 tool update
v0.8.1- Added
brain_harness
1 tool update
v0.6.2- Added
brain_graph
1 tool update
v0.1.3- Added
brain_wiki
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
Scored across 10 tools
Most tools target distinct actions (ingest, search, ask, remember, forget, stats, wiki), and the descriptions explicitly disambiguate the search-vs-ask and graph-vs-links pairs. The remaining mild overlap is between brain_graph and brain_links (both graph exploration) and the somewhat vague brain_harness, but guidance is clear enough to select correctly.
Every tool uses a uniform brain_ + single-verb/noun pattern (brain_search, brain_ask, brain_remember, brain_forget, brain_ingest, etc.). No casing or verb-style deviations, making the set highly predictable.
Ten tools is well within the ideal range and each earns its place: ingest, search, ask, remember, forget, stats, wiki, graph, links, and harness cover distinct capabilities. Nothing feels padded or missing at the count level.
The surface covers the full memory lifecycle: index (ingest), create (remember), read (search/ask), delete (forget), plus stats, wiki consolidation, and graph exploration. Minor gap: no explicit update/edit operation for an existing memory note (though remember can effectively overwrite), and no delete for generated wiki pages.
Maintenance
Related MCP Connectors
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
A second brain for your AI agent. Shared memory for your team's AI agents, plus public and private knowledge bases — works with ChatGPT, Claude, Cursor and any MCP client.
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Related MCP Servers
- 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
- FlicenseNot gradedqualityAmaintenanceEnables MCP-compatible AI agents to search, ask, and retrieve section-level cited answers from a local hybrid index over scattered notes, documents, and chat logs.-
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to query a local, hybrid-searchable second brain over scattered notes, documents, and chat logs with section-level citations. It exposes retrieval tools, resources, and prompts through MCP so hosts like Claude Desktop, Cursor, and Cline can use the indexed knowledge.-
- FlicenseNot gradedqualityBmaintenanceA local MCP server that lets AI hosts like Claude Desktop, Cursor, or Cline query a hybrid vector + BM25 index of your scattered notes, project docs, PDFs, and chat exports, returning answers with section-level citations. It exposes eight tools, resources, and prompts so agents can search, ask, and walk links across all your source directories at once.-