Skip to main content
Glama

create_relation

Create explicit, typed relations between two memories, defining how they connect with a specified relation type, strength, and optional metadata.

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?

With no annotations provided, the description must carry the transparency burden. It discloses that invalid inputs raise ValueError and describes the return value, which is helpful. However, it does not mention whether memories must already exist, whether the relation is directed, or any side effects like duplicate handling, leaving important behavioral traits undisclosed.

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 well-structured with Args, Returns, and Raises sections. The first two sentences are somewhat redundant ('Create an explicit relation' and 'Links two memories with a typed relationship'), but the rest is efficient and clearly formatted, earning a high but not perfect score.

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 relatively simple create-relation tool, the description is fairly complete: it covers all five parameters, allowed relation types, validation behavior, and what is returned. However, it omits preconditions like whether the referenced memories must exist, and lacks any statement about permissions or idempotency, which would fully round out the context.

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 fully compensates by explaining each parameter: source/target IDs as valid UUIDs, allowed relation_type values (related, causes, supports, contradicts, has_decision, consolidated_from), strength range 0.0-1.0, and metadata as additional relation info. This adds significant meaning beyond the bare schema.

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 explicitly states 'Create an explicit relation between two memories' and 'Links two memories with a typed relationship,' using a specific verb and resource. It clearly differentiates from sibling tools like save_memory or consolidate_memories by focusing on relation creation.

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 description implies when to use the tool (creating relations) but does not explicitly mention alternatives or exclusion criteria. It provides no guidance on when to choose this over other memory-related tools, leaving usage context implicit.

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/cortexgraph'

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