get_memory_history
Retrieve change history for a specific memory by providing its UUID, enabling tracking of modifications over time within the AGI MCP Server's persistent memory system.
Instructions
Get change history for a specific memory
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memory_id | Yes | UUID of the memory |
Implementation Reference
- src/memory-manager.js:931-944 (handler)The core handler function that executes the tool logic by querying the memoryChanges table for the change history of the specified memory ID and returns the ordered list of changes.async getMemoryHistory(memoryId) { try { const history = await this.db .select() .from(schema.memoryChanges) .where(eq(schema.memoryChanges.memoryId, memoryId)) .orderBy(desc(schema.memoryChanges.changedAt)); return history; } catch (error) { console.warn('Memory history query failed:', error.message); return []; } }
- mcp.js:674-676 (registration)The registration and dispatch point in the MCP server where tool calls to 'get_memory_history' are handled by invoking the MemoryManager's getMemoryHistory method.case "get_memory_history": const memoryHistory = await memoryManager.getMemoryHistory(args.memory_id); return { content: [{ type: "text", text: JSON.stringify(memoryHistory, null, 2) }] };
- mcp.js:458-470 (schema)The input schema definition for the 'get_memory_history' tool, specifying the required 'memory_id' parameter.{ name: "get_memory_history", description: "Get change history for a specific memory", inputSchema: { type: "object", properties: { memory_id: { type: "string", description: "UUID of the memory" } }, required: ["memory_id"] }
- src/tools/memory-tools.js:432-444 (schema)The schema definition for the tool in the memoryTools export array (possibly for reference or alternative implementation).{ name: "get_memory_history", description: "Get change history for a specific memory", inputSchema: { type: "object", properties: { memory_id: { type: "string", description: "UUID of the memory" } }, required: ["memory_id"] }