Skip to main content
Glama

list_long_term_memories

Retrieve stored long-term memory names and details from the Memory MCP Server to access persistent conversation data and manage information recall.

Instructions

List all long-term memory names and their basic information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversation_idNoConversation ID to inspect (defaults to "default")

Implementation Reference

  • The handler function for the 'list_long_term_memories' tool. It retrieves all long-term memories using memoryManager.getMemories() and returns a formatted list with name, dates, and prompt preview.
    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
        };
      }
    }
  • The input schema for the tool, 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 calling createLongTermTools and registering each tool.
    const longTermTools = createLongTermTools(defaultLongTermManager, defaultStorageManager);
    longTermTools.forEach(tool => registerTool(tool, 'long-term'));
  • src/index.js:290-295 (registration)
    Dynamic recreation and execution of long-term tools for specific conversation_id during tool calls, finding and invoking the handler for 'list_long_term_memories'.
    } else if (toolScope === 'long-term' || toolName.includes('long_term')) {
      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`);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'List all' implies a read-only operation, it doesn't specify whether this tool is paginated, what 'basic information' includes, or any performance characteristics like rate limits. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence that states the tool's purpose without unnecessary words. It's appropriately sized for a simple list operation and front-loads the essential information, making it easy for an agent to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description should provide more context about what 'basic information' includes and the tool's behavior. For a list operation among many memory-related tools, this minimal description leaves the agent with insufficient information to understand the full context of use.

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?

The input schema has 100% description coverage, with the single parameter 'conversation_id' clearly documented in the schema. The description doesn't add any parameter semantics beyond what the schema already provides, so it meets the baseline score of 3 for adequate but not additive parameter information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and resource ('long-term memory names and their basic information'), making the tool's purpose immediately understandable. However, it doesn't differentiate itself from sibling tools like 'search_long_term_memories' or 'list_backups', which reduces its effectiveness in helping an agent choose between similar list/search operations.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'search_long_term_memories' or 'list_backups'. It doesn't mention any prerequisites, constraints, or typical use cases, leaving the agent with insufficient context to make an informed selection among sibling tools.

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

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