Skip to main content
Glama

add_link

Adds a one-way wiki link from a source note to an existing target note in its related-notes section, preventing broken links and duplicate entries.

Instructions

소스 노트에 [[target_id]] 링크 추가 — '## 관련 노트' 섹션에 단방향 링크.

안전장치: - 대상 노트(target_id)가 없으면 거부 (broken link 사전 방지) - 이미 링크 존재 시 변경 없음 (idempotent) - 수정 전 자동 백업 - 양방향 링크 원할 시 add_link를 양쪽으로 두 번 호출 필요

Args: id: 소스 노트 ID (링크를 추가할 노트) target_id: 대상 노트 ID (링크 대상 — 존재해야 함) display: 링크 표시 텍스트. 빈 값 시 대상 노트의 title 사용. dry_run: True 시 미리보기만 반환. 기본 False.

Returns: JSON — status (ok/error/preview), link_added, section_created, backup

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": {
      "id": "<id>",
      "target_id": "<target_id>"
    },
    "name": "add_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
displayNo
dry_runNo
target_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.1/5.0
Behavior4/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 does well: it discloses rejection of nonexistent targets, idempotency, an automatic backup before modification, and a dry_run preview mode. Missing only authorization or concurrency context, which is minor for a local wiki.

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 core action, then a structured safety list and Args/Returns blocks, so it is easy to scan. Slight redundancy: the target-existence rule is stated both in the safety list and again in the Args section.

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?

For a four-parameter mutation tool with no annotations, the description covers preconditions, side effects (backup), idempotency, and output shape. An output schema exists, so the brief Returns note is a bonus rather than a necessity.

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 description coverage is 0%, so the description must compensate, and it documents all four parameters: id, target_id (which must exist), display (falls back to the target's title when empty), and dry_run (preview, default False). This adds genuine meaning beyond the bare schema titles.

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 gives a specific verb and resource (add a [[target_id]] link to a source note) and even specifies where the link lands ('## 관련 노트' section). It does not explicitly contrast with sibling tools such as update_note, which would have earned a 5.

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 clearly states the key precondition (target note must exist, otherwise the call is rejected) and notes the idempotent no-op behavior. It also tells the agent that bidirectional linking requires two separate calls, which is real usage guidance, but no alternative tool is ever named.

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