Skip to main content
Glama
obsidian-pkm

obsidian-pkm

by AdrianV101

vault_add_links

Add annotated wikilinks to a note section (default: Related), skipping existing links and creating the section when missing.

Instructions

Add annotated wikilinks to a note's section (default: ## Related). Skips targets the note already links to (links are resolved like Obsidian: path, path suffix, then basename). Creates the section if missing. Requires exact path. 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>",
      "links": "<links>"
    },
    "name": "vault_add_links"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesExact path to the note (vault-relative, e.g., '01-Projects/MyApp/research/caching.md')
linksYesLinks to add
sectionNoTarget section heading (default: '## Related')
create_sectionNoCreate section if missing (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses deduplication behavior, Obsidian-style link resolution order (path, path suffix, basename), automatic section creation, and the markdown-link output format. It omits failure behavior for missing notes and whether the operation is idempotent beyond the skip rule.

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?

Behavior is front-loaded in the first three sentences, and the output-format guidance follows logically. The final sentence about relaying paths is long but earns its place by preventing a downstream path-format error.

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 mutation tool with no annotations and no output schema, the description covers what changes, dedup rules, resolution fallback, and the shape of returned paths. Remaining gaps are error/permission behavior and confirmation of what the return value contains besides formatted paths.

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 coverage is 100%, so parameter documentation is already complete; the description adds only modest meaning beyond it — the '## Related' default for section and the fact that create_section behavior means a missing heading is created. The links/target/annotation semantics are left entirely to the schema.

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 and resource — 'Add annotated wikilinks to a note's section' — plus the default target section, which distinguishes it immediately from link-reading tools like vault_links or generic writers like vault_edit/vault_append.

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?

Gives clear operational context (exact path required, existing links skipped, section created if missing) and explicit cross-tool guidance on passing bracket text rather than full markdown links to other vault tools. It stops short of naming when-not-to-use this tool or pointing to an alternative for bulk or cross-note linking.

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