Skip to main content
Glama

create_relation

Creates an explicit typed relation between two memories, defining the connection type and strength to structure memory associations.

Instructions

Create an explicit relation between two memories.

Links two memories with a typed relationship.

Args: from_memory_id: Source memory ID (valid UUID). to_memory_id: Target memory ID (valid UUID). relation_type: Type of relation (must be one of: related, causes, supports, contradicts, has_decision, consolidated_from). strength: Strength of the relation (0.0-1.0). metadata: Additional metadata about the relation.

Returns: Created relation ID and confirmation.

Raises: ValueError: If any input fails validation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metadataNo
strengthNo
to_memory_idYes
relation_typeYes
from_memory_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

The description discloses the return value ('Created relation ID and confirmation') and error behavior (ValueError on invalid input), which adds transparency beyond the mere schema. However, it does not mention side effects such as whether existing relations are updated or if the operation is reversible, leaving behavioral gaps for a mutation tool.

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?

The description is structured with Args, Returns, Raises, making it scannable. The opening sentence and the second sentence are nearly redundant ('Create an explicit relation' vs. 'Links two memories'), but the overall length is appropriate and information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has five parameters and no annotations, so the description must carry the load. It covers parameter constraints and errors, but glosses over the meaning of each relation_type and the implications of creating a relation (e.g., whether the memory graph is modified in place). This leaves some contextual gaps for agent decision-making.

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?

With zero schema description coverage, the description compensates well by detailing each parameter: from_memory_id and to_memory_id are 'valid UUID', relation_type lists all allowed values, strength is a range (0.0-1.0), and metadata is 'additional metadata'. It does not specify the metadata structure or strength default, but the schema already covers the default.

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 clearly states the tool's function: 'Create an explicit relation between two memories.' This is a specific verb ('create') and resource ('relation between two memories'), distinguishing it from sibling tools like read_graph or search_memory.

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?

The description conveys when to use the tool: when the agent needs to link two memories with a typed relationship. It does not explicitly mention alternatives or exclusions, but the purpose is unambiguous enough to infer appropriate usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fastmcp-me/mnemex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server