Skip to main content
Glama

Link two entities

memory_link
Idempotent

Record durable subject–predicate→object relationships to query structured facts later, with optional source memory and validity window for time-bounded facts.

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

NameRequiredDescriptionDefault
objectYes
src_idNo
subjectYes
valid_toNo
namespaceNo
predicateYes
valid_fromNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false. The description adds 'durable' and 'time-bounded facts' but does not explain error handling, permissions, or conflict resolution beyond the idempotency hint. Adequate but not rich beyond annotations.

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, followed by examples, optional parameters, and alternatives. Every sentence serves a purpose, though the description is dense and could be slightly tighter.

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?

Output schema exists, so return values need not be explained. The description covers purpose, alternatives, and most parameters, but the missing namespace parameter leaves a gap for a 7-parameter write tool with no schema descriptions.

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 0%, so the description must compensate. It explains subject, predicate, object via arrow notation and examples, and clarifies src_id (source memory) and valid_from/valid_to (unix timestamps for time-bounded facts). However, it omits the namespace parameter entirely, leaving one of seven undocumented.

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 ('Record') and resource ('relationship') with the exact subject-predicate-object format and concrete examples. Explicitly distinguishes from siblings by naming memory_store (prose) and memory_relations (query).

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?

Provides explicit when-to-use guidance ('when a structured fact is worth querying later') and clear alternatives: 'Use alongside memory_store (prose), not instead of it' and 'Query these edges with memory_relations.' Nothing is left to inference.

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