Skip to main content
Glama

list_memories

Read-onlyIdempotent

Retrieve and filter saved memories by category to review stored information and recall previous interactions.

Instructions

저장된 메모리 목록을 조회합니다. 카테고리별 필터링 가능.

키워드: 뭐 있었지, 저장된 거, 목록, what did I save, list memories, show saved

💡 세션 시작 시 전체 컨텍스트가 필요하면 get_session_context를 사용하세요.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter by category
limitNoMaximum number of results

Implementation Reference

  • The main handler function implementing the list_memories tool. Lists stored memories from MemoryManager, optionally filtered by category and limited, formats them nicely, handles errors.
    export async function listMemories(args: { category?: string; limit?: number }): Promise<ToolResult> {
      const { category: listCategory, limit = 10 } = args;
    
      try {
        const mm = MemoryManager.getInstance();
        const allMemories = mm.list(listCategory);
        const limitedMemories = allMemories.slice(0, limit);
    
        const memoryList = limitedMemories.map(m =>
          `• ${m.key} (${m.category}): ${m.value.substring(0, 50)}${m.value.length > 50 ? '...' : ''}`
        ).join('\n');
    
        return {
          content: [{
            type: 'text',
            text: `✓ Found ${allMemories.length} memories${listCategory ? ` in '${listCategory}'` : ''}:\n${memoryList || 'None'}`
          }]
        };
      } catch (error) {
        return {
          content: [{ type: 'text', text: `✗ Error: ${error instanceof Error ? error.message : 'Unknown error'}` }]
        };
      }
    }
  • ToolDefinition schema for list_memories, including name, description, inputSchema for category and limit, and annotations.
    export const listMemoriesDefinition: ToolDefinition = {
      name: 'list_memories',
      description: `저장된 메모리 목록을 조회합니다. 카테고리별 필터링 가능.
    
    키워드: 뭐 있었지, 저장된 거, 목록, what did I save, list memories, show saved
    
    💡 세션 시작 시 전체 컨텍스트가 필요하면 get_session_context를 사용하세요.`,
      inputSchema: {
        type: 'object',
        properties: {
          category: { type: 'string', description: 'Filter by category' },
          limit: { type: 'number', description: 'Maximum number of results' }
        },
        required: []
      },
      annotations: {
        title: 'List Memories',
        audience: ['user', 'assistant'],
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: false
      }
    };
  • src/index.ts:165-165 (registration)
    Registration of the listMemories handler in the toolHandlers object for dynamic tool dispatch during tool calls.
    'list_memories': listMemories,
  • src/index.ts:98-98 (registration)
    Registration of the listMemoriesDefinition in the tools array, used by ListToolsRequestSchema to list available tools.
    listMemoriesDefinition,
Behavior4/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false, covering safety and idempotency. The description adds context about filtering capabilities and references 'get_session_context' for session context, which is useful behavioral information beyond annotations. No contradictions with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by filtering info, keywords, and a usage tip. It's efficient but includes emojis and mixed languages (Korean/English), which slightly reduces structural clarity. Most sentences earn their place.

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?

For a read-only list tool with good annotations (readOnlyHint, idempotentHint) and no output schema, the description is reasonably complete. It covers purpose, filtering, keywords, and references an alternative tool. Minor gaps include no details on return format or pagination, but annotations help mitigate this.

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 description coverage is 100%, with clear descriptions for both parameters ('category' and 'limit'). The description mentions '카테고리별 필터링 가능' (filterable by category), which aligns with the schema but doesn't add significant semantic value beyond it. Baseline 3 is appropriate given high schema coverage.

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: '저장된 메모리 목록을 조회합니다' (retrieves a list of saved memories) and adds '카테고리별 필터링 가능' (filterable by category). It uses specific verbs ('조회합니다' - retrieves) and distinguishes from siblings like 'search_memories_advanced' by focusing on listing rather than searching.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: it includes keywords for when to use (e.g., '뭐 있었지', 'list memories') and explicitly references an alternative tool ('get_session_context') for session context needs. This clearly distinguishes when to use this tool versus others.

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/su-record/hi-ai'

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