Commit graph

6 commits

Author SHA1 Message Date
6192e22186 Slim list_vault to bare index, add get_file_info for detail
list_vault: Each entry now ~55 chars (name+path+type) vs ~120 before.
- Dropped size_bytes (was 0 for dirs, wasted tokens)
- Dropped modified date (moved to get_file_info)
- .obsidian hidden by default (include_hidden=True to opt in)
- Uses _file_info_lean helper

New get_file_info tool: Full metadata for a single file.
- size_bytes, modified (YYYY-MM-DD), line_count, char_count

All dates compacted: '2025-06-10' vs '2025-06-10T23:40:11.798359+00:00'
(22 chars saved per date, ~10x token savings)

Added shared helpers:
- _compact_date() for YYYY-MM-DD everywhere
- _is_hidden_path() replacing 4 duplicate filter blocks

Estimated payload reduction for 311-note vault: ~55% on files,
plus elimination of entire .obsidian config subtree.
2026-07-07 01:56:28 -04:00
7d0a284422 Clarify list_vault path parameter to prevent model confusion
Models kept passing the vault name as both vault_name AND path
(e.g. vault_name='obsidian-skt', path='obsidian-skt'), producing garbage
results. The old description 'Relative path within the vault' was too
vague — models interpreted path as the vault identifier.

- path: now explicitly says 'NOT the vault name — that's vault_name'
- Added concrete Usage section with 4 examples
- Described as 'Subfolder inside the vault' not 'Relative path'
2026-07-07 01:45:09 -04:00
c1cb15cb3b Fix list_vault leaking .git/objects into results
rglob walks into .git/ before the name-check on .git itself fires.
Files under .git/objects/ have normal names so the entry-level filter
didn't stop them. Added ancestor-path check that skips any entry with
a hidden (dot-prefixed) directory anywhere in its path.

The result was a 566K-char blob that blew past the model's 32K context.
2026-07-07 01:43:08 -04:00
31a288933f Front-load (not memory) disambiguation into tool descriptions for 120-char prompt truncation
Ulysses truncates MCP tool descriptions to 120 chars in prompt text.
Moved '(not memory)' to first line of all four tool docstrings so the
disambiguation survives truncation. Kept Args/Returns sections intact.
2026-07-06 21:41:52 -04:00
edbb4b7152 fix: disambiguate MCP tool descriptions — mark all as FILESYSTEM TOOL
Qwen3.5-9B was conflating these tools with manage_memory because the
descriptions sounded similar ('list vault contents' vs 'search memory').

Every tool now opens with 'FILESYSTEM TOOL' to create a hard routing
boundary from conversation/memory tools. Added explicit NOT clauses
('NOT a memory search, NOT a conversation search') and USE THIS TO
guidance so the model routes correctly on first attempt.
2026-07-06 21:33:23 -04:00
37df28e159 Initial commit: Obsidian MCP Server
StreamableHTTP MCP server exposing Obsidian vaults as tools.
- 8 tools: list_vault, get_vaults, get_vault_document, search_vault,
  get_recent_changes, get_backlinks, create_document, edit_document
- FastMCP framework with path traversal prevention
- Cross-OS transport (WSL2->Windows via HTTP)
2026-07-04 10:10:30 -04:00