Skip to main content
Glama

memory_expand

Read-only

Fetch memories by ID with surrounding timeline context to see the full picture.

Instructions

Fetch memories by ID with surrounding timeline context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesMemory IDs to expand
kindNoFilter by memory kind
projectNoFilter by project scope (matches sessions.project)
scope_idNoFilter by a single sharing domain scope_id
trust_biasNo
visibilityNo
depth_afterNoTimeline items after
depth_beforeNoTimeline items before
personal_firstNo
ownership_scopeNo
exclude_actor_idsNo
exclude_scope_idsNoSharing domain scope_ids to exclude
include_actor_idsNo
include_scope_idsNoSharing domain scope_ids to include
exclude_visibilityNo
include_visibilityNo
exclude_trust_statesNo
include_observationsNoInclude full observation details
include_trust_statesNo
exclude_workspace_idsNo
include_workspace_idsNo
widen_shared_when_weakNo
exclude_workspace_kindsNo
include_workspace_kindsNo
widen_shared_min_personal_scoreNo
widen_shared_min_personal_resultsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorsYes
anchorsYes
metadataYes
timelineYes
missing_idsYes
observationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.44.2
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "anchors": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "body_text": {
      +            "type": "string"
      +          },
      +          "confidence": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "created_at": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "metadata_json": {
      +            "additionalProperties": {},
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "session_id": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "title": {
      +            "type": "string"
      +          },
      +          "updated_at": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "kind",
      +          "title",
      +          "body_text"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "errors": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "field": {
      +            "type": "string"
      +          },
      +          "ids": {
      +            "items": {
      +              "type": [
      +                "string",
      +                "number"
      +              ]
      +            },
      +            "type": "array"
      +          },
      +          "message": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "field",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "metadata": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "include_observations": {
      +          "type": "boolean"
      +        },
      +        "project": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "requested_ids_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "returned_anchor_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "timeline_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "project",
      +        "requested_ids_count",
      +        "returned_anchor_count",
      +        "timeline_count",
      +        "include_observations"
      +      ],
      +      "type": "object"
      +    },
      +    "missing_ids": {
      +      "items": {
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      },
      +      "type": "array"
      +    },
      +    "observations": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "body_text": {
      +            "type": "string"
      +          },
      +          "confidence": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "created_at": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "metadata_json": {
      +            "additionalProperties": {},
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "session_id": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "title": {
      +            "type": "string"
      +          },
      +          "updated_at": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "kind",
      +          "title",
      +          "body_text"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "timeline": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "body_text": {
      +            "type": "string"
      +          },
      +          "confidence": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "created_at": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "metadata_json": {
      +            "additionalProperties": {},
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "session_id": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "title": {
      +            "type": "string"
      +          },
      +          "updated_at": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "kind",
      +          "title",
      +          "body_text"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "anchors",
      +    "timeline",
      +    "observations",
      +    "missing_ids",
      +    "errors",
      +    "metadata"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

C2.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the description's 'Fetch' is consistent. The description adds a behavioral detail by stating the output includes 'surrounding timeline context', which goes beyond the read-only hint. However, it does not disclose details like depth controls, filtering behavior, or what 'surrounding' means in practice. Given the annotations, this is acceptable but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one sentence, which is concise and front-loaded. However, for a tool with 26 parameters and an output schema, this brevity borders on under-specification. It is not verbose, but it fails to earn its place by providing only a trivial summary that could apply to any memory-related tool.

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

Completeness1/5

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

This tool is complex (26 params, output schema present), yet the description only states a bare function. It does not explain the timeline context behavior, the meaning of depth_before/after, or how the output relates to the input. An agent would need to inspect the schema and output schema to understand the tool's purpose and behavior, making the description nearly useless for effective invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 26 parameters and only 35% schema description coverage, the description was expected to compensate by explaining key parameters. It mentions none of them – not the required 'ids', nor the depth controls, filters, or the 'include_observations' flag. The description adds zero semantic value beyond the schema, which is already sparse for many parameters.

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 description states a clear verb ('Fetch') and resource ('memories by ID'), and adds 'surrounding timeline context' which hints at differentiating from sibling tools like memory_get (which likely fetches without context) and memory_timeline (which might show a timeline without specific IDs). It is specific enough to convey the core function, though it does not explicitly name alternatives.

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 guidance on when to use this tool versus memory_get, memory_timeline, or other siblings. No conditions, exclusions, or alternatives are mentioned. An agent must infer the appropriate use case solely from the phrase 'surrounding timeline context', which is insufficient given the variety of sibling tools.

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