Skip to main content
Glama
obsidian-pkm

obsidian-pkm

by AdrianV101

vault_neighborhood

Explore the graph neighborhood around an Obsidian note by following wikilinks, returning related notes grouped by hop distance to reveal clusters, context, and connections.

Instructions

Explore the graph neighborhood around a note by traversing wikilinks. Returns notes grouped by hop distance from the starting note, with frontmatter metadata for each node. Useful for understanding clusters, finding related context, and discovering connections. Paths in this tool's output are formatted as markdown links [vault-relative-path.md](obsidian://...) so users can Cmd/Ctrl-click to open in Obsidian. Preserve the link form when relaying paths to the user; pass only the bracket text (e.g. 01-Projects/Foo/note.md) to other vault tools' path arguments, never the full markdown link.

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": {
      "path": "<path>"
    },
    "name": "vault_neighborhood"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the starting note (supports short names, e.g. 'devlog')
depthNoTraversal depth — how many hops to follow (default: 2, max: 5)
directionNoLink direction to follow (default: both)both
max_nodesNoMax graph nodes to list, closest first (default: 50). The rest are reported as '+N not shown'.
semantic_limitNoMax semantic results to include (default: 5)
include_semanticNoAppend semantically related but unlinked notes (requires VAULT_PKM_OPENAI_KEY, default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.0.2
    • addedInput schema / properties / max_nodes
      Added value: +{
      +  "default": 50,
      +  "description": "Max graph nodes to list, closest first (default: 50). The rest are reported as '+N not shown'.",
      +  "type": "number"
      +}
  2. First observedv3.10.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does disclose real behavior: output is grouped by hop distance, includes frontmatter per node, and paths come back as Obsidian markdown links with an explicit instruction to strip them before passing to other tools' `path` arguments. That path-format quirk is genuinely valuable, but read-only safety, error behavior for a missing/ambiguous path, and truncation behavior are left unstated (truncation only appears in the schema's max_nodes description).

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?

Four sentences, front-loaded with purpose and return shape before the operational link-formatting rule. The final sentence is long but every clause is actionable (preserve link form, pass only bracket text), so little is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter graph traversal with no output schema and no annotations, the description does the important work: it explains the return structure (grouped by hop distance, frontmatter included) and the non-obvious path formatting. What's missing is safety/read-only framing and guidance on depth/semantic cost tradeoffs, which an agent might need before setting depth=5 with include_semantic=true.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema already documents path, depth, direction, max_nodes, semantic_limit, and include_semantic in detail. The description adds no parameter-level meaning beyond what the schema states, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: "Explore the graph neighborhood around a note by traversing wikilinks," then states what is returned (notes grouped by hop distance with frontmatter). It is clearly distinguishable from lookup-style siblings like vault_read or vault_links, but it never names an alternative tool, so the differentiation is inferential rather than explicit.

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

Usage Guidelines4/5

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

It gives concrete use cases — "understanding clusters, finding related context, and discovering connections" — which tells an agent when this tool is the right choice. It stops short of exclusions, e.g. it doesn't say to prefer vault_links for a single hop or vault_search for text matches, so no 5.

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