Skip to main content

Overview

View chronological context around a specific observation. Shows what happened before and after a memory entry within the same session, providing temporal context for better understanding.
This tool is part of the admin profile and uses deferred loading. It’s most useful after mem_search to drill into the timeline of events surrounding a search result.

Progressive Disclosure Pattern

This tool implements the 3-layer progressive disclosure pattern:
1

mem_search

Search for relevant observations (returns compact results with IDs)
2

mem_timeline

Get chronological context around a result (what happened before/after)
3

mem_get_observation

Get full untruncated content (if needed)

Parameters

number
required
The observation ID to center the timeline onGet this ID from:Example: 42
number
Number of observations to show before the focus observationDefault: 5Returns the N observations that occurred immediately before (chronologically) in the same session.
number
Number of observations to show after the focus observationDefault: 5Returns the N observations that occurred immediately after (chronologically) in the same session.

Response

object
Timeline result with session info, focus observation, and surrounding entries
The response includes:
  1. Session header — session ID, project, start time, summary (if available)
  2. Total observations in session
  3. Before entries — observations that occurred before the focus
  4. Focus observation — the anchor observation (highlighted)
  5. After entries — observations that occurred after the focus
Example response:

Usage Examples

Default Timeline (5 before, 5 after)

Shows 5 observations before #42 and 5 observations after #42.

Narrow Timeline (2 before, 2 after)

Shows only the immediate context (2 entries on each side).

Wide Timeline (10 before, 10 after)

Shows broader context with 10 entries on each side.

Asymmetric Timeline

Shows 3 before and 7 after — useful when you care more about what happened next.

When to Use

  • After search — drill into the context of a search result
  • Debugging — understand the sequence of events that led to a bug
  • Session exploration — see what else happened during that session
  • Causal analysis — understand what led to a decision or discovery

Timeline Boundaries

Timelines are session-scoped — only observations from the same session appear:
  • If the focus observation is at the start of a session, there may be fewer “before” entries (or none)
  • If the focus observation is at the end of a session, there may be fewer “after” entries (or none)
  • Observations from other sessions never appear in the timeline
The Total observations in session count tells you how many total observations exist in that session.

Session Header

The session header provides context:
  • Project namemy-api
  • Session start time2026-03-01T14:00:00Z
  • Session summary — “Added JWT authentication and refactored user service” (if available)
  • Total observations — 12 entries in this session

Chronological Ordering

Observations are ordered by created_at timestamp:
  1. Before entries — oldest to newest (leading up to the focus)
  2. Focus observation — the anchor
  3. After entries — oldest to newest (following the focus)

Content Truncation

Timeline entries show truncated content to save tokens:
  • Before/After entries: Up to 150 characters
  • Focus observation: Up to 500 characters
For full content, use mem_get_observation.

Token Efficiency

Typical timeline token counts:
  • Default (5 before, 5 after): ~800-1500 tokens
  • Narrow (2 before, 2 after): ~400-700 tokens
  • Wide (10 before, 10 after): ~1500-3000 tokens
Adjust before and after parameters based on your context window. Start with the default and narrow if needed.

Example Workflow

1

Search for a memory

Returns observation #42 in the results.
2

View timeline context

See what happened before and after the FTS5 fix.
3

Get full content (if needed)

Retrieve the full untruncated observation.

Error Handling

If the observation ID doesn’t exist:
Verify the ID from mem_search results.
Soft-deleted observations are excluded from timelines. If you request a timeline for a deleted observation:
If the focus observation is at the session start or end, you’ll see fewer “before” or “after” entries: