Skip to main content
Glama
Obsidian MCP (pgvector + Ollama, self-hosted)

Obsidian MCP (pgvector + Ollama, self-hosted)

by maxkuminov

Link neighborhood

get_neighborhood
Read-onlyIdempotent

Retrieve the local graph of notes connected to a seed note by links or backlinks, up to a chosen depth and note limit, so agents can summarize or analyze a topic cluster.

Instructions

The connected subgraph reachable from path via links or backlinks, up to depth hops (treated as undirected).

Use this when an agent needs the local cluster around a topic — e.g. "summarize everything connected to this project". Prefer this over find_related when explicit links are the signal you want; prefer find_related when the connection is conceptual rather than linked.

Args: path: Vault-relative path to the seed note. depth: Maximum BFS depth (default 1, capped at 5). limit: Maximum distinct neighbor notes (default 50, hard cap 200).

Input Schema

NameRequiredDescriptionDefault
pathYes
depthNo
limitNo

Output 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.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the safety profile is covered. The description adds real behavioral facts beyond that: traversal is undirected, depth is capped at 5, and the neighbor limit is a hard cap of 200. It stops short of saying whether the seed note is included in results or what happens for a missing path.

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?

Front-loaded with the core behavior, then the selection rule, then compact argument notes. No redundant restatement of the tool name or title; every clause carries information.

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?

An output schema exists, so return shape need not be explained. With traversal model, caps, defaults, and the sibling routing rule all present, an agent has everything needed to call this correctly against a 3-parameter read tool.

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 description coverage is 0%, so the description carries the full burden and does: `path` is vault-relative, `depth` is BFS depth with default 1 and cap 5, `limit` counts distinct neighbor notes with default 50 and hard cap 200. The caps and the 'distinct neighbor notes' definition are meaning the schema does not provide.

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?

States a specific verb+resource: the connected subgraph reachable from a seed path via links/backlinks up to N hops. It also fixes the traversal model ('treated as undirected'), which an agent cannot infer from the name, and explicitly separates it from the `find_related` sibling.

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?

Gives a concrete use case ('summarize everything connected to this project') plus an explicit routing rule: prefer this when explicit links are the signal, prefer `find_related` when the connection is conceptual. Both the when and the when-not are present with a named alternative.

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