Skip to main content
Glama

Get Relationships

get_relationships
Read-only

Retrieve linked memories and relationship types for a memory, filter by direction. Explore knowledge graph connections.

Instructions

Get all relationships for a memory. Returns linked memories with relationship types.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesSHA-256 hash of the memory to get relationships for
directionNoDirection: outgoing (from this memory), incoming (to this memory), both (default)

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
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds the behavior that it returns all linked memories with relationship types, and the phrase 'all' signals exhaustive retrieval. No contradiction with annotations.

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 short sentences, front-loaded with the operation, and no filler. The second sentence adds return semantics rather than repeating the title.

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 read-only tool with a rich output schema and fully documented parameters, the description covers the core concept. It could add a note about relationship traversal use cases, but nothing essential is missing.

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 description coverage is 100%: the schema already explains the 'hash' target and the 'direction' enum/default. The description adds no parameter-level meaning beyond naming the target memory, so the baseline 3 is appropriate.

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 uses a specific verb and resource ('Get all relationships for a memory') and clarifies what the call returns ('linked memories with relationship types'). This clearly separates it from get_memory (single memory) and create_relationship/delete_relationship (mutations).

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 intended use is implied: call this when you need the relationships of a specific memory. However, it gives no explicit when-not-to-use guidance or mention of alternatives such as search_memories or recall, so the agent must infer selection criteria from sibling names.

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