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: retrieves memory by key using MemoryManager, formats response or error.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'}` }] }; } }
- Input/output schema and metadata definition 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)Dispatch registration: switch case in executeToolCall function that routes recall_memory calls to the handler.case 'recall_memory': return await recallMemory(args as any) as CallToolResult;
- src/index.ts:126-126 (registration)Registration of the tool definition in the tools array used for MCP listTools endpoint.recallMemoryDefinition,
- src/index.ts:63-63 (registration)Import statement bringing in the handler and definition for use in the MCP server.import { recallMemory, recallMemoryDefinition } from './tools/memory/recallMemory.js';