Skip to main content
Glama
Vault Cortex Obsidian MCP Server

Vault Cortex Obsidian MCP Server

Search Notes

vault_search
Read-onlyIdempotent

Search vault notes, PDFs, and canvas files by keyword and meaning, then rank results by combined relevance. Apply folder, tag, type, property, and date filters to narrow matches.

Instructions

Hybrid search across vault notes and file content (canvas, PDF, and text files), ranked by combined keyword and semantic relevance. Semantic matching finds notes even when exact keywords differ — "career aspirations" finds notes about "goals" and "targets". Unquoted terms use implicit AND with stemming ("running" also matches "run"); wrap in double quotes for exact phrases; punctuated terms (vault-cortex, deploy/local) are matched as exact adjacent-word phrases.

Filters — all conditions AND-combine with each other and the text query; any filter but folder returns notes only:

  • folder: a whole folder, subfolders included: "Projects" covers "Projects/Archive" but not "ProjectsOld/", ignoring ASCII letter case

  • tags: every listed tag must match, in the tags property or as a #tag in the body, in any letter case; "project" also matches "project/a"

  • type: the type property, matched exactly, letter case included

  • related: every listed link must appear in the related property, written as it is there, brackets and alias included

  • properties: keys and text values match exactly, letter case included; values compare by exact type — pass a number as a number, not "4". Exception: true and false compare as 1 and 0, so true or 1 matches a checked checkbox and the number 1. A list property matches when any element equals the value.

  • created / modified: bounds compare whole calendar days in the server's time zone (returned created and modified values show its UTC offset). A note whose created property is missing or not an ISO date never matches a created filter

Example: vault_search({ query: "how the server watches for file changes" }) 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

When to use: The primary discovery tool for content-based queries, optionally constrained by metadata. 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.

Behavior: Results can lag a file change by a few seconds.

Errors:

  • No matches returns an empty results array with total 0, not an error

  • Malformed query syntax never throws: the words AND, OR, NOT and NEAR in any letter case, and punctuation such as *, ^, parentheses and colons, are dropped before keyword matching; a query left with no terms is matched by meaning only, or finds nothing when only keyword matching ran (search_mode "fts")

  • "invalid created.on date: …" or "… is not a calendar date" (any created/modified bound) — pass a real calendar date in YYYY-MM-DD form

  • "tag must not be empty …" — a tags entry is only "#"; pass the tag name

  • "[SqliteError]: …" / "[IndexIntegrityError]: …" — the index failed, not the call; the message says what to do

Returns: JSON with results array (path, title, snippet, score, tags (the tags property; vault_update_properties edits it), body_tags (#tags in the note's text, one per spelling; vault_replace_in_note edits them; absent when none), folder (a note's top-level folder; a file's full parent folder), type, kind, extension, created, modified, bytes), total (results returned, not all matches), search_mode ("hybrid" when vector embeddings contributed, "fts" when only keyword matching ran), and reranked (true when a second ranking pass reordered the results). A higher score is more relevant. kind is "note" or, for non-markdown content, "file", which also carries extension (e.g. ".pdf"). created is omitted, not null, when a result has none; type is null when the result has no type property; bytes is the on-disk size. With include_leading_callout, each result also carries leading_callout (the opening callout, { type, title, body }) when present.

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": "vault_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results (default 20)
queryYesSearch query text
filtersNoOptional structured filters
snippet_tokensNoSnippet length in words, not model tokens (default 30)
include_leading_calloutNoIf true, include each result's leading callout.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.56.3
    • changedInput schema / properties / filters / properties / created / description
      Previous value: -"Created date bounds (YYYY-MM-DD) on the frontmatter \"created\" property"New value: +"Created date bounds (YYYY-MM-DD) on the \"created\" property"
    • changedInput schema / properties / filters / properties / properties / description
      Previous value: -"Match arbitrary frontmatter properties by key-value (e.g. { status: \"active\", priority: 1 })"New value: +"Match arbitrary properties by key-value (e.g. { status: \"active\", priority: 1 })"
    • changedInput schema / properties / filters / properties / related / description
      Previous value: -"Require all listed related links, each written exactly as in the note's related property, brackets and alias included (e.g. \"[[Projects/alpha|Alpha]]\")"New value: +"Require all listed related links (e.g. \"[[Projects/alpha|Alpha]]\")"
    • changedInput schema / properties / filters / properties / type / description
      Previous value: -"Match the frontmatter type field (exact, case-sensitive match, e.g. \"person\", \"meeting\")"New value: +"Match the type property (e.g. \"person\", \"meeting\")"
  2. Changed1 schema field changedv0.55.1
    • changedInput schema / properties / include_leading_callout / description
      Previous value: -"If true, include each result's leading callout. Off by default to keep results lean."New value: +"If true, include each result's leading callout."
  3. Changed8 schema fields changedv0.54.16
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / filters / additionalProperties
      Added value: +false
    • addedInput schema / properties / filters / properties / created / additionalProperties
      Added value: +false
    • addedInput schema / properties / filters / properties / modified / additionalProperties
      Added value: +false
    • changedInput schema / properties / filters / properties / modified / description
      Previous value: -"Modified date bounds (YYYY-MM-DD) on filesystem modified time, server-local day boundaries"New value: +"Modified date bounds (YYYY-MM-DD) on filesystem modified time"
    • changedInput schema / properties / filters / properties / related / description
      Previous value: -"Require all listed related links"New value: +"Require all listed related links, each written exactly as in the note's related property, brackets and alias included (e.g. \"[[Projects/alpha|Alpha]]\")"
    • changedInput schema / properties / filters / properties / type / description
      Previous value: -"Match the frontmatter type field (exact match, e.g. \"person\", \"meeting\")"New value: +"Match the frontmatter type field (exact, case-sensitive match, e.g. \"person\", \"meeting\")"
    • changedInput schema / properties / snippet_tokens / description
      Previous value: -"Snippet length in words (default 30)"New value: +"Snippet length in words, not model tokens (default 30)"
  4. Changed1 schema field changedv0.54.13
    • changedInput schema / properties / filters / properties / tags / description
      Previous value: -"Require all listed tags (AND — every tag must be present)"New value: +"Tags, \"#\" optional (e.g. [\"reference\"])"
  5. Changed5 schema fields changedv0.54.9
    • changedInput schema / properties / filters / description
      Previous value: -"Optional structured filters — all conditions AND-combine with each other and with the text query"New value: +"Optional structured filters"
    • changedInput schema / properties / filters / properties / created / description
      Previous value: -"Created date bounds (YYYY-MM-DD) on the frontmatter \"created\" property — notes without a parseable value never match"New value: +"Created date bounds (YYYY-MM-DD) on the frontmatter \"created\" property"
    • changedInput schema / properties / include_leading_callout / description
      Previous value: -"If true, each result includes its leading_callout ({ type, title, body }) when present. Off by default to keep results lean."New value: +"If true, include each result's leading callout. Off by default to keep results lean."
    • changedInput schema / properties / query / description
      Previous value: -"Search query text — unquoted terms use implicit AND with stemming; wrap in double quotes for exact phrases"New value: +"Search query text"
    • changedInput schema / properties / snippet_tokens / description
      Previous value: -"Snippet length in tokens (default 30)"New value: +"Snippet length in words (default 30)"
  6. Changed1 schema field changedv0.54.7
    • changedInput schema / properties / filters / properties / folder / description
      Previous value: -"Restrict to a folder path prefix (e.g. \"Projects\")"New value: +"Restrict to a folder (e.g. \"Projects\")"
  7. Changed6 schema fields changedv0.50.0
    • removedInput schema / properties / filters / properties / include_leading_callout
      Removed value: -{
      -  "description": "If true, each result includes its leading_callout ({ type, title, body }) when present. Off by default to keep results lean.",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / filters / properties / limit
      Removed value: -{
      -  "description": "Max results (default 20)",
      -  "type": "number"
      -}
    • removedInput schema / properties / filters / properties / snippet_tokens
      Removed value: -{
      -  "description": "Snippet length in tokens (default 30)",
      -  "type": "number"
      -}
    • addedInput schema / properties / include_leading_callout
      Added value: +{
      +  "default": false,
      +  "description": "If true, each result includes its leading_callout ({ type, title, body }) when present. Off by default to keep results lean.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 20,
      +  "description": "Max results (default 20)",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / snippet_tokens
      Added value: +{
      +  "default": 30,
      +  "description": "Snippet length in tokens (default 30)",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  8. Changed2 schema fields changedv0.27.2
    • addedInput schema / properties / filters / properties / created
      Added value: +{
      +  "description": "Created date bounds (YYYY-MM-DD) on the frontmatter \"created\" property — notes without a parseable value never match",
      +  "properties": {
      +    "after": {
      +      "description": "Exclusive lower bound (YYYY-MM-DD) — strictly later dates",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "before": {
      +      "description": "Exclusive upper bound (YYYY-MM-DD) — strictly earlier dates",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "on": {
      +      "description": "Exact date match (YYYY-MM-DD)",
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / filters / properties / modified
      Added value: +{
      +  "description": "Modified date bounds (YYYY-MM-DD) on filesystem modified time, server-local day boundaries",
      +  "properties": {
      +    "after": {
      +      "description": "Exclusive lower bound (YYYY-MM-DD) — strictly later dates",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "before": {
      +      "description": "Exclusive upper bound (YYYY-MM-DD) — strictly earlier dates",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "on": {
      +      "description": "Exact date match (YYYY-MM-DD)",
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  9. Changed7 schema fields changedv0.22.1
    • addedInput schema / properties / filters / properties / folder / minLength
      Added value: +1
    • changedInput schema / properties / filters / properties / properties / additionalProperties / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  }
      -]New value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  }
      +]
    • addedInput schema / properties / filters / properties / properties / propertyNames / minLength
      Added value: +1
    • addedInput schema / properties / filters / properties / related / items / minLength
      Added value: +1
    • addedInput schema / properties / filters / properties / tags / items / minLength
      Added value: +1
    • addedInput schema / properties / filters / properties / type / minLength
      Added value: +1
    • addedInput schema / properties / query / minLength
      Added value: +1
  10. Changed7 schema fields changedv0.19.2
    • changedInput schema / properties / filters / description
      Previous value: -"Optional search filters"New value: +"Optional structured filters — all conditions AND-combine with each other and with the text query"
    • changedInput schema / properties / filters / properties / folder / description
      Previous value: -"Restrict to folder"New value: +"Restrict to a folder path prefix (e.g. \"Projects\")"
    • addedInput schema / properties / filters / properties / include_leading_callout
      Added value: +{
      +  "description": "If true, each result includes its leading_callout ({ type, title, body }) when present. Off by default to keep results lean.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / filters / properties / properties / description
      Previous value: -"Arbitrary property key-value filters"New value: +"Match arbitrary frontmatter properties by key-value (e.g. { status: \"active\", priority: 1 })"
    • changedInput schema / properties / filters / properties / tags / description
      Previous value: -"Require all listed tags"New value: +"Require all listed tags (AND — every tag must be present)"
    • changedInput schema / properties / filters / properties / type / description
      Previous value: -"Frontmatter type field value"New value: +"Match the frontmatter type field (exact match, e.g. \"person\", \"meeting\")"
    • changedInput schema / properties / query / description
      Previous value: -"Search query text"New value: +"Search query text — unquoted terms use implicit AND with stemming; wrap in double quotes for exact phrases"
  11. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description still adds substantial context beyond them: indexing lag of a few seconds, empty results as non-errors, silent dropping of malformed query syntax, and specific error strings with corrective actions. It does not describe pagination or performance limits, which keeps it just short of a 5.

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?

Despite its length, the definition is front-loaded with purpose, then grouped into labeled sections (Filters, Examples, When to use, Behavior, Errors, Returns) so an agent can scan to the relevant part. Four worked examples make the filter syntax concrete. The Returns section is dense but justified because no output schema exists.

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?

For a five-parameter tool with a nested filters object and no output schema, the description covers everything needed: filter semantics, date-bound calendar-day behavior, query grammar, error recovery, and a full field-by-field account of the return payload including search_mode and reranked. Nothing material is missing.

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?

Schema coverage is 100%, yet the description still adds meaning the schema cannot express: filters AND-combine with the query, folder matching includes subfolders and ignores ASCII case, tags match in tags property or body and prefix-match, type is case-sensitive while tags are not, related links must appear verbatim including brackets and alias, and property values compare by exact type with true/false coerced to 1/0. Query grammar (implicit AND, stemming, quoted phrases, punctuated-term handling) is also documented.

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 opening sentence names a specific operation (hybrid search), the resource (vault notes and file content including canvas/PDF/text), and the ranking model (combined keyword and semantic relevance). It is immediately distinguishable from siblings such as vault_search_by_tag or vault_recent_notes, which are named later.

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?

A dedicated 'When to use' section states this is the primary content-discovery tool and then names four alternatives with the exact condition that selects each (tag-only, browsing, metadata-only, time-based). No inference is required from the agent.

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