Skip to main content
Glama

Link two entities

memory_link

Store structured facts as subject-predicate-object triples for later retrieval. Optionally attach source memory and validity window for time-bounded relationships.

Instructions

Record a durable relationship as subject -predicate→ object (e.g. who owns what, which file is canonical, who reports to whom, which key belongs to which service) when a structured fact is worth querying later. Optionally attach the memory it came from (src_id) and a validity window (valid_from/valid_to, unix timestamps) for time-bounded facts. Query these edges with memory_relations. Use alongside memory_store (prose), not instead of it. Idempotent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectYes
src_idNo
subjectYes
valid_toNo
namespaceNo
predicateYes
valid_fromNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only indicate the tool is not read-only and not destructive, so the description adds meaningful context by stating the write is idempotent and durable, and supports optional provenance and validity windows. It does not cover edge cases like duplicate conflicts or invalid src_id, but the most important behavioral trait for an agent is disclosed.

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?

Every sentence earns its place: core action, examples, optional parameters, query routing, relationship to memory_store, and idempotency. There is no filler, and the most important information is front-loaded.

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 7-parameter tool with no schema descriptions, the description covers the main semantics, usage context, and idempotency safety trait. Since an output schema exists, omitting return-value details is acceptable. The only notable omission is namespace, but overall the agent can select and invoke this tool confidently.

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 carries the explanatory burden. It explains the required triple (subject, predicate, object) with examples, and clarifies src_id, valid_from, and valid_to. The only parameter left unexplained is namespace, which is a small gap given the schema provides no help.

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 a clear verb and resource: 'Record a durable relationship as subject -predicate→ object', and gives concrete examples that make the tool's purpose unmistakable. It also distinguishes memory_link from memory_store and memory_relations, so an agent can tell it apart from siblings without inspecting schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use the tool ('when a structured fact is worth querying later'), names the corresponding query tool (memory_relations), and warns that memory_link should be used alongside memory_store rather than instead of it. This is actionable routing guidance.

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