Skip to main content
Glama

timeline

Retrieve memories written immediately before and after a given record, in creation order, so you see the notes and pitfalls of the same work stretch regardless of shared wording.

Instructions

What else was being written around one memory, in creation order.

For the question search cannot ask: not what mentions this record, but what was being written when it was. Neighbours are picked by time alone, so they come back whether or not they share a word with the anchor -- around a checkpoint, that is the notes and pitfalls of the same stretch of work.

One of uid or query is required. uid names the anchor outright; query searches for it and takes the top hit (the same search search() runs, scoped by domain/type). Give both and uid wins. The response reports anchored_by ('uid' or 'query') and the whole anchor record, so which record the timeline is built around is never a guess.

Returns {"anchored_by": ..., "anchor": {...}, "before": [...], "after": [...]}: before is the before records created immediately before the anchor and after the after records created immediately after it, both oldest first, so before + [anchor] + after reads straight down the clock. Neither list contains the anchor.

domain and type narrow the NEIGHBOURHOOD, not the anchor: a memory named by uid comes back as named, and the records around it are the ones matching the filters. domain covers a path and everything under it, plus what is cross-listed into it, and resolves a bare deep segment the way the other scoped reads do. Archived records are left out of the neighbourhood, as everywhere else by default.

Each record is snippet-truncated with est_tokens for its full content -- call get_memory(uid) to open one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidNo
typeNo
afterNo
queryNo
beforeNo
domainNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly succeeds: neighbour selection is by time only, archived records are excluded from the neighbourhood, output is snippet-truncated with est_tokens, and lists are ordered oldest-first with the anchor excluded. It does not mention permissions, error behaviour when query matches nothing, or limits, which keeps it short of a 5.

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?

Purpose is front-loaded and the returns block earns its place given no output schema, but the prose is leisurely and repeats the anchor/neighbour distinction in several forms ("Neighbours are picked by time alone," then "domain and type narrow the NEIGHBOURHOOD, not the anchor"). Reduce without losing meaning.

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?

For a 6-parameter tool with no annotations and no output schema, the description covers the return shape (anchored_by, anchor, before, after), ordering, anchor inclusion/exclusion, filtering scope, archiving defaults, and truncation. Nothing an agent needs to call it correctly is missing.

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 and largely does: it defines before/after counts and ordering, the uid/query precedence, and clarifies that domain/type filter the neighbourhood rather than the anchor (including path-prefix, cross-listing, and bare-segment resolution). The `type` parameter's accepted values are never enumerated, leaving a gap.

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?

States a specific resource (the records created immediately around one anchor memory, in creation order) and explicitly separates itself from search: "not what mentions this record, but what was being written when it was." An agent can distinguish this from search/recall/list_recent without opening a schema.

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?

Names the condition that selects this tool versus search (semantic neighbours vs temporal neighbours), specifies the uid-vs-query requirement and precedence ("Give both and uid wins"), and routes to get_memory for full content. Alternatives and exclusions are explicit.

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