Skip to main content
Glama

memory_relate_tool

Link two memories with a typed relation such as supersedes, contradicts, or depends_on to track knowledge dependencies and update the target's status when applicable.

Instructions

Create a typed relation between two memories.

Args: from_id: Source memory ID to_id: Target memory ID kind: supersedes, contradicts, invalidates, derived_from, verified_by, refines, depends_on, touches (supersedes/invalidates update the target status) valid_from: Optional ISO start of the relation validity window. valid_to: Optional ISO end of the relation validity window. source_episode: Optional session or episode id that recorded the edge. project: Optional project root path.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "from_id": "<from_id>",
      "to_id": "<to_id>",
      "kind": "<kind>"
    },
    "name": "memory_relate_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYes
actorNo
to_idYes
from_idYes
projectNo
sessionNo
valid_toNo
request_idNo
valid_fromNo
operation_idNo
source_episodeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.11.0
    • addedInput schema / properties / source_episode
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Source Episode"
      +}
    • addedInput schema / properties / valid_from
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Valid From"
      +}
    • addedInput schema / properties / valid_to
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Valid To"
      +}
  2. Addedv0.6.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does disclose one important trait: supersedes/invalidates update the target memory's status, so the agent knows this is not a purely additive write. It says nothing about idempotency or duplicate edges, what happens if an ID does not exist, error behavior, or what the optional request_id/operation_id fields do mechanically.

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 purpose is front-loaded in one sentence and the argument list follows in a scannable order with required params first. The bullet-style breakdown is justified given zero schema descriptions, though a few entries (from_id, to_id) restate the obvious and the kind value list would read better inline in the first sentence.

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?

An output schema exists, so return values need not be described, and the side-effect of status-mutating kinds is covered. For an 11-parameter mutation tool with no annotations, though, four undocumented parameters plus silence on duplicate-edge behavior and existence preconditions leave real gaps an agent would hit in practice.

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?

Schema coverage is 0%, so the description must compensate, and it largely does: it defines from_id/to_id/kind, enumerates all eight valid kind values (not present as a schema enum), explains that valid_from/valid_to are ISO strings bounding a validity window, and clarifies source_episode and project. The gap is that actor, session, request_id, and operation_id are entirely undocumented anywhere.

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 opening line gives a specific verb and resource ("Create a typed relation between two memories") plus the notion of an edge type, which is precise enough to call the tool from. It does not, however, distinguish this write tool from the sibling that reads relations (memory_relations_tool) or explain how a relation differs from just updating a memory.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no explicit when-to-use guidance: nothing says when to create a relation versus using memory_create_tool or memory_relations_tool, and no prerequisites (e.g., both memories must already exist) are stated. The only directional hint is the parenthetical that supersedes/invalidates mutate the target status, which is a side-effect note rather than usage guidance.

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