Skip to main content
Glama

mem_context

Retrieve memory context from previous sessions to recover recent user prompts, observations, and session history, enabling continuity in AI agent interactions.

Instructions

Get recent memory context from previous sessions. Shows recent sessions, user prompts, and observations to understand what was done before.

Use this at the start of a session to recover context, or when the user asks to recall past work.

Returns bounded Markdown with:

  • Recent sessions (last 5 with activity)

  • Recent user prompts (last 10)

  • Recent observations (configurable limit)

  • Memory stats (total counts)

Observation bodies are previewed by default; use mem_get(id=...) for full content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of observations to retrieve (default: 20)
scopeNoFilter by scope
projectNoFilter by project name
max_charsNoOutput character budget; 0 disables the context cap
session_idNoFilter to a specific session
recall_queryNoOptional query to append fused recall evidence without changing base context sections
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that output is bounded Markdown, with previews of observation bodies, and refers to mem_get for full content. It does not mention auth requirements, rate limits, or side effects, but for a read-heavy tool this is acceptable.

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

Conciseness5/5

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

The description is well-structured with a clear purpose statement, usage guidance, and output breakdown. Every sentence adds value without redundancy. It is front-loaded with the most important use case.

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?

Given the tool has 6 parameters but no output schema, the description provides a thorough explanation of the return format (sections, Markdown, previews) and references to sibling tools for full content. The agent is fully equipped to use this tool correctly.

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 100%, so baseline is 3. The description adds useful context beyond schema field descriptions, notably that 'limit' applies to observations and that 'recall_query' appends fused recall evidence without changing base sections. This helps the agent understand parameter interactions.

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 clearly states the tool retrieves recent memory context from previous sessions, with specific sections listed. It distinguishes from siblings like mem_get (which retrieves specific items) and mem_recall (which does semantic search). The verb 'Get' and resource 'recent memory context' are precise.

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

Usage Guidelines4/5

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

The description explicitly says to use at session start or when recalling past work, and hints at alternatives (use mem_get for full content). It could be improved by explicitly stating when not to use this tool vs. mem_recall or mem_session, but the guidance is clear and actionable.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EremesNG/thoth-mem'

If you have feedback or need assistance with the MCP directory API, please join our Discord server