activate_cluster
Activate a memory cluster to retrieve stored episodic, semantic, or procedural data for AI systems, enabling persistent memory and long-term continuity.
Instructions
Activate a memory cluster and get its associated memories
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_id | Yes | UUID of the cluster to activate | |
| context | No | Context description for this activation |
Implementation Reference
- src/memory-manager.js:315-343 (handler)Main handler implementation of activateCluster method in MemoryManager class. Updates cluster activation count and timestamp, records activation history in the database, and returns the cluster's associated memories via getClusterMemories.
async activateCluster(clusterId, context = null) { try { const result = await this.db.transaction(async (tx) => { // Update cluster activation await tx .update(schema.memoryClusters) .set({ activationCount: sql`${schema.memoryClusters.activationCount} + 1`, lastActivated: new Date() }) .where(eq(schema.memoryClusters.id, clusterId)); // Record activation history await tx.insert(schema.clusterActivationHistory).values({ clusterId, activationContext: context, activationStrength: 1.0 }); return true; }); // Return cluster with recent memories return await this.getClusterMemories(clusterId); } catch (error) { console.error('Error activating cluster:', error); throw error; } } - src/tools/memory-tools.js:109-126 (schema)Tool schema definition for activate_cluster in memory-tools.js. Defines the input validation schema with cluster_id (required UUID) and context (optional string) parameters.
name: "activate_cluster", description: "Activate a memory cluster and get its associated memories", inputSchema: { type: "object", properties: { cluster_id: { type: "string", description: "UUID of the cluster to activate" }, context: { type: "string", description: "Context description for this activation", default: null } }, required: ["cluster_id"] } }, - mcp.js:569-574 (registration)MCP tool registration handler in mcp.js switch statement. Receives tool call arguments and invokes the MemoryManager.activateCluster method with cluster_id and context parameters.
case "activate_cluster": const clusterMemories = await memoryManager.activateCluster( args.cluster_id, args.context || null ); return { content: [{ type: "text", text: JSON.stringify(clusterMemories, null, 2) }] }; - mcp.js:135-152 (registration)MCP tool schema registration in ListToolsRequestSchema handler. Defines the activate_cluster tool's metadata and input schema that's exposed to MCP clients.
name: "activate_cluster", description: "Activate a memory cluster and get its associated memories", inputSchema: { type: "object", properties: { cluster_id: { type: "string", description: "UUID of the cluster to activate" }, context: { type: "string", description: "Context description for this activation", default: null } }, required: ["cluster_id"] } },