Skip to main content
Glama
sunub

Obsidian MCP Server

Obsidian Content Getter

vault

Search and retrieve content from Markdown notes in an Obsidian vault. Use actions like search, read, or collect context to find notes by keyword or topic.

Instructions

Retrieves and searches the content of Markdown (.md, .mdx) documents stored in an Obsidian vault. Use this tool to find notes related to a specific topic or keyword and understand their core content.

When to use:

  • When you need to find a specific note by its title or a keyword to check its content.

  • When you want to synthesize and summarize information scattered across multiple notes.

  • When looking for answers to questions based on your saved records, such as "What was the project deadline?"

  • To discover connections by finding all notes that link to a specific note.

  • When you need to retrieve a list of unfinished tasks (- [ ]) from daily notes or meeting minutes.

  • Use "index_vault_to_vectordb" to manually trigger a full re-indexing of the vault for the vector database.

Returns the content of the most relevant document(s) in text format. It can also include metadata such as the document's title, tags, and creation date.

Requirements: The user's Obsidian Vault path must be correctly configured in an environment variable or a similar setting. For searches, use the exact filename or include core keywords for content-based queries.

IMPORTANT INSTRUCTION FOR AI: If the tool response includes a 'diagnostic_message' (usually found at the beginning of the text or in a tag), you MUST relay this information to the user exactly once. It contains essential advice on how to improve search quality by running a local setup script via 'npx @sunub/obsidian-mcp-server setup'. Do not ignore it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default: 10 for search, unlimited for others)
queryNoNatural language query for filtering content paragraphs using the local reranker (optional for read action)
quietNoIf true, suppresses non-error output messages. Default is false.
scopeNoScope for collect_context. topic: collect docs relevant to topic, all: collect from the entire vault.topic
topicNoTopic to collect contextual memory for (collect_context action)
actionYesThe action to perform: search documents, read specific file, list all content, get stats, collect contextual memory packets, load stored memory, or trigger indexing
keywordNoKeyword to search for in documents (required for search action)
maxDocsNoMaximum number of documents to process for collect_context
filenameNoSpecific filename to read (required for read action)
memoryModeNoMemory output mode for collect_context. response_only: return packet only, vault_note: save to vault note only, both: return and save.response_only
memoryPathNoPath to a stored memory note for load_memory (default: memory/context_memory_snapshot.v1.md)
excerptLengthNoLength of content excerpt to include in search results (default: 500)
includeContentNoWhether to include document content in search results (default: true)
maxCharsPerDocNoMaximum number of characters extracted per document for collect_context
maxOutputCharsNoOptional hard cap for output size in characters. Helps control token cost in long responses.
compressionModeNoCompression strategy for tool output. summary: lightest TOC & document summary only (default), aggressive: smallest output, balanced: moderate size, none: keep as much original content as possible.summary
continuationTokenNoContinuation token to resume a previous collect_context batch operation
includeFrontmatterNoWhether to include frontmatter metadata in results (default: false)
Behavior4/5

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

Annotations only provide openWorldHint. The description adds behavioral details: returns content and metadata, and includes crucial instruction about relaying diagnostic messages. This goes beyond annotations by disclosing expected output and a user interaction requirement.

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 well-structured with clear sections (purpose, when to use, return info, requirements, important instruction). It is front-loaded with the primary purpose. Though slightly verbose, every section adds value.

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 complexity (18 parameters, enums, no output schema), the description covers usage scenarios, return format, requirements, and a critical instruction. It provides sufficient context for an AI agent to use the tool effectively.

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?

Schema coverage is 100%, so all parameters are described in the schema. The description adds contextual usage hints (e.g., 'use exact filename or core keywords for searches'), which enhances understanding beyond the schema descriptions.

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 retrieves and searches Markdown documents in an Obsidian vault, specifying verb (retrieves, searches) and resource (Markdown documents). It implicitly distinguishes from sibling tools (which are for writing/properties) by focusing on reading/searching.

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

Usage Guidelines4/5

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

The description provides a detailed 'When to use' section with specific scenarios (find note, synthesize info, find answers, etc.) and mentions triggering re-indexing. However, it does not explicitly state when not to use the tool or compare with sibling tools.

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

Install Server

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/sunub/obsidian-mcp-server'

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