Skip to main content
Glama

Create Relationship

create_relationship
Idempotent

Connect two related memories by adding a typed relationship, creating a knowledge graph edge that enables structured navigation and retrieval.

Instructions

Link two memories with a typed relationship. Creates a knowledge graph edge between memories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_hashYesSHA-256 hash of the target memory
from_hashYesSHA-256 hash of the source memory
relation_typeYesType of relationship (e.g., "related_to", "causes", "depends_on", "part_of", "follows")

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNo
resultNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A4/5.0
Behavior3/5

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

The idempotentHint annotation already tells the agent the operation can be repeated safely. The description adds that an edge is created and is typed, but it does not disclose side effects (e.g., whether existing edges are overwritten, whether relationship counts affect memory_stats, or authorization requirements). With the contradiction-free annotation, a 3 is fair.

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?

Two sentences with no filler. The core action ('Link two memories with a typed relationship') is front-loaded, and the second sentence adds clarifying graph vocabulary. Every word earns its place.

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 simple 3-parameter creation tool with a full output schema, idempotentHint, and 100% schema coverage, the description is complete enough. The only gap is usage guidance about whether the relation should be created symmetrically or whether duplicate relations are permitted, but the schema and annotation already cover most operational needs.

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?

Parameter help is 100% covered by the input schema, so the baseline is 3. The description slightly adds value by framing the parameters as endpoints of a directed edge ('Link two memories'), which clarifies the from/to directionality. It also notes the relation_type is 'typed', reinforcing the schema's examples. No further detail needed.

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?

Description states a specific verb ('Link') and resource ('two memories', 'knowledge graph edge'), and is distinct from siblings like get_relationships or delete_relationship. The 'typed relationship' phrasing clarifies that the edge is categorized, not a generic link.

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 usage context — creating edges in a knowledge graph between existing memories — but does not explicitly state when to prefer this over store_memory, update_memory, or get_relationships, nor does it mention prerequisites such as both memories existing or hashes being retrievable. It gives some context but no exclusions or alternatives.

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