Skip to main content
Glama
maxkuminov

Obsidian MCP (pgvector + Ollama, self-hosted)

by maxkuminov

semantic_search

Find notes by meaning, not exact words. Uses vector embeddings to match conceptual or paraphrased queries, returning deduped notes with previews and staleness indicators.

Instructions

Vector similarity search over the vault's chunk embeddings. Use this for conceptual or paraphrased queries — anywhere exact word matching would miss the point.

For exact identifiers, code symbols, proper nouns, or known phrases, use keyword_search instead.

Each result is one note (deduped) with its best-matching chunk as a ~200-character preview. Call read_note on a result's path to get the full note content.

The header line carries a stale count and a truncated count, always — including when both are zero, so "nothing here is degraded" is distinguishable from a build that does not report it.

stale: true on a row means the note changed after it was embedded: it was matched and ranked against its previous content, and its preview is withheld rather than shown, because that excerpt is text the note no longer has. Its path, title and tags are current — the indexer refreshed them, which is how the staleness is known at all — so read_note on that path returns the true content and is the remedy. Stale notes are never filtered out: during an embedding outage that would empty the result set rather than degrade it.

embedding_truncated: true means the note is longer than the indexer's per-note chunk cap and only its head was embedded. A match against such a note is a match against its head; its tail is not reachable by semantic search at all, though keyword_search still covers the whole note.

The bound on the staleness signal, stated so it is not over-read: it reports what the index has committed. An edit that the indexer has not yet scanned is not marked, so a note edited in the last few minutes may come back unmarked with a superseded preview. The guarantee is "no result presents text the index knows to be superseded", not "no result is ever out of date".

Args: query: Natural language description of what you're looking for. limit: Maximum number of distinct notes to return (default 15). folder: Optional folder prefix (e.g. "Projects/"). tags: Optional list of tag names; only notes carrying ALL listed tags match (e.g. ["product"]). frontmatter: Optional dict of frontmatter key/value pairs; strict type matching — string "0" does not match integer 0 (e.g. {"status": "active"}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNo
limitNo
queryYes
folderNo
frontmatterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.2
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and excels. It details result deduplication, preview character length, stale and truncated indicators, and even the guarantee about staleness, explaining edge cases like edits not yet scanned. It also explains that stale notes are never filtered out, and how to retrieve full content via read_note. This depth is exceptional.

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 lengthy but well-structured, with clear sections and bolded headings for emphasis. It front-loads the core purpose and usage guidance, then goes into detailed behavioral nuances. While every paragraph adds value, the length might be overwhelming, but the use of bold and numbered details aids readability, earning a slightly high score.

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 complexity (semantic search with deduplication, staleness, truncation), the description is comprehensive. It explains behavioral edge cases, return format, and result limits. The output schema exists, so return values need no further explanation. Sibling tools are addressed, and parameter semantics fully covered, making this complete for successful invocation.

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?

The schema description coverage is 0%, and the description compensates fully. It explains the nature of the query parameter ('Natural language description'), provides example values for folder, tags, and frontmatter, and clarifies frontmatter's strict type matching (string '0' vs integer 0). This goes beyond the schema, which only provides titles and defaults.

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 it performs vector similarity search over chunk embeddings, targeting conceptual or paraphrased queries. It distinguishes itself from keyword_search explicitly, making the tool's purpose unambiguous. The verb 'search' and resource 'vault's chunk embeddings' are specific, and the distinction from siblings is clear.

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?

It provides explicit guidance on when to use this tool: for conceptual or paraphrased queries where exact matching fails, and when not to use it: for exact identifiers, code symbols, proper nouns, or known phrases, directing to keyword_search instead. This clear routing to alternatives is ideal.

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