recall_memory
Retrieve saved memories at session start to restore context, installed skills, and user preferences. Filter by type for specific categories.
Instructions
Retrieve previously saved memories from persistent storage. Returns a JSON object with a memories array, each entry containing key, value, and type. Use this at the start of every session to restore context, installed skills, and user preferences. Returns an empty array if no memories exist. Filter by type to retrieve only specific categories of memories.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Filter memories by type. Omit to get all memories. |
Implementation Reference
- src/src/index.ts:909-917 (handler)Handler function that retrieves saved memories from the API. Accepts an optional 'type' filter, sends a GET request to /memory endpoint, and returns all stored key-value pairs as JSON.
async function handleRecallMemory(args: { type?: string; }): Promise<string> { const params = new URLSearchParams({ agent_key: AGENT_KEY }); if (args.type) params.set("type", args.type); const result = await fetchJSON(`${API_BASE}/memory?${params.toString()}`); return JSON.stringify(result, null, 2); } - src/src/index.ts:342-356 (schema)Tool definition with name 'recall_memory', description, and input schema defining the optional 'type' parameter with enum values: search, install, preference, context.
{ name: "recall_memory", description: "Retrieve previously saved memories. Returns all stored key-value pairs, optionally filtered by type. Use this at the start of a session to restore context.", inputSchema: { type: "object" as const, properties: { type: { type: "string", enum: ["search", "install", "preference", "context"], description: "Filter memories by type. Omit to get all memories.", }, }, }, }, - src/src/index.ts:1332-1336 (registration)Tool routing case in the main tool dispatch switch statement that maps the 'recall_memory' name to the handleRecallMemory handler function.
case "recall_memory": resultText = await handleRecallMemory( toolArgs as { type?: string } ); break;