Skip to main content
Glama
obsidian-mcp

obsidian-mcp

by bbdaniels

obsidian_search

Search an Obsidian vault by words, phrases, or regex to find existing notes and sections before creating new documentation. Returns note, heading, line, snippet, and superseded status.

Instructions

Search the vault. Plain words are looked up in a full text index of note sections (split at ## and ### headings) and ranked by relevance: every word is required, a "quoted phrase" is kept together, and note titles, paths and headings count; frontmatter is not searched. Each result gives the note, the section heading, the line, a snippet, and 'superseded: YYYY-MM-DD' for a section marked superseded, which is ranked after live ones. A regular expression or a case-sensitive query scans whole files in path order instead. Use before creating new notes to find existing relevant documentation.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "obsidian_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesWords to find, or a Python regular expression when regex is true
regexNoTreat the query as a regular expression and scan the files (default: false)
folderNoOptional: limit to this folder
max_resultsNoMaximum results to return (default: 10)
case_sensitiveNoMatch case exactly, scanning the files for the literal text (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.3.0
    • addedInput schema / properties / case_sensitive
      Added value: +{
      +  "description": "Match case exactly, scanning the files for the literal text (default: false)",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / folder / description
      Previous value: -"Optional: limit search to this folder"New value: +"Optional: limit to this folder"
    • changedInput schema / properties / query / description
      Previous value: -"Text to search for (case-insensitive)"New value: +"Words to find, or a Python regular expression when regex is true"
    • addedInput schema / properties / regex
      Added value: +{
      +  "description": "Treat the query as a regular expression and scan the files (default: false)",
      +  "type": "boolean"
      +}
  2. First observedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full disclosure burden and does so well: AND semantics ("every word is required"), quoted-phrase grouping, which fields count (titles, paths, headings), the frontmatter exclusion, result ranking with superseded sections demoted, and a different traversal order (path order) in regex mode. That is substantive behavioral detail an agent could not obtain from the schema alone.

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?

Front-loaded with the tool's identity and dense with substance; no filler sentences. The middle result-format sentence is a long run-on that would read better as a short list, which is the only structural weakness.

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

Completeness5/5

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

There is no output schema, and the description compensates by enumerating what each result contains (note, section heading, line, snippet, superseded date) and how superseded sections are ranked. Combined with the matching-mode explanation, an agent has everything needed to call it and interpret results correctly.

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 the schema baseline already documents all five parameters. The description still adds meaning beyond it by explaining query semantics (quoted phrases kept together, all words required) and clarifying that regex/case-sensitive queries switch from index lookup to whole-file scanning rather than merely filtering.

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?

Opens with a specific verb and resource ("Search the vault") and immediately narrows the mechanism: a full-text index of note sections split at ## and ### headings, versus a whole-file scan for regex/case-sensitive queries. The explicit note that frontmatter is not searched is the kind of scope boundary that separates it from a property-oriented sibling.

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?

Gives a concrete usage instruction — "Use before creating new notes to find existing relevant documentation" — and explains the branch condition that switches the tool into file-scanning mode. It does not state exclusions (e.g., when to prefer a frontmatter/property search instead), so it stops short of full when/when-not guidance.

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