Skip to main content
Glama

Link Documents

vault_link_doc
Idempotent

Link two documents in any vault with a bidirectional, labeled connection. Reports if the link already exists. Use to establish relationships like 'related' or 'supersedes'.

Instructions

Create a link between two documents across any vault.

Links are bidirectional and labelled (e.g. 'related', 'references', 'supersedes', 'part-of'). If the link already exists, reports it. Use vault_find_related to discover all docs linked to a given document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNorelated
source_docYes
target_docYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare idempotentHint and non-destructive, but the description adds important behavioral details: links are bidirectional, labelled with examples, and existing links are reported rather than duplicated. This goes beyond the structured annotations and clarifies side effects.

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?

The description is concise and well-structured: the first sentence states the core action, followed by supporting details about bidirectionality and labels, a note on existing links, and a pointer to a related tool. No filler or redundancy.

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?

With an output schema present, return values need not be described. The description covers the core functionality, edge case of existing links, and cross-vault scope, plus points to discovery via vault_find_related. It is sufficient for an agent to select and invoke the tool correctly, though a bit more detail on parameter formats would improve completeness.

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?

The schema has 0% description coverage, but the description explains the purpose of source_doc and target_doc as 'two documents' and gives example labels for the label parameter. However, it doesn't specify value formats or whether the label is restricted, leaving some ambiguity. The description only partially compensates for the sparse 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?

The description opens with 'Create a link between two documents across any vault,' which explicitly states the action and scope. It distinguishes itself from sibling tools like vault_unlink_doc (opposite) and vault_find_related (discovery) by noting the specific operation and pointing to the alternative.

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 provides explicit guidance to use vault_find_related for discovering links, which helps the agent choose the right tool. It clearly implies this tool is for creating links and handles existing links gracefully, but does not explicitly mention when not to use it or contrast with vault_unlink_doc for removal.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/labyrinth-analytics/loredocs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server