Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 }; } }
  • 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`);

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/win10ogod/memory-mcp-server'

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