Skip to main content
Glama

memory_related

Get related memories for any memory ID, with an optional refresh to recompute stale cross-references and return up-to-date linked entries.

Instructions

Return cross-referenced memories for a given entry.

Consistency: the related graph is eventually consistent. When a new memory A is created or updated with references to an existing B, A.related is computed fresh but B.related is not re-cascaded — it stays valid until either a full rebuild or an explicit refresh. Pass refresh=True to recompute this memory's crossrefs on the fly (the strong-consistency path). For a full rebuild across the store, call memory_rebuild_crossrefs.

An EMPTY stored list is a stored answer too: it is returned as-is and is only recomputed with refresh=True (or a rebuild), the same rule as a non-empty list. Only a memory whose crossrefs were never computed is computed on read. (Before this change an empty list was recomputed on every call.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refreshNo
memory_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations present, the description carries the full behavioral disclosure burden. It does so thoroughly: it explains eventual consistency, non-cascading updates to related lists, the effect of refresh=True, and the special handling of empty stored lists. This is far more than a typical surface-level description.

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 and the consistency information is structured into clear sections. Most sentences add real value, but the parenthetical changelog note ('Before this change an empty list was recomputed on every call.') is historical context that is not needed to call the tool correctly and adds minor bloat.

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

Completeness5/5

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

The description covers the consistency model, refresh override, empty-list semantics, and the rebuild alternative. An output schema exists, so return-value details are not required. Overall, an agent has everything critical to correctly select and invoke this tool.

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 description coverage is 0%, so the description must compensate. It explains refresh=True in detail, including consistency semantics and recomputation behavior. The memory_id parameter is only minimally described as 'a given entry,' but the schema already identifies it as a required integer memory identifier, making the combined meaning adequate.

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 opens with a specific verb and resource: 'Return cross-referenced memories for a given entry.' It clearly identifies the tool's function and its scope, and distinguishes it from sibling memory_rebuild_crossrefs by describing the per-entry refresh path versus the store-wide rebuild path.

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

Usage Guidelines5/5

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

The description gives explicit usage directives: pass refresh=True for the strong-consistency recompute path, and call memory_rebuild_crossrefs for a full rebuild across the store. It names an alternative and the condition that selects it, leaving little to inference.

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