Skip to main content
Glama

link_memory

Links two memories with typed relationships such as related, supersedes, depends_on, part_of, or contradicts; duplicate edges remain idempotent, and only same-scope, non-self links are allowed.

Instructions

建立两条记忆的关联(related/supersedes/depends_on/part_of/contradicts); 重复建边幂等(created=false)。仅同作用域的 memory 记录可关联,禁止自关联; 失败返回 {"error": , "message": 原因}(NOT_FOUND/SELF_LINK/...)。 project:项目子库(空=全局库);client:仅审计。 English: Link two memories (related/supersedes/depends_on/part_of/contradicts); duplicate edges are idempotent (created=false). Only memory records in the same scope can be linked, and self-links are rejected; failures return {"error": , "message": reason}.

Input Schema

NameRequiredDescriptionDefault
to_idYes
clientNo
from_idYes
projectNo
relationNorelated

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.2/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 idempotency semantics (`created=false`), the scope-consistency restriction, self-link rejection, and the failure envelope `{"error": <CODE>, "message": reason}` with sample codes. It omits permission/auth requirements and the full success payload beyond the `created` flag.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Each half is tight and front-loaded with the core action before the constraints, but the entire body is duplicated verbatim in Chinese and English, roughly doubling length without adding information. Efficient content, wasteful packaging.

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 no annotations and no output schema, the description covers the mutation's semantics, constraints, idempotency and error shape — enough to invoke correctly. Only the precise success return value and any authorization preconditions are unstated.

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 does for the non-obvious parameters: the five valid `relation` values, `project` (empty = global library) and `client` (audit only). `from_id`/`to_id` are left undefined but are self-evident from the purpose statement.

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 names a specific verb and resource ("Link two memories") and enumerates the exact relation vocabulary (related/supersedes/depends_on/part_of/contradicts), which also implicitly distinguishes it from the sibling `unlink_memory`. An agent knows precisely what this tool creates without opening the 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?

It gives concrete preconditions: both records must be in the same scope, self-links are rejected, and duplicate edges are idempotent. It does not explicitly route the agent to `unlink_memory`/`list_links` for the inverse or inspection cases, which keeps it short of a 5.

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