Skip to main content
Glama

distill_session

Distill conversation sessions into structured knowledge and persist to long-term memory. Use when a session ends or context grows large.

Instructions

Distill a conversation session into structured knowledge and persist to long-term memory. Three layers: (1) microcompact clears old tool results at zero cost, (2) LLM summarizes into 9 dimensions, (3) extracts durable knowledge into RecallNest. Use when a session is ending or context is getting large. Side effect: persists extracted memories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messagesYesConversation messages to distill
scopeYesMemory scope for persisted knowledge, e.g. 'project:recallnest'
preserveRecentNoKeep the N most recent messages verbatim (default: 6)
keepRecentToolsNoKeep the N most recent tool results during microcompact (default: 5)
persistNoWhether to persist extracted knowledge to RecallNest (default: true)
Behavior4/5

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

Despite no annotations, the description discloses key behavioral traits: the three transformation layers, zero-cost microcompact, and the side effect of persisting extracted memories to RecallNest. This provides adequate transparency for an AI agent to understand the tool's impact, though it could be more explicit about potential data overwrite or authorization needs.

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 concise: a single paragraph that front-loads the purpose, explains the three layers, gives usage guidance, and notes a side effect. Every sentence adds value, and there is no redundant or extraneous information.

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

Completeness4/5

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

Given the complexity of the tool (5 parameters, nested message structure, and no output schema), the description covers the essential aspects: purpose, process layers, usage context, and side effects. It is sufficient for an agent to decide when and how to use it, though a brief note about return values would improve completeness.

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?

The input schema has 100% description coverage for all 5 parameters, which already provides clarity. The description adds value by explaining how parameters like 'preserveRecent' and 'keepRecentTools' relate to the microcompact layer (clearing old tool results), enriching the agent's understanding beyond the schema alone.

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's purpose: distilling a conversation session into structured knowledge and persisting to long-term memory. It outlines three specific layers (microcompact, LLM summarization, extraction) and explicitly mentions when to use it, distinguishing it from sibling tools like 'store_memory' or 'distill_memory' by its multi-step process.

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 provides explicit usage guidance: 'Use when a session is ending or context is getting large.' This gives clear context for when to invoke the tool. However, it does not explicitly state when not to use it or mention alternative tools for other scenarios, which would improve the score.

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/AliceLJY/recallnest'

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