Skip to main content
Glama

list_memories

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,

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