list_long_term_memories
Retrieve all stored long-term memory entries with their basic information for review and management of persistent knowledge.
Instructions
List all long-term memory names and their basic information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/long-term-tools.js:164-182 (handler)The handler function for the 'list_long_term_memories' tool. It retrieves all memories from the LongTermMemoryManager, formats them with name, dates, and prompt preview, and returns the list along with total count.handler: async (args) => { try { const memories = memoryManager.getMemories(); return { memories: memories.map(mem => ({ name: mem.name, createdAt: mem.createdAt.toISOString(), updatedAt: mem.updatedAt?.toISOString(), promptPreview: mem.prompt.substring(0, 100) + (mem.prompt.length > 100 ? '...' : '') })), total: memories.length }; } catch (error) { return { error: error.message }; } }
- src/tools/long-term-tools.js:161-163 (schema)Input schema using Zod, defining an optional 'conversation_id' parameter.inputSchema: z.object({ conversation_id: z.string().optional().describe('Conversation ID to inspect (defaults to "default")') }),
- src/index.js:157-158 (registration)Static registration of long-term tools (including list_long_term_memories) for the default conversation by creating them with default managers and registering via registerTool.const longTermTools = createLongTermTools(defaultLongTermManager, defaultStorageManager); longTermTools.forEach(tool => registerTool(tool, 'long-term'));
- src/index.js:291-295 (registration)Dynamic recreation and execution of long-term tools (including list_long_term_memories) for specific conversation_id during tool call handling.manager = await getLongTermManager(conversationId); storage = getStorageManager(conversationId); const tools = createLongTermTools(manager, storage); const tool = tools.find(t => t.name === toolName); result = await withTimeout(tool.handler(validatedArgs), timeout, `Tool ${toolName} timeout`);