Skip to main content
Glama
adrienthebo
by adrienthebo

search_notes_tool

Search Obsidian notes by filename or content to locate specific information, tags, or metadata within your vault.

Instructions

Search for notes by filename or content, with smart ranking.

DEFAULT BEHAVIOR (NEW): Searches BOTH note filenames AND content automatically. Filename matches are ranked higher than content matches for better discovery.

When to use:

  • Finding a note when you know part of its name (just type the name)

  • Finding notes containing specific content

  • Locating notes with specific tags

  • Searching within specific folders

  • Finding notes by frontmatter properties

Search modes:

  • Default: searches BOTH filenames and content (filename matches ranked higher) Example: "tag refactor" finds "Obsidian Tag Refactor.md" AND notes mentioning "tag refactor"

  • "path:text" - searches ONLY in filenames/paths

  • "tag:tagname" - searches by tag (supports hierarchical tags)

  • "property:name:value" - searches by frontmatter properties

Examples:

  • Find a note by name: "Project Tracker" (will find "Project Tracker.md" first)

  • Search content only: Use explicit path: prefix to exclude: "path:Project"

  • Find by tag: "tag:important" or "tag:project/web"

  • Find by property: "property:status:active"

Tag search supports hierarchical tags:

  • "tag:project" finds all project-related tags including project/web, project/mobile

  • "tag:web" finds any tag ending with "web" like project/web, design/web

When NOT to use:

  • Searching by date (use search_by_date instead)

  • Listing all notes (use list_notes for better performance)

  • Reading a specific note when you know the exact path (use read_note directly)

Returns: Search results with matched notes, relevance scores, and context. Filename matches have higher scores than content matches. Response includes match_type field: "filename" or "content".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query that matches BOTH filenames and content by default. Just type a note name to find it! Use prefixes for specific search types: 'tag:' for tags, 'path:' for ONLY filenames, 'property:' for metadata.
context_lengthNoHow much text to show around each match for context. Higher values show more surrounding content.
max_resultsNoMaximum number of results to return. Use smaller values for faster responses and larger values for comprehensive searches.
ctxNo
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: default search mode (both filenames and content), ranking logic (filename matches ranked higher), search modes with prefixes, hierarchical tag support, and return format (results with scores, match_type). It doesn't mention performance characteristics like rate limits or authentication needs, but covers most operational aspects well.

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 (default behavior, when to use, search modes, examples, when not to use, returns) and uses bullet points for readability. While comprehensive, some sections could be more concise (e.g., the examples are detailed but necessary). Every sentence adds value, but the overall length is substantial though justified by the tool's complexity.

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?

Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is highly complete. It covers purpose, usage guidelines, behavioral details, parameter semantics through examples, and return format. The lack of output schema is compensated by explicitly describing the response structure (results with scores, match_type). No significant gaps remain for effective tool selection and invocation.

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 description coverage is 75%, so the schema already documents most parameters well. The description adds valuable context beyond the schema: it explains the query parameter's default behavior (searches both filenames and content), provides multiple search mode examples with prefixes, and clarifies tag hierarchy support. However, it doesn't add meaningful information about the other parameters (context_length, max_results, ctx) beyond what's in their 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 searches for notes by filename or content with smart ranking. It specifies the verb 'search' and resource 'notes', distinguishing it from siblings like list_notes (listing all notes) and search_by_date (searching by date). The opening sentence is specific and immediately communicates the core functionality.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool (e.g., finding notes by name, content, tags, folders, properties) and when NOT to use it (e.g., searching by date, listing all notes, reading a specific note with exact path). It names specific alternative tools (search_by_date, list_notes, read_note) for excluded use cases, offering clear decision boundaries.

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

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