Skip to main content
Glama

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
NameRequiredDescriptionDefault
memory_idYesUUID of the memory

Implementation Reference

  • 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) }] };
  • 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"] }
  • 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"] }

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/QuixiAI/agi-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server