Skip to main content
Glama

get_neighbors

Lists the titles of notes within a set number of wikilink hops from one note, following links in both directions, so you can see what surrounds it without loading the whole vault.

Instructions

What is around ONE note in the [[wikilink]] graph, out to depth hops: a flat list of titles, no node indices to decode and no whole-vault payload. For the shape of that neighbourhood — which of them link to each other — use get_graph with root_title instead.

Traversal is undirected: a note linking HERE counts as much as one linked FROM here. links_out/links_in describe the direct relation and appear only at depth 1 — two hops out, "which way does the arrow point" has no answer. Each note appears once, at the shortest depth that reaches it.

These are links people wrote, not similarity: a note on the same subject that nobody linked is not here, and an empty result is a fact about the writing rather than about the topic. Rows carry the title, which is what get_note, get_backlinks and this tool all take.

Input Schema

NameRequiredDescriptionDefault
idNoUUID of the note whose surroundings you want
depthNoHops to walk. 1 = directly linked notes; each extra hop widens the set fast
limitNoMaximum neighbours to return, nearest depth first. `total` still counts them all
titleNoAlternative to id; resolved like get_note (exact, then prefix, then substring)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.3.1
    • addedInput schema / anyOf
      Added value: +[
      +  {
      +    "required": [
      +      "id"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "title"
      +    ]
      +  }
      +]
    • addedInput schema / properties / id / description
      Added value: +"UUID of the note whose surroundings you want"
    • removedInput schema / properties / id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 100,
      +  "description": "Maximum neighbours to return, nearest depth first. `total` still counts them all",
      +  "maximum": 500,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / title / description
      Added value: +"Alternative to id; resolved like get_note (exact, then prefix, then substring)"
  2. First observedv1.3.0

TDQS

A4.6/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it discloses undirected traversal, deduplication at shortest depth, that links_out/links_in appear only at depth 1, that results are links people wrote rather than similarity, and that an empty result reflects the writing, not the topic. These are behavioral facts an agent cannot get from the schema.

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?

Front-loaded with the one-line answer, then progressive detail in short paragraphs, and the sibling routing appears in the first sentence where it is most useful. It runs slightly long, with the closing paragraph's remark about the title convention being borderline expendable, but no sentence is filler.

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 and no annotations, the description supplies exactly what's missing: return shape (flat list of titles), row content (title, usable by the other title-taking tools), dedup rule, and the meaning of an empty result. Nothing an agent needs to call this correctly is absent.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond it: `depth` is characterized as undirected hops where direction becomes meaningless past depth 1, and `title` is framed as the shared identifier convention used by get_note, get_backlinks and here. It does not discuss `limit`/`total` interaction, which the schema already covers.

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?

Opens with a concrete verb+resource+scope: what is around ONE note in the [[wikilink]] graph, out to `depth` hops, returned as a flat title list. It also states what the tool is not ('no node indices to decode and no whole-vault payload') and names the sibling get_graph as the different capability. An agent can distinguish it from get_graph, get_backlinks and search_notes without opening a schema.

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?

Explicitly routes the neighbour-shape case to get_graph with root_title, which is a real when-to-use/alternative rule. It also implies the depth-1 incoming-link case via the links_in remark, but never names get_backlinks as the cheaper alternative for pure backlink lookups, leaving one sibling comparison to inference.

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