Skip to main content
Glama
maxkuminov

Obsidian MCP (pgvector + Ollama, self-hosted)

get_vault_guide

Retrieve a comprehensive guide for your Obsidian vault: learn generic Markdown syntax and vault-specific conventions based on your vault's CLAUDE.md configuration.

Instructions

Returns a two-part guide for working with this Obsidian vault:

  1. Obsidian primer — generic syntax (wikilinks, embeds, block refs, heading refs, tags, frontmatter, callouts, comments, highlights, math, mermaid, footnotes, tasks, plugin literals).

  2. Vault-specific conventions — folder structure, naming rules, frontmatter requirements, and tag taxonomy as configured by the vault owner in CLAUDE.md. If CLAUDE.md is absent, the response includes instructions for creating one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core handler that reads CLAUDE.md from the vault and combines it with a static Obsidian primer markdown file to produce the vault guide.
    @_tracked("get_vault_guide", [])
    async def get_vault_guide_impl() -> str:
        """Return the Obsidian primer plus any vault-specific conventions from CLAUDE.md."""
        uid = current_user_id.get()
        try:
            note = read_file("CLAUDE.md", user_id=uid)
            vault_section = (
                "# Vault-Specific Conventions\n"
                "\n"
                f"{note['content']}"
            )
        except FileNotFoundError:
            vault_section = _NO_CLAUDE_MD_MESSAGE
        except ValueError as e:
            vault_section = f"# Vault-Specific Conventions\n\n{e}"
        return f"{_VAULT_GUIDE_PRIMER}\n\n---\n\n{vault_section}"
  • Loads the static Obsidian syntax primer from a markdown file at module load time.
    _VAULT_GUIDE_PRIMER = (Path(__file__).parent / "vault_guide_primer.md").read_text(
        encoding="utf-8"
    )
  • Fallback message shown when CLAUDE.md does not exist in the vault.
    _NO_CLAUDE_MD_MESSAGE = (
        "# Vault-Specific Conventions\n"
        "\n"
        "No `CLAUDE.md` found at the vault root. To teach the agent about your\n"
        "folder structure, file-naming conventions, tag taxonomy, required\n"
        "frontmatter fields, or task-management syntax, create a `CLAUDE.md`\n"
        "file at the root of your vault. The agent will pick it up automatically\n"
        "on the next call.\n"
        "\n"
        "Suggested sections:\n"
        "\n"
        "- **Folder structure** — what lives where, and where new notes belong.\n"
        "- **Naming conventions** — how filenames are formatted.\n"
        "- **Frontmatter** — required and conventional YAML fields.\n"
        "- **Tag taxonomy** — top-level tags and their meaning.\n"
        "- **Task syntax** — any GTD/Dataview/checklist conventions in use.\n"
    )
  • MCP tool registration (with @mcp.tool() decorator) that exposes `get_vault_guide` as a tool and delegates to the implementation.
    @mcp.tool()
    async def get_vault_guide() -> str:
        """Returns a two-part guide for working with this Obsidian vault:
    
        1. **Obsidian primer** — generic syntax (wikilinks, embeds, block refs,
           heading refs, tags, frontmatter, callouts, comments, highlights,
           math, mermaid, footnotes, tasks, plugin literals).
        2. **Vault-specific conventions** — folder structure, naming rules,
           frontmatter requirements, and tag taxonomy as configured by the
           vault owner in `CLAUDE.md`. If `CLAUDE.md` is absent, the response
           includes instructions for creating one.
        """
        return await get_vault_guide_impl()
  • Import of get_vault_guide_impl from tools.py into server.py for registration.
    from src.mcp_server.tools import (
        create_note_impl,
        delete_note_impl,
        edit_note_impl,
        find_orphans_impl,
        find_related_impl,
        get_backlinks_impl,
        get_links_impl,
        get_neighborhood_impl,
        get_recent_impl,
        get_tags_impl,
        get_vault_guide_impl,
        list_notes_impl,
        move_note_impl,
        read_note_impl,
        search_notes_impl,
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses the two-part structure and the fallback behavior when CLAUDE.md is absent, which is good behavioral context for a read-only guide retrieval.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is fairly concise, front-loading the purpose. The bullet-point structure aids readability, though it could be tightened slightly by merging the lead-in with the primers.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema (not shown), the description adequately covers the guide's content and key behavioral note about CLAUDE.md. No major gaps in context for this read-only tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, so schema coverage is 100%. The description adds meaning beyond the empty schema by detailing the guide's content and structure, which helps the agent understand the return value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns a two-part guide, naming both parts with specific content. It is a distinct resource (guide) easily differentiated from sibling tools that manipulate or search notes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for understanding vault conventions but provides no explicit guidance on when to use this tool versus alternatives, nor does it suggest prerequisites or context for invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/maxkuminov/obsidian-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server