add vault-aware tools: list_vault_tags, check_wikilinks, search_notes

Shared read-only implementations in src/vault/noteTools.ts, exposed to
both backends: as an in-process SDK MCP server (mcp__vault__*, stripped
to plain names in SSE events) for claude-sdk, and as chat-completions
tool defs for openai-compat. Wikilink resolution follows Obsidian
semantics incl. path-links resolved relative to the linking file's
folder; tags come from frontmatter (list + array forms) and inline
#tags, excluding code fences. zod added as a direct dependency
(pinned to the SDK's transitively-resolved v4).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 02:14:31 +00:00
co-authored by Claude
parent a5f62512e8
commit 9d71692402
9 changed files with 820 additions and 31 deletions
+2 -2
View File
@@ -12,7 +12,8 @@
"@anthropic-ai/claude-agent-sdk": "^0.3.212",
"@koa/bodyparser": "^6.0.0",
"@koa/router": "^14.0.0",
"koa": "^3.0.1"
"koa": "^3.0.1",
"zod": "^4.4.3"
},
"devDependencies": {
"@types/koa": "^2.15.0",
@@ -2535,7 +2536,6 @@
"resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
"integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
"license": "MIT",
"peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}