vault-mcp
vault-mcp
中文 | Português
编码代理的长期记忆:它在回答之前先搜索你的 Obsidian 仓库,引用 path:line,并记录它学到的东西,而无需询问保存到哪里。
用于搜索、读取和写入 Obsidian 知识库的 MCP 服务器。通过词法 BM25 加一跳 wiki 链接进行检索;智能捕获学习内容,自行决定是创建新笔记还是追加到现有笔记;自动传播到领域 MOC 和每日笔记,并在领域是新的时传播到知识索引。移动、重命名、提升、归档和删除笔记也通过服务器进行,因此链接和 MOC 条目保持正确,而不是悄悄腐烂。
示例
定义该项目的两个工具的真实输出,针对此仓库的测试仓库运行。
服务器用葡萄牙语回答:它所服务的仓库是用葡萄牙语写的,其工具响应也是如此。以下输出是逐字原文,未翻译。
vault_search 返回已经带有地址的片段——caminho:linha(path:line)就是代理被告知要引用的内容:
2 resultado(s) para "retry backoff". Cite `caminho:linha` ao usar qualquer trecho abaixo. Cada trecho da nota vem prefixado com `> `; linhas sem esse prefixo são deste servidor, nunca conteúdo do vault.
02-wiki/nestjs/bullmq-worker.md:13 — Contexto > Retry e backoff (score 7.94)
> ### Retry e backoff
>
> Quando um job falha, o BullMQ aplica a política de retry configurada em `queueOptions`. Para revisar o fluxo de autenticação usado antes de cada retry, veja [[auth-guard]];
> a mesma referência [[auth-guard]] documenta como o token é revalidado a cada nova tentativa de processamento.
02-wiki/nestjs/auth-guard.md:11 — Contexto (score 3.18, via grafo)
> ## Contexto
>
> A API precisava de um mecanismo central de autenticação e autorização, aplicado de forma consistente em todos os módulos, sem repetir lógica de validação de JWT em cada controller.auth-guard 与查询中的任何词条都不匹配。它是通过一跳 wiki 链接从确实匹配的笔记中被拉进来的,其分数被衰减——这就是 via grafo(通过图谱)所标记的。
vault_learn 自行决定是创建笔记还是追加到现有笔记,最多写入四个文件并一次提交:
Aprendizado registrado em nota NOVA: 02-wiki/concorrencia/timeout-de-fila-libera-a-fila-nao-o-chamador.md
Motivo: sem overlap de tag nem de domínio
Propagado para: 02-wiki/concorrencia/concorrencia-moc.md, 00-index/index-knowledge.md, 04-daily/2026-08-26.md
Commit: sim
Diff (mostre ao usuário):
--- /dev/null
+++ b/02-wiki/concorrencia/timeout-de-fila-libera-a-fila-nao-o-chamador.md
@@ -0,0 +1,15 @@
+---
+tipo: wiki
+tags: [fila]
+criado: 2026-08-26
+---
+
+# Timeout de fila libera a fila, não o chamador
+
+Um slot que expira solta a PRÓXIMA escrita; a chamada original continua esperando o resultado real dela. Resolver a promessa do chamador no timeout reportaria um desfecho que ninguém observou.
+
+**Contexto:** Serializando as tools de escrita do vault-mcp contra si mesmas.
+
+## Solução
+
+## Exemplo
--- /dev/null
+++ b/02-wiki/concorrencia/concorrencia-moc.md
@@ -0,0 +1,16 @@
+---
+tipo: moc
+tags: [concorrencia]
+criado: 2026-08-26
+atualizado: 2026-08-26
+---
+
+# Concorrencia — Mapa de Conteúdo
+
+## Notas
+
+- [[timeout-de-fila-libera-a-fila-nao-o-chamador]] — Um slot que expira solta a PRÓXIMA escrita; a chamada original continua esperando o resultado real dela.
+
+## Relacionados
+
+- [[../../00-index/index-knowledge|índice de conhecimento]]
--- a/00-index/index-knowledge.md
+++ b/00-index/index-knowledge.md
@@ -1,6 +1,6 @@
---
tipo: moc
-atualizado: 2026-02-01
+atualizado: 2026-08-26
---
# Índice de Conhecimento
@@ -9,6 +9,7 @@
- [[../02-wiki/nestjs/nestjs-moc|nestjs]] — NestJS, providers, guards, filas
- [[../02-wiki/docker/docker-moc|docker]] — Dockerfiles, multi-stage, compose
+- [[../02-wiki/concorrencia/concorrencia-moc|concorrencia]] — Um slot que expira solta a PRÓXIMA escrita; a chamada original continua esperando o resultado real dela.
## Convenções
--- /dev/null
+++ b/04-daily/2026-08-26.md
@@ -0,0 +1,10 @@
+---
+tipo: daily
+criado: 2026-08-26
+---
+
+# 2026-08-26
+
+## Capturas
+
+- 11:12 [[timeout-de-fila-libera-a-fila-nao-o-chamador]] (aprendizado)四个文件,一次 docs(vault): {titulo} 提交——撤销整个学习过程就是对它执行 git revert。concorrencia 领域之前不存在,这就是为什么调用携带了 confirm_novo_dominio: true,MOC 是从零构建的,知识索引也增加了一行指向它。
Related MCP server: mcp-obsidian-vault
安装
发布为 @andreymudri/vault-mcp,因此运行它无需克隆任何东西:
npx @andreymudri/vault-mcp # no install; npm fetches and runs it
npm i -g @andreymudri/vault-mcp # or install once, then `vault-mcp`作用域不是装饰:npm 上裸的 vault-mcp 是另一位作者的 443 字节命名空间占位符,所以 npx vault-mcp 运行的是他们的包而不是这个。作用域内的命令保持短名称——npx @andreymudri/vault-mcp 从包内解析 bin。
从克隆中开发它:
npm install
npm run build
npm testNode >= 20 用于运行服务器(
dist/是纯 JavaScript),每次推送都由compatCI 任务验证,该任务在 20 上构建并冒烟启动它运行测试套件需要更多:
test/frontmatter.test.ts在固定时区的子进程中执行真实的parseFile,而该子进程是node <file>.ts——它依赖 Node 自身的类型剥离。CI 固定为 26,即开发所用的版本测试套件有 19 个文件、1,155 个测试,耗时约 10 秒。
npm test先运行类型检查(pretest),并用时钟限制套件:挂起的套件以 124 退出,绝不会没有退出码
配置
仓库通过环境变量传入:
VAULT_PATH="/absolute/path/to/vault" npx @andreymudri/vault-mcp从克隆中,无需注册表的相同方式:
VAULT_PATH="/absolute/path/to/vault" node /absolute/path/to/vault-mcp/dist/server/index.js将 /absolute/path/to/vault 替换为你的仓库根目录。VAULT_PATH 是必填的。如果未设置,或不是目录,服务器以退出码 1 退出并将原因写入 stderr。
注册到 Claude Code
使用以下方式添加 MCP:
claude mcp add vault --scope user \
-e "VAULT_PATH=/absolute/path/to/vault" \
-e "VAULT_AUTO_PUSH=1" -- \
npx -y @andreymudri/vault-mcp从克隆中,在 -- 后面放 node /absolute/path/to/vault-mcp/dist/server/index.js。
仓库路径是绝对的,并以单个 KEY=value 对的形式进入 -e——整个对用引号括起来,这就是使包含空格的仓库路径也能工作的原因。JSON 中没有变量展开,所以这里的相对路径会变成无法启动的服务器。npx 上的 -y 对 stdio 服务器很重要:没有它,第一次运行可能会在无人观看的终端上停在安装提示处。
--scope user 注册到 ~/.claude.json,使工具在每个项目中都可用,这正是重点:当你在另一个仓库中工作时,仓库回答关于决策和模式的问题。没有该标志时默认是 local(仅当前目录)。用 claude mcp get vault 检查;要移除它,用 claude mcp remove vault -s user。
VAULT_AUTO_PUSH
每次写入(vault_write_note、vault_edit_note、vault_learn、vault_move、vault_delete)都已经提交到仓库的 git。VAULT_AUTO_PUSH=1 在提交后添加 git push——没有它,提交只留在机器上,而保存在多个地方的带远程的仓库会静默分叉。
默认关闭,因为这是该服务器所做的唯一会离开机器的事情。开启时:
git push不带 refspec,跟随分支的上游:未配置的仓库会说明这一点,而不是为它猜测远程和分支它总是作为警告失败,绝不作为回滚。 笔记已经在磁盘上并已提交;因为网络中断而撤销它将是可用的最差交易。工具的响应增加一行
Push: sim|não,只有在确实尝试了推送时才会出现远程已经领先不会自行解决。 Pull、rebase 和 merge 会重写用户的知识库,那是他们的决定——不是保存一条笔记的副作用。警告会指出情况并停止
限制为 30 秒,带
GIT_TERMINAL_PROMPT=0:stdio 服务器没有终端可以回答凭据提示,所以提示就是挂起。凭据必须来自辅助程序(例如gh auth git-credential)或 SSH 密钥
九个工具
Tool | Input | When to Call |
|
| 在回答关于用户的决策、模式、陷阱或历史之前。默认结果:6 条片段。默认排除 |
|
| 当片段不够用时,在 |
|
| 按元数据盘点笔记(例如"哪些项目处于活动状态?""哪些笔记带有 jwt 标签?")。不搜索内容——内容搜索请使用 |
|
| 衡量一个主题的关联程度,找到索引某条笔记的 MOC,评估变更的影响。链接去重:同一笔记两次链接目标只计为一个反向链接。 |
|
| 创建或替换整条笔记。保证有 frontmatter。自动提交。要修改某段内容,请使用 |
|
| 替换笔记中的精确段落。如果段落不存在或出现多次则失败——此时请在 |
|
| 在会话期间记录学习心得(架构决策、模式、陷阱、坑)。不要询问保存位置——由服务器决定。向用户显示 diff。如果 |
|
| 移动、重命名、从 |
|
| 删除笔记并从 MOC 中移除其条目。如果笔记在 |
vault_learn 如何决定
vault_learn 通过结合标题和洞察来搜索主题。只有已经在 02-wiki/ 中且通过直接 BM25 命中(而非图扩展)的笔记才有资格接收该学习心得。如果找到这样的候选:
1.8× 比率:最高命中必须比第二名高出至少 1.8 倍。如果没有这种差距,就存在疑问,此时会创建新笔记。
合取重叠:最高命中必须与输入共享一个标签,或者属于同一领域(
02-wiki/<dominio>/)。如果没有重叠,即使分数很高也会创建新笔记。
当两个条件都满足时,它会追加到现有笔记的 ## YYYY-MM-DD — Title 部分下。否则,它会在 02-wiki/<dominio>/ 中创建新笔记。
这种偏向是有意为之:有疑问时,创建新笔记,而不是把学习心得埋在错误的地方。之后合并笔记总是可能的;但找回丢失的学习心得却不可能。
逃生通道
三种例外情况可以改变最终目的地:
标题冲突:重复规则说不,但同名文件已存在(同 slug 的旧笔记)。服务器仍然追加到它并警告
anexado em <path> por coincidência de título; a checagem de duplicata não indicou essa nota。这会将丢失的笔记带回积累流程。重复目标无法接收文本:服务器决定追加到候选笔记,但该笔记无法编辑。服务器以从 slug 派生的名称创建新笔记(例如
multi-stage-cache-de-camadas.md而不是multi-stage.md)并警告não foi possível anexar em <path>; aprendizado gravado em <outro-path>。警告会指明学习心得写入的确切路径。笔记路径被非笔记阻塞:笔记将被创建的路径(例如
02-wiki/docker/titulo.md)被 FIFO、符号链接、目录或硬链接(无法覆盖的内容)占用。服务器创建带日期后缀的新笔记(例如titulo-2026-08-25.md)并警告<path> não é uma nota (link, diretório ou dispositivo); aprendizado gravado em <outro-path>。警告会指明学习心得写入的确切路径。
在任何情况下,都不会丢失任何洞察——响应会准确说明学习心得最终写在了哪里。
vault_learn 写入什么
一次 vault_learn 调用最多可以触及 4 个文件,全部在一次提交中完成,提交消息为 docs(vault): {titulo}:
笔记(
02-wiki/<dominio>/<slug>.md):创建,或追加学习心得。始终写入。领域 MOC(
02-wiki/<dominio>/<dominio>-moc.md):如果不存在则创建。每次调用都用atualizado:更新;仅当笔记是新建的时才添加- [[<slug>]] — <resumo>行。仅在内容变化时写入。知识索引(
00-index/index-knowledge.md):仅当领域之前不存在时更新。仅在内容变化时写入。每日笔记(
04-daily/YYYY-MM-DD.md):如果不存在则创建。仅当该行尚未存在时,才用捕获行- HH:MM [[<slug>]] (<tipo>, <projeto>)更新。仅在内容变化时写入。
每个文件都是原子写入的。如果传播失败(例如磁盘空间不足),文件会保留在磁盘上,响应中会包含一条警告,指明未更新的目标。如果 git 提交失败(例如仓库不存在),文件会保留在磁盘上,响应中会包含一条警告。
撤销整个学习操作的方法是:
git revert <commit-hash>调整排名
对以下参数的任何更改都必须通过完整测试套件:npm test。每个常量都固定在特定位置:
FIELD_WEIGHTS(src/index/inverted-index.ts):heading: 3.0, tags: 2.0, prose: 1.0, code: 0.5。各字段词频的权重。在test/bm25.test.ts中固定。NOTE_TYPE_WEIGHTS(src/index/inverted-index.ts):moc: 0.3, daily: 0.3。乘以 MOC 或日记的最终得分。它存在是因为这些笔记会在短片段中重复查询词——没有这个因子,MOC 会压过它所指向的笔记。由test/bm25.test.ts:370-374中的字面量断言固定;test/golden-queries.test.ts和test/retrieval.test.ts只有在它被移除时才会失败,重新调参不会导致失败。GRAPH_DAMPING(src/retrieval/budget.ts):0.4。乘以图邻居(即链接笔记)的得分。一跳,不是多跳。在test/retrieval.test.ts:522中固定。K1和B(src/index/bm25.ts):1.2和0.75。BM25 参数。在test/bm25.test.ts:232-233中固定。DUPLICATE_SCORE_RATIO(src/write/learn.ts):1.8。追加操作中最高命中与次高命中之间的最小比率。在test/learn.test.ts:336中固定。
运行完整测试套件:
npm test安全保证
以下情况拒绝写入:
保险库(vault)之外的路径
.git/、.obsidian/、node_modules/、_templates/和99-archive/中的路径符号链接(写入前解析)
硬链接
在单个服务器实例内,两个并发的 vault_learn 或 vault_write_note 调用一开始就不会交错执行:每次写入都会等待前一次完成。如果某次写入挂起(例如 git 被阻塞),60 秒超时为下一次写入释放队列,而不是释放调用方——较早的调用会继续等待其真实结果。一旦下一次写入开始,两者可能同时运行——该调用会获得一条警告,说明无法保证独占性。这不能防止来自 Obsidian、第二个服务器实例或保险库内 git checkout 的并发写入。
搜索与检索
搜索在 2–3 级标题的片段上运行 BM25,以不同权重覆盖正文、标签和标题。如果查询的任何一个词条都没有命中任何笔记,它会尝试建议相似词条(Levenshtein 距离 ≤ 2)。
在纯 BM25 搜索之后,它按一跳 wiki 链接扩展:命中笔记的邻居继承源笔记得分乘以 GRAPH_DAMPING。
每条结果都标注 caminho:linha(路径:行)——这就是笔记的真实地址。在 vault_search 中,笔记片段以 > 为前缀,以区分保险库内容与服务器输出行。
保险库结构
目录约定:
00-index/:知识索引和根 MOC01-raw/:原始捕获和剪藏(默认从搜索中排除)02-wiki/:按领域组织的知识(nestjs/、docker/等)03-projects/:项目笔记04-daily/:日记(YYYY-MM-DD.md)_templates/:Obsidian 模板(索引时忽略)99-archive/:归档笔记(可读,不可写)
已知限制
这个服务器有三件不做的事,每一件都是有意选择而非疏忽:
归档到
99-archive/会丢失笔记在其源 MOC 条目上的— summary。vault_move会从源 MOC 中移除该行,但没有目标 MOC 可将其重新插入, 而归档区是不可写区域,因此没有地方存放这段文本。取消归档会重建一个 裸的- [[slug]],而不是原来的条目。替代方案——把摘要暂存到被移动 笔记自己的 frontmatter 中,或存到侧边索引——成本都高于损失。该操作 绝不会做的是凭空编造摘要:没有源行,条目就会以简短而真实的形式呈现。仅存在于 frontmatter 中的 wiki 链接不会被
vault_move重写。 候选 笔记是从正文中选取的,链接图也是从正文构建的,因此被此过滤器跳过的 笔记,其边也是vault_backlinks所没有的。在不扩大扫描范围的情况下 扩大重写范围会产生更糟的不对称:一个被修正的链接,却没有读取工具 能看到它。vault_get_note原样返回笔记正文。 对其转义会静默破坏"读取后编辑" 流程,尤其是那些带有控制字符的笔记,因为vault_edit_note将old_text作为文件的精确子串进行匹配。确实按行做出声明的表面——vault_search片段和 diff——都经过了净化处理。
迄今提出的十六个后续问题都已修复——包括阻塞事件循环约 5 秒的别名
frontmatter、在读取路径上被索引的硬链接,以及跨进程写入竞争。
docs/followups.md 保留了记录:每个条目都附有表征它的测量数据、
应用的修复和固定它的测试,以及上述每项接受决定背后的完整推理。
开发
修改代码之后:
npm run build # Compiles TypeScript (src/ only, emits dist/)
npm run typecheck # tsc over src/ AND test/, without emitting
npm test # Runs the typecheck (pretest) and then the vitest suite
npm run smoke # Starts the built dist/ and demands the nine tools over stdio
npm run dev # Watch mode (if needed)构建用的 tsconfig.json 只覆盖 src/——编译产物不编译测试。tsconfig.test.json
以 noEmit 覆盖两者,npm 的 pretest 在测试套件之前运行它:一个不再满足其声明
implements 的接口的测试替身会在类型检查时失败,而不是在运行时失败。
完整测试套件约需 10 秒。部分测试使用 FIFO 模拟长时间运行的操作;它们都自行
打开写端(withFifoWatch),因此会在几秒内失败,而不是依赖运行器的超时。
npm test 通过 scripts/test.mjs 运行,该脚本以时钟为界约束测试套件
(15 分钟,VAULT_MCP_TEST_TIMEOUT_MS)并杀死进程组:挂起的测试套件变成
退出码 124,而不是无退出码的无限停滞。
npm run smoke 是测试套件无法做到的检查:它将编译后的 dist/server/index.js
作为程序针对一次性保险库启动,完成 MCP 握手,并要求 tools/list 恰好返回
九个工具。它覆盖了入口点判定自身为库而不启动任何东西的情况——对 shell 是
干净的退出 0,对客户端是无限等待——也正是它让 engines.node >= 20 成为
可验证的声明:CI 在 Node 20 和固定的 26 上都运行它,因为测试套件本身无法
在 20 上运行(test/frontmatter.test.ts 依赖运行时的类型剥离),而编译后的
JavaScript 可以。
提交消息和服务器自身的面向用户的字符串——工具描述、错误消息、diff 中的
散文——都用葡萄牙语(巴西)书写:这个服务器服务的保险库是一个葡萄牙语
知识库,其读者是讲葡萄牙语的模型。代码注释和 docblock 用英语,其中
src/index/bm25.ts 从第一遍起就保留为葡萄牙语。
许可证
MIT © 2026 Andrey Mudri
Available Tools
9 toolsvault_backlinksA
Lists the notes pointing at the given note. Use it to gauge how connected a subject is, to find the MOC that indexes the note, or to weigh the impact of changing or renaming it.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault-relative path, with `.md`. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the behavioral burden. It clearly indicates a read-only listing operation, but it does not disclose the output shape, ordering, or whether only direct inbound links are returned. This is adequate for a simple tool but leaves some behavioral details unspecified.
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 concise, purposeful sentences. The first defines the primary action, and the second adds valuable usage context without wordiness. Every sentence earns its place.
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 read-only tool, the description is largely complete: it states the resource, the behavior, and practical use cases. The lack of an output schema is the main gap, but the phrase 'Lists the notes' gives sufficient expectation of what the call returns for selection and 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 the schema already documents the single `path` parameter. The description only refers to 'the given note' without adding additional parameter-level detail, so the baseline 3 applies.
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: 'Lists the notes pointing at the given note.' This clearly defines the backlinks functionality and distinguishes it from siblings like vault_get_note, vault_search, and vault_list, which serve different purposes.
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 clear use cases: gauging connectedness, finding the MOC that indexes the note, and weighing the impact of changing or renaming it. It does not explicitly mention when not to use it or name alternative tools, but the context is strong enough for an agent to decide when this tool fits.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_deleteA
Deletes a note and commits, removing its line from the domain MOC. Refuses, without deleting, if the note has no committed version in HEAD (there would be no way to undo), if it is structural (MOC, daily note, index) or if it lives under 99-archive/. Notes pointed at by others require confirm, and the refusal lists who points at them — their links will break. The answer carries the exact command that undoes it.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault-relative path, with `.md`. | |
| confirm | No | Confirms deleting even with other notes pointing at this one; their links will break. |
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 it does an excellent job: it discloses that the tool commits, removes the MOC line, refuses to delete unsafe candidates, lists who points at the note, breaks links, and returns an undo command. This is exceptional behavioral transparency.
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 dense but perfectly structured: the core action comes first, followed by refusal conditions, confirmation behavior, and the undo guarantee. Every sentence adds meaningful information with no fluff.
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 destructive, mutating tool with no annotations and no output schema, this description covers all the essential context an agent needs: side effects, refusal conditions, confirmation requirements, and even the undo command in the response. It is remarkably 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?
Schema description coverage is 100%, so the baseline is 3. The description does not add significant new meaning for 'path' or 'confirm' beyond what the schema already provides; it mostly restates the safety conditions rather than elaborating parameter formats or values.
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 action ('Deletes a note and commits'), a resource ('note', 'domain MOC'), and a distinctive side effect (removing its line from the MOC). It also enumerates refusal conditions, so an agent can clearly tell it apart from write, edit, and move siblings.
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 gives concrete context for when deletion is allowed vs refused: requires a committed version in HEAD, cannot target structural notes or archive paths, and needs confirm when backlinks exist. It does not explicitly name alternatives like vault_move for archiving, so it falls just short of full guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_edit_noteA
Replaces ONE exact passage of an existing note and commits. Fails, without writing, if the passage does not appear or appears more than once — in that case send more context in old_text.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault-relative path, with `.md`. | |
| new_text | Yes | The text that takes its place. | |
| old_text | Yes | The exact passage to replace; it must be unique within the note. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description carries the full burden and does so well. It discloses the commit side effect, the atomic failure mode ('Fails, without writing'), and the exact uniqueness condition that triggers failure. This is valuable behavioral information 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?
A single dense sentence conveys the operation, constraints, failure mode, and remediation without wasted words. The most important behavioral constraint, uniqueness and no-partial-write, 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 three-parameter edit tool with no output schema and no annotations, this description is complete enough for an agent to invoke it correctly: it knows what the tool edits, when it fails, and how to recover. The schema covers parameter details, and the description covers behavior and error handling.
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 all three parameters with 100% coverage, so the baseline is 3. The description adds extra semantic guidance on old_text: it must be unique and can be expanded with more context if the initial attempt fails. This goes beyond the schema's static descriptions.
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 uses a specific verb and resource: 'Replaces ONE exact passage of an existing note'. This clearly distinguishes it from sibling tools like vault_write_note (writing a whole note) and read/list tools, even though it does not name them 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: use this to replace one exact passage in an existing note. The description does not explicitly contrast it with alternatives or state when not to use it, but it does provide actionable guidance on how to resolve ambiguity by sending more context in old_text.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_get_noteA
Reads a whole note by its vault-relative path (e.g. 02-wiki/nestjs/auth-guard.md), with frontmatter, resolved links and broken links. Use it after vault_search when the snippet is not enough, or before editing the note.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault-relative path, with `.md`. | |
| offset | No | First character of the BODY to return, for reading a note that did not fit in one answer. Omit it on the first call; afterwards use the offset the cut marker announces. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the burden. It marks the tool as a read operation and discloses the return payload's key components (frontmatter, resolved links, broken links). It does not mention pagination/truncation with the offset parameter, but the schema already documents that behavior.
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 sentences, front-loaded with the action and resource, followed by a workflow note. No filler; the example earns its place.
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 two-parameter read tool with no output schema, the description gives path format, return contents, and usage context. The offset/cut-marker behavior is captured in the parameter schema, so nothing critical 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?
Input schema covers 100% of parameters, so the description need not add much beyond the baseline. The path example ('02-wiki/nestjs/auth-guard.md') provides helpful formatting guidance beyond the schema's 'vault-relative path'.
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?
States the exact operation ('Reads a whole note') and object (vault-relative path with example), and adds what is included (frontmatter, resolved links, broken links). This clearly separates it from the vault_search snippet behavior.
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 instructs to use it after vault_search when the snippet is insufficient and before editing, naming a concrete alternative and two workflow triggers. This gives an agent decision rules rather than leaving usage to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_learnA
Records a learning in the vault. Call it whenever something non-obvious and reusable comes up during the session — an architecture decision, a pattern, a gotcha, a configuration trap — without asking first where to save it: the server decides on its own between appending to the existing note that already covers the subject and creating a new one (the bias is to create), and propagates on its own to the domain MOC and the daily note (and to the knowledge index when the domain is new), all in a single commit. Show the returned diff to the user.
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Tags for the note's frontmatter. | |
| links | No | Related wiki-links, without the brackets. | |
| titulo | Yes | Short title for the learning; it becomes the filename. | |
| dominio | Yes | Domain under `02-wiki/`, e.g. nestjs, docker, patterns. A new domain requires confirm_novo_dominio. | |
| insight | Yes | The learning itself, in markdown. | |
| projeto | No | Name of the project under `03-projects/` this learning belongs to; it goes into the daily note's capture line. | |
| contexto | Yes | Where and why this came up. | |
| confirm_novo_dominio | No | Confirms creating a domain that does not yet exist under `02-wiki/`. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description carries the full burden of behavioral disclosure and delivers it: server-side routing between append and create, propagation to domain MOC, daily note, and knowledge index for new domains, atomicity ('all in a single commit'), and the returned diff to show the user. This reveals side effects and internal logic that neither the name nor the schema conveys.
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 core action is front-loaded ('Records a learning in the vault') followed by usage triggers, routing behavior, propagation, and return handling. Every clause earns its place and nothing is wasted, though the single run-on sentence with nested dashes and parentheticals is harder to parse than shorter sentences would be.
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 no annotations and no output schema, the description covers purpose, when to call, routing decision, multi-target side effects, atomicity, and the diff return — nearly everything an agent needs. The main gaps are not mentioning the new-domain confirmation flow behind confirm_novo_dominio and not describing failure or error behavior, which is minor against the overall complexity.
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 baseline of 3 applies. The description adds modest extra color by tying the domain parameter to propagation behavior (knowledge index for new domains), but it does not need to compensate for missing schema text and does not explain individual parameter syntax beyond it.
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?
States a specific verb and resource — 'Records a learning in the vault' — with concrete examples of what counts (architecture decision, pattern, gotcha, configuration trap). The auto-routing behavior ('the server decides on its own... the bias is to create') clearly distinguishes it from the write/edit siblings, so an agent can tell them apart.
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?
Gives explicit trigger conditions: 'Call it whenever something non-obvious and reusable comes up' plus concrete scenarios, and instructs the agent not to ask where to save. However, it never names alternatives (e.g., vault_write_note, vault_edit_note) or states when not to use this tool, so the exclusion side is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_listA
Lists notes by metadata — tipo, tags, status, folder — without looking at content. Use it for inventory ("which projects are active?", "which notes carry the jwt tag?"), not to search by subject: for subject use vault_search.
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Every one of these tags must be on the note. | |
| tipo | No | Frontmatter `tipo`: wiki, moc, projeto, daily. | |
| folder | No | Vault folder, matched on a segment boundary. | |
| status | No | Frontmatter `status`, e.g. ativo, pausado. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral burden. It adds useful context by disclosing that the tool filters by metadata and ignores content, but it does not describe return shape, pagination, ordering, or any side effects. 'Lists' implies read-only behavior, but that is not stated explicitly.
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 sentences with no filler. The core behavior is front-loaded, the metadata filter types are listed, and the exclusion/alternative is given in the second sentence.
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 filtered-list tool with four optional, well-documented parameters, the description gives enough context for an agent to call it correctly. The absence of an output schema leaves some ambiguity about what fields are returned, but the primary decision of when to use vault_list versus vault_search is fully covered.
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 each parameter already has a clear description in the schema. The tool description reinforces that these are metadata filters but adds no new meaning beyond what the schema provides, so the 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?
States a specific verb ('Lists') and resource ('notes by metadata'), and explicitly clarifies it does not look at content. It distinguishes itself from vault_search by name, so an agent can tell the two tools apart immediately.
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 when-to-use guidance via inventory examples and directly says 'not to search by subject: for subject use vault_search.' This clearly routes the agent to the correct sibling tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_moveA
Moves, renames, promotes or archives a note, fixing on its own every link that would otherwise start pointing somewhere else, migrating its entry between domain MOCs and committing it all at once. to is the full path with .md, so the four operations are one: 01-raw/inbox/rascunho.md → 02-wiki/nestjs/auth-guard.md promotes, renames and changes domain together. 99-archive/ counts as BOTH source and destination, which gives you archive and unarchive. A destination domain with no MOC requires confirm_novo_dominio. Show the returned diff to the user.
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Full destination path, vault-relative, with `.md`. Moving, renaming and promoting are the same operation. | |
| from | Yes | The note's current vault-relative path, with `.md`. | |
| confirm_novo_dominio | No | Confirms creating the MOC of a destination domain that does not have one yet. |
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 it well: it discloses automatic link fixing, MOC migration, atomic commit behavior, confirmation requirements for new domains, and that a diff is returned. This goes well beyond the bare move/rename semantics and gives an agent a realistic model of the tool's effects.
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 dense but every sentence earns its place: it defines the operation, clarifies path semantics with a concrete example, explains the archive special case, and states the confirmation requirement. The most important behavioral fact (link fixing) 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 complex multi-purpose tool with no output schema and no annotations, the description is remarkably complete. It covers the input semantics, the domain-MOC behavior, the archive/unarchive case, the confirmation flow, and the expected user-facing output. An agent has enough to call it correctly in most scenarios.
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 baseline is a 3. The description adds real value by explaining how 'to' encodes the operation kind, that 99-archive can be both source and destination for archive/unarchive, and when confirm_novo_dominio is required. This enriches the schema descriptions without repeating them.
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 uses a specific verb set ('Moves, renames, promotes or archives a note') and precisely identifies the resource (a vault note) and the core side effect (fixing every link). It distinguishes itself from siblings like vault_edit_note and vault_delete by explaining the unified path-based operation with domain MOC migration.
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 clearly implies when to use the tool: for any move/rename/promote/archive operation that should stay link-consistent. It gives concrete path examples and explains special cases like 99-archive and confirm_novo_dominio. However, it never explicitly states when NOT to use it or names alternatives like vault_edit_note for content-only edits.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_searchA
Lexical-semantic search over the vault (BM25 plus one wiki-link hop). Call it before answering any question about the user's decisions, patterns, gotchas or history, and before recording a new learning. Returns snippets already cited as path:line — repeat that citation in your answer. Notes under 01-raw/ are excluded unless include_raw.
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Filters by frontmatter tags. A note must carry ALL of them; case does not matter. | |
| tipo | No | Filter by the frontmatter `tipo`: wiki, moc, projeto, daily. | |
| limit | No | Maximum snippets returned (default 6). | |
| query | Yes | Search terms in natural language. | |
| folder | No | Restrict to a vault folder, e.g. `02-wiki/nestjs`. | |
| status | No | Filters by the frontmatter `status`, e.g. `ativo`. | |
| include_raw | No | Include `01-raw/` (unvetted capture), left out of results by default. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it discloses the key behavioral traits: search quality, exclusion of 01-raw notes unless include_raw, and the path:line citation format. It does not need to discuss side effects because the tool name clearly indicates a read-only search operation.
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: purpose first, then usage, then output behavior, then the raw-notes exception. Every sentence conveys a distinct, necessary piece of information with no filler.
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 the 7-parameter schema, the absence of annotations, and the absence of an output schema, the description covers what the agent needs most: when to use the tool, how results are formatted, and the one non-obvious inclusion/exclusion rule. The remaining parameter details are fully handled by the schema.
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 all seven parameters are already documented in the input schema. The description only restates the include_raw behavior, which is already expressed in the schema, so it adds no meaningful semantic value beyond what the agent already has.
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 defines the tool as a vault-wide lexical-semantic search using BM25 plus one wiki-link hop, which is specific and immediately distinguishes it from sibling tools like vault_list and vault_backlinks. It states the verb, resource, and retrieval behavior without ambiguity.
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 instructions on when to call it: before answering questions about the user's decisions, patterns, gotchas, or history, and before recording new learnings. It does not explicitly state when not to use it or name an alternative tool, but the context is clear enough for correct routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
vault_write_noteA
Creates or replaces a whole note, with frontmatter guaranteed, and commits it to the vault's git. It replaces the entire file: to change one passage use vault_edit_note, and to record a learning use vault_learn, which picks the destination and propagates on its own.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault-relative path, with `.md`. | |
| content | Yes | The note's markdown body, without the frontmatter block. | |
| frontmatter | No | Frontmatter fields, e.g. `{ "tipo": "wiki", "tags": ["jwt"] }`. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full burden — and it delivers. It discloses that the tool replaces the entire file (destructive), commits to the vault's git (side effect), and guarantees a frontmatter block (behavioral guarantee). This is exactly the kind of context an agent needs before calling a write tool.
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 sentences with the core behavior front-loaded and the caveat plus alternatives in the second. Minor redundancy exists between 'Creates or replaces a whole note' and 'It replaces the entire file,' but the former sets scope while the latter emphasizes destructiveness, so each clause earns its place.
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 write tool with no output schema and no annotations, it covers the essentials: operation, destructive scope, git-commit side effect, frontmatter handling, and sibling routing. The one gap is that it never describes the return value or confirmation behavior on success, which would be valuable given there is no output schema. Otherwise an agent has everything needed to call it 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?
Schema description coverage is 100%, so path, content, and frontmatter are already fully documented. The description adds marginal value with 'frontmatter guaranteed' (clarifying the caller avoids the frontmatter block in content), but provides no extra format or syntax details. Baseline 3 is appropriate since the schema does the heavy lifting.
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?
States a specific verb ('Creates or replaces'), a clear resource (a whole note), and unique scope: it replaces the entire file while guaranteeing a frontmatter block. It also names sibling tools vault_edit_note and vault_learn as the tools for different jobs, so an agent can distinguish it without opening schemas.
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 routes away from this tool: 'to change one passage use vault_edit_note' and 'to record a learning use vault_learn' with the reasoning that vault_learn picks the destination and propagates on its own. The whole-file vs one-passage distinction gives a clear decision rule for when to use vault_write_note instead.
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.
9 tool updates
v0.3.0- First observed
vault_backlinks - First observed
vault_delete - First observed
vault_edit_note - First observed
vault_get_note - First observed
vault_learn - First observed
vault_list - First observed
vault_move - First observed
vault_search - First observed
vault_write_note
TDQS
Scored across 9 tools
Each tool targets a distinct operation: search, list metadata, read note, backlinks, whole-file write, passage edit, automatic learning, move, and delete. The descriptions explicitly contrast overlapping-sounding tools (vault_write_note vs vault_edit_note vs vault_learn; vault_search vs vault_list), leaving little room for misselection.
All tools share the vault_ prefix and snake_case, and most follow a verb_noun shape like vault_get_note, vault_write_note, and vault_edit_note. A few names are bare verbs or nouns without an explicit object (vault_search, vault_learn, vault_backlinks), but the pattern is still predictable and readable.
Nine tools is well-scoped for a knowledge vault server: there is a clear placement for reading, searching, listing, writing, editing, learning, moving, and deleting notes. Each tool earns its place and none is redundant.
The tool set covers the full note lifecycle — discovery, retrieval, creation, editing, deletion, and move/rename — plus vault-specific needs like backlinks, link fixing, MOC propagation, and git commits. No critical dead ends are obvious from the described surface.
Maintenance
Related MCP Connectors
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to maintain a structured Markdown or Obsidian memory vault with tools for reading, writing, searching, and organizing notes.MIT
- AlicenseAqualityCmaintenanceProvides AI agents with direct filesystem access to an Obsidian vault for note management, task orchestration, context persistence, and git synchronization.2786 npm3MIT
- AlicenseAqualityBmaintenanceEnables AI agents to use Obsidian vaults as persistent, bidirectional knowledge workspaces with wikilink/backlink resolution, structured frontmatter/tag indexing, task aggregation, and Obsidian Headless Sync.11MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to search, read, and write notes in an Obsidian vault, including creating and updating notes in an inbox and syncing changes with Gitea/GitHub.MIT