obsidian-pkm
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| VAULT_PATH | Yes | Path to your Obsidian vault (required) | |
| OPENAI_API_KEY | No | Fallback OpenAI API key for semantic search | |
| VAULT_PKM_OPENAI_KEY | No | OpenAI API key for semantic search (preferred) | |
| VAULT_PKM_VAULT_NAME | No | Override vault name for obsidian:// links (defaults to basename of VAULT_PATH) | |
| OBSIDIAN_PKM_OPENAI_KEY | No | Deprecated fallback OpenAI API key for semantic search |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
vault-pkm rules
Links. Mention vault notes as path.md with "/" as %2F and spaces as %20, and drop .md from file= but keep it in the link text. Keep links that tools already emit.
New notes. Always use vault_write with a template; never create a note without frontmatter. Use the pkm-write skill for new notes (duplicate check, location, links). Search before creating.
Where notes go. is the session's resolved project; a project's CLAUDE.md may override a location.
Content | Location | Template |
Architecture decision |
|
|
Research finding |
|
|
Bug investigation |
|
|
Design doc |
|
|
Implementation plan |
|
|
Task |
|
|
Meeting |
|
|
Reusable knowledge |
|
|
Literature |
|
|
Capture. pkm-capture runs automatically when a PR is created. Dispatch it in the background after significant work blocks or before ending. Don't run pkm-session-end in the main conversation and don't edit the devlog by hand.
Agents and context. vault-explorer researches what the vault knows; link-auditor checks links after many note changes. The project's index, open tasks and recent devlog sessions are loaded at session start, so there's no need to read _index.md, the tasks folder or the devlog just to get oriented; follow a truncation marker when you need more.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| vault_readA | Read the contents of a markdown file from the vault. Supports pagination: read a single section by heading, last N lines, last N heading-level sections, chunk number, or line range. Files exceeding ~80k characters auto-redirect to peek data (file structure/outline) unless a pagination param or force=true is specified. Every pagination mode's output is capped at ~80k characters (~400k with force), cut at a line boundary with a note naming the next 'lines' range to read. Paths in this tool's output are formatted as markdown links |
| vault_peekA | Inspect a file's metadata and structure without reading full content. Returns file size, frontmatter, a heading outline with each heading's line number and section size, and a brief preview. The outline lists 50 headings at a time; a longer one ends with the outline_offset of the next page. Use this to plan which sections to read from large files. Paths in this tool's output are formatted as markdown links |
| vault_writeA | Create a new note from a template. Notes must be created from templates to ensure proper frontmatter. The path must be a .md file outside dot-folders (not .obsidian/, .git/ or .trash/), and an existing note is never overwritten. Available templates:
Built-in variables (auto-substituted):
Required: frontmatter.tags - provide at least one tag for the note.
Optional: frontmatter.session, frontmatter.status, frontmatter.priority, frontmatter.project, frontmatter.deciders, frontmatter.due, frontmatter.source (depending on template type).
Pass custom <%...%> variables via the 'variables' parameter. Paths in this tool's output are formatted as markdown links |
| vault_appendA | Append content to an existing file, optionally under a specific heading. When 'position' is specified, heading is required and must exist in the file. Paths in this tool's output are formatted as markdown links |
| vault_editA | Edit a file by replacing an exact string match. The old_string must appear exactly once in the file for safety. Paths in this tool's output are formatted as markdown links |
| vault_update_frontmatterA | Update YAML frontmatter fields in an existing note. Parses existing frontmatter, updates specified fields, preserves everything else. Set a field to null to remove it. Protected fields (type, created, tags) cannot be removed. Field values are validated against the note's type (e.g. task status must be: pending, active, done, cancelled; task priority must be: low, normal, high, urgent). Paths in this tool's output are formatted as markdown links |
| vault_searchA | Search for text across all markdown files in the vault. Paths in this tool's output are formatted as markdown links |
| vault_listA | List files and folders in the vault. Paths in this tool's output are formatted as markdown links |
| vault_recentA | Get recently modified files. Paths in this tool's output are formatted as markdown links |
| vault_linksA | Get incoming and outgoing links for a note. Paths in this tool's output are formatted as markdown links |
| vault_neighborhoodA | Explore the graph neighborhood around a note by traversing wikilinks. Returns notes grouped by hop distance from the starting note, with frontmatter metadata for each node. Useful for understanding clusters, finding related context, and discovering connections. Paths in this tool's output are formatted as markdown links |
| vault_queryA | Query notes by YAML frontmatter metadata (type, status, tags, dates, custom fields, sorting). Paths in this tool's output are formatted as markdown links |
| vault_tagsA | Discover all tags used across the vault with per-note occurrence counts. Useful for exploring tag conventions, finding hierarchical tag trees, and understanding vault organization. |
| vault_activityB | Query or clear the activity log. Shows tool calls made across sessions with timestamps and arguments. Use action 'query' to retrieve entries, 'clear' to delete entries. |
| vault_trashA | Soft-delete a note by moving it to .trash/ (Obsidian convention). Only .md notes outside dot-folders can be trashed; folders are refused (trash the notes inside one by one). Reports files with broken incoming links as warnings. Use vault_move to relocate files instead. Paths in this tool's output are formatted as markdown links |
| vault_moveA | Move or rename a markdown note (or a folder) within the vault. Moving a note automatically updates wikilinks in all files that reference it; moving a folder does not rewrite links that pointed at the notes inside it. Both paths must be exact. Paths in this tool's output are formatted as markdown links |
| vault_add_linksA | Add annotated wikilinks to a note's section (default: ## Related). Skips targets the note already links to (links are resolved like Obsidian: path, path suffix, then basename). Creates the section if missing. Requires exact path. Paths in this tool's output are formatted as markdown links |
| vault_link_healthA | Graph health report — finds orphan notes, broken wikilinks, weakly connected notes, and ambiguous links. Scans all markdown files (or a specific folder). Use to audit link quality and find notes that need better connections. Paths in this tool's output are formatted as markdown links |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 18 tools
Each tool targets a clearly distinct operation: read vs peek (content vs structure), write vs append vs edit (create vs add vs replace), and list vs search vs query vs recent vs tags are all separate retrieval modes. The link tools (links, add_links, neighborhood, link_health) are similarly well-separated by intent. An agent can reliably select the right tool.
All tools use a consistent vault_ prefix with snake_case, and most are verb-led (vault_read, vault_write, vault_move, vault_update_frontmatter). A few are noun-style (vault_links, vault_tags, vault_neighborhood, vault_link_health), which is readable and conventional but slightly breaks the verb_<noun> pattern.
18 tools is slightly heavy but justified for a full PKM surface spanning read/write/graph/frontmatter/search operations. Each tool earns its place with no obvious redundancy, though it is at the upper edge of a comfortable set.
Coverage is broad: content lifecycle (write/append/edit/trash/move), retrieval (list/search/query/tags/recent/peek/read), graph (links/neighborhood/health), and metadata (frontmatter). Minor gaps exist around folder management—no folder-create tool and vault_trash refuses folders—but core workflows are well covered.