Skip to main content
Glama

create_relation

Connect two memory items with a typed relationship to record how they influence or relate, using strength and metadata to clarify context.

Instructions

Link two memories with typed relationship.

Args: from_memory_id: Source memory UUID. to_memory_id: Target memory UUID. relation_type: Type (related, causes, supports, contradicts, has_decision, consolidated_from). strength: Relation strength (0.0-1.0). metadata: Optional metadata dict.

Returns: Dict with relation_id, from, to, type, strength.

Raises: ValueError: Invalid UUID or relation type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metadataNo
strengthNo
to_memory_idYes
relation_typeYes
from_memory_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by indicating the action ('Link'), documenting the return value (a dict with relation_id, from, to, type, strength), and specifying a ValueError for invalid UUID or relation type. It could go further by mentioning persistence, side effects, or whether existing relations are overwritten, so it is strong but not exhaustive.

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 compact, front-loaded with the core purpose, and uses a clear Args/Returns/Raises structure. Every section earns its place: parameters, expected output, and error behavior. There is no redundant or filler content.

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 five-parameter creation tool with no annotations and zero schema coverage, the description is largely complete: it documents inputs, allowed values, output shape, and failure modes. It does not provide guidance on when to choose this tool over siblings or clarify constraints like whether the two memories must already exist, but those are minor gaps for such a focused operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 entirely, and it does. Every parameter is meaningfully explained: from/to as source/target UUIDs, relation_type with an explicit allowed-value list, strength with a 0.0-1.0 range, and metadata as an optional dict. This adds substantial value 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 opens with a specific verb and resource: 'Link two memories with typed relationship.' It clearly conveys that this tool creates a relation between two memory entities, which is distinct in function from the sibling memory-management tools. However, it does not explicitly name or differentiate itself from any sibling, so it falls just short of 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 Guidelines3/5

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

The usage context is implied: use this tool when you need to create a typed link between two memories. It does not explicitly state when not to use it or name alternatives among the sibling tools, such as consolidate_memories or save_memory, so guidance on tool selection is only implicit.

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