Skip to main content
Glama
shaynemeyer

obsidian-mcp

by shaynemeyer

obsidian_search_notes

Read-onlyIdempotent

Search your Obsidian vault by full-text query and get matching notes with surrounding context. Returns ranked results, using Obsidian's native index when available or direct file scanning otherwise.

Instructions

Full-text search across the vault, returning matching notes with context.

When Obsidian is running this uses its native search index and results are ranked the way they would be in the app. Otherwise it falls back to scanning files directly, which matches all terms as substrings.

Args: params (SearchNotesInput): - query (str): Search text; all terms must be present to match - context_length (int): Characters of context per match, 10-1000 - limit (int): Maximum notes returned, 1-100 - response_format (str): 'markdown' or 'json'

Returns: str: Markdown results, or JSON of the shape {"query": str, "count": int, "backend": "rest"|"filesystem", "results": [{"path": str, "score": float, "context": [str]}]} On no matches: a message suggesting broader terms. On failure: "Error: "

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, destructiveHint), the description discloses the fallback to filesystem scanning, differences in ranking and substring matching, the return format for JSON, and error/no-match messages. This provides significant behavioral context that an agent needs to set expectations about results and potential performance.

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: a concise opening sentence, a behavioral note, a parameter list, and a return section. It is slightly verbose but each section earns its place. The most important scope (full-text search) is front-loaded, and the fallback behavior is highlighted early. A minor redundancy with the schema parameter descriptions prevents a 5.

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?

The description covers the return format, error handling, no-match behavior, and the fallback mechanism, which is quite comprehensive for a read-only search tool. It does not explicitly mention the vault parameter, but the schema provides that detail, and the description says to see obsidian_list_vaults in the schema. Overall, an agent has enough to call this tool correctly.

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

Parameters3/5

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

The schema already provides descriptions for each parameter (query, context_length, limit, response_format, vault), and the description text largely repeats this information. It adds no new meaning beyond the schema; for example, the description lists 'all terms must be present' which is also in the schema's query description. The description does not mention the vault parameter, though the schema covers it. Since schema coverage is high, the description's contribution is minimal.

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?

States a specific verb ('full-text search') and resource ('across the vault') with a clear outcome ('returning matching notes with context'). It distinguishes itself from siblings like obsidian_list_notes and obsidian_read_note by focusing on search rather than listing or reading a single note. The fallback behavior also clarifies the scope of what it does.

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

Usage Guidelines2/5

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

The description explains how the tool behaves under different conditions (native index vs. filesystem scan) but never explicitly states when to use this tool over alternatives, such as obsidian_list_notes or obsidian_get_active_note. There is no mention of 'use this when...' or 'do not use this when...'. The purpose is clear, but the usage context is not explicitly delineated.

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