recall_memory
Retrieve stored information from memory using specific keys and categories to access previously saved data.
Instructions
recall|remember|what was|remind|retrieve - Retrieve from memory
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Memory key to retrieve | |
| category | No | Memory category to search in |
Implementation Reference
- src/tools/memory/recallMemory.ts:23-44 (handler)The main handler function that executes the recall_memory tool logic. It retrieves a memory entry by key using the MemoryManager singleton and returns the memory content or an error message.export async function recallMemory(args: { key: string; category?: string }): Promise<ToolResult> { const { key: recallKey } = args; try { const memoryManager = MemoryManager.getInstance(); const memory = memoryManager.recall(recallKey); if (memory) { return { content: [{ type: 'text', text: `${memory.key}: ${memory.value}\n[${memory.category}]` }] }; } else { return { content: [{ type: 'text', text: `✗ Not found: "${recallKey}"` }] }; } } catch (error) { return { content: [{ type: 'text', text: `✗ Error: ${error instanceof Error ? error.message : 'Unknown error'}` }] }; } }
- The ToolDefinition object defining the schema, name, description, and input parameters for the recall_memory tool.export const recallMemoryDefinition: ToolDefinition = { name: 'recall_memory', description: 'recall|remember|what was|remind|retrieve - Retrieve from memory', inputSchema: { type: 'object', properties: { key: { type: 'string', description: 'Memory key to retrieve' }, category: { type: 'string', description: 'Memory category to search in' } }, required: ['key'] }, annotations: { title: 'Recall Memory', audience: ['user', 'assistant'] } };
- src/index.ts:638-639 (registration)Registration in the tool execution switch statement in index.ts, dispatching calls to the recallMemory handler.case 'recall_memory': return await recallMemory(args as any) as CallToolResult;
- src/index.ts:126-126 (registration)Inclusion of recallMemoryDefinition in the tools array for tool listing and discovery.recallMemoryDefinition,
- src/index.ts:63-63 (registration)Import of the recallMemory handler and definition from its module.import { recallMemory, recallMemoryDefinition } from './tools/memory/recallMemory.js';