Skip to main content
Glama

distill_session

Condense a conversation session into structured knowledge and persist it to long-term memory, clearing old tool results to reduce context size.

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?

Without annotations, the description carries full burden. It discloses three processing layers, including that microcompact 'clears old tool results at zero cost' and that extracted memories are persisted to RecallNest. It does not cover authentication or rate limits, but given the context, it is adequately transparent.

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—three sentences front-loaded with purpose, then layers and usage. Every sentence adds value with no redundancy.

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 tool's complexity (5 params, no output schema, no annotations), the description provides sufficient context: process overview, when to use, and side effects. Lacks details on return value, but that is acceptable without output schema.

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

Parameters3/5

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

Schema coverage is 100% with detailed parameter descriptions. The description adds context about the overall process but does not enhance parameter understanding beyond the schema, staying at baseline.

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: 'Distill a conversation session into structured knowledge and persist to long-term memory.' It lists three specific layers (microcompact, LLM summarization, extraction to RecallNest), distinguishing it from siblings like distill_memory.

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?

Explicit usage guidance: 'Use when a session is ending or context is getting large.' This provides clear context for when to invoke the tool, though it does not explicitly mention when not to use or alternatives.

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