Skip to main content
Glama

Search Notes

vault_search
Read-onlyIdempotent

Find Obsidian notes using hybrid keyword and semantic search, with optional filters to narrow by folder, tags, type, and dates.

Instructions

Hybrid search across all vault notes, ranked by combined keyword and semantic relevance using Reciprocal Rank Fusion (RRF) — combining FTS5 keyword matching with vector similarity. Results are refined by a cross-encoder reranker using position-aware score blending when available. Semantic matching finds notes even when exact keywords differ — "career aspirations" finds notes about "goals" and "targets". Falls back to keyword-only (FTS5 BM25) transparently while embeddings are being built. Combine a text query with structured filters to narrow results by metadata — the "narrow by metadata, search by text" pattern. Unquoted terms use implicit AND with porter stemming; wrap in double quotes for exact phrases; punctuated terms (vault-cortex, deploy/local) are matched as exact adjacent-word phrases automatically.

Filters — all conditions AND-combine with each other and the text query:

  • folder: path prefix (e.g. "Projects")

  • tags: require all listed tags (AND)

  • type: exact match on frontmatter type (e.g. "person", "session-log")

  • related: require all listed related links (AND)

  • properties: arbitrary frontmatter key-value pairs, supports string/number/boolean (e.g. { status: "active" })

  • created: date bounds { before, on, after } in YYYY-MM-DD on the frontmatter created property — before/after are exclusive, on is exact (calendar-day match, server-local). Notes without a parseable created property never match

  • modified: date bounds { before, on, after } in YYYY-MM-DD on filesystem modified time (server-local day boundaries) — before/after match strictly earlier/later days, on matches within the day

Example: vault_search({ query: "kubernetes networking", filters: { tags: ["reference"] } }) Example: vault_search({ query: "meeting notes", filters: { type: "meeting", folder: "Work" } }) Example: vault_search({ query: "decision", filters: { modified: { after: "2026-06-30" } } }) — matching notes touched in July or later Example: vault_search({ query: "how the server watches for file changes" }) — semantic: finds notes about chokidar and file watchers even without those exact terms

When to use: The primary discovery tool for content-based queries, optionally constrained by metadata. Semantic matching bridges vocabulary gaps — try natural-language queries, not just keywords. Prefer vault_search_by_tag for tag-only queries without text. Prefer vault_search_by_folder for browsing a folder. Prefer vault_search_by_property for metadata-only queries. Prefer vault_recent_notes for time-based browsing.

Errors:

  • No matches returns { results: [], total: 0 }, not an error

  • Malformed query syntax is sanitized automatically — the tool never throws a query syntax error

  • A malformed or calendar-invalid created/modified date filter throws with remediation text ("Use YYYY-MM-DD")

Returns: JSON with results array (path, title, snippet, score, tags, folder, type, kind, extension, created, modified, bytes), total count, search_mode ("hybrid" or "fts"), and reranked (boolean — true when cross-encoder reranking refined the ordering). search_mode indicates which ranking was used — "hybrid" when vector embeddings contributed, "fts" when only keyword matching was available. score reflects combined relevance (higher = more relevant). kind is "note" for markdown notes or "file" for non-markdown content (canvas, PDF, and text files — .txt, .csv, .json, .xml, .svg, .log, .yaml, .yml, .base); file results also carry extension (e.g. ".canvas", ".pdf", ".txt"). created is omitted when null. bytes is the on-disk file size. With filters.include_leading_callout, each result also carries leading_callout ({ type, title, body }) when present.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query text — unquoted terms use implicit AND with stemming; wrap in double quotes for exact phrases
filtersNoOptional structured filters — all conditions AND-combine with each other and with the text query
Behavior5/5

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

The description discloses rich behavioral details beyond the readOnly/idempotent annotations: transparent fallback to FTS5 while embeddings build, implicit AND with porter stemming, exact-phrase behavior, automatic sanitization of malformed query syntax, empty-result behavior, exclusive vs. inclusive date boundaries, and the meaning of search_mode and reranked flags. This exceeds what annotations alone convey.

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

Conciseness5/5

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

The description is long but well-structured with clear sections ('When to use,' 'Errors,' 'Returns'), bulleted filter specifications, and concise examples. Every section earns its place by clarifying complex behavior; there is no redundant filler or repetition of schema fields.

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?

With no output schema, the description fully enumerates the return shape: results array fields (path, title, snippet, score, tags, folder, type, kind, extension, created, modified, bytes), total, search_mode, reranked, and optional leading_callout. It also covers error cases and fallback behavior, making the tool fully understandable without external documentation.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds substantial meaning: filters 'AND-combine with each other and the text query,' date bounds are explicitly exclusive/inclusive, properties support string/number/boolean, and multiple concrete examples show exactly how query and filters interact. This goes well beyond the schema's field 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 opens with a specific verb and resource: 'Hybrid search across all vault notes, ranked by combined keyword and semantic relevance using RRF.' This clearly distinguishes vault_search from sibling tools like vault_search_by_tag, vault_search_by_folder, and vault_search_by_property by positioning it as the content-based, hybrid discovery tool.

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 'When to use' section explicitly states this is 'The primary discovery tool for content-based queries' and names exact alternatives: 'Prefer vault_search_by_tag for tag-only queries without text. Prefer vault_search_by_folder for browsing a folder. Prefer vault_search_by_property for metadata-only queries. Prefer vault_recent_notes for time-based browsing.' This gives unambiguous guidance on when to use this tool vs. siblings.

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/aliasunder/vault-cortex'

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