Skip to main content
Glama
QuixiAI

AGI MCP Server

by QuixiAI

activate_cluster

Activate a memory cluster to retrieve associated memories for AI systems, enabling continuity of consciousness across conversations by providing episodic, semantic, procedural, and strategic memory access.

Instructions

Activate a memory cluster and get its associated memories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cluster_idYesUUID of the cluster to activate
contextNoContext description for this activation

Implementation Reference

  • mcp.js:569-574 (handler)
    MCP server tool handler for 'activate_cluster': extracts arguments, calls memoryManager.activateCluster, and returns JSON-stringified result.
    case "activate_cluster":
      const clusterMemories = await memoryManager.activateCluster(
        args.cluster_id,
        args.context || null
      );
      return { content: [{ type: "text", text: JSON.stringify(clusterMemories, null, 2) }] };
  • Core implementation of cluster activation: increments activation count, logs history in database transaction, returns 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;
      }
    }
  • Input schema definition for the 'activate_cluster' tool, used in MCP ListTools response.
    {
      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"]
      }
  • Tool schema definition exported from memoryTools array (possibly source for mcp.js hardcoding).
    {
      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:25-523 (registration)
    MCP tool registration via ListToolsRequestSchema handler that returns all tool definitions including 'activate_cluster'.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: "create_memory",
            description: "Create a new memory with optional type-specific metadata",
            inputSchema: {
              type: "object",
              properties: {
                type: {
                  type: "string",
                  enum: ["episodic", "semantic", "procedural", "strategic"],
                  description: "Type of memory to create"
                },
                content: {
                  type: "string",
                  description: "The main content/text of the memory"
                },
                embedding: {
                  type: "array",
                  items: { type: "number" },
                  description: "Vector embedding for the memory content"
                },
                importance: {
                  type: "number",
                  description: "Importance score (0.0 to 1.0)",
                  default: 0.0
                },
                metadata: {
                  type: "object",
                  description: "Type-specific metadata (action_taken, context, confidence, etc.)",
                  default: {}
                }
              },
              required: ["type", "content", "embedding"]
            }
          },
          {
            name: "search_memories_similarity",
            description: "Search memories by vector similarity",
            inputSchema: {
              type: "object",
              properties: {
                embedding: {
                  type: "array",
                  items: { type: "number" },
                  description: "Query embedding vector"
                },
                limit: {
                  type: "integer",
                  description: "Maximum number of results",
                  default: 10
                },
                threshold: {
                  type: "number",
                  description: "Minimum similarity threshold",
                  default: 0.7
                }
              },
              required: ["embedding"]
            }
          },
          {
            name: "search_memories_text",
            description: "Search memories by text content using full-text search",
            inputSchema: {
              type: "object",
              properties: {
                query: {
                  type: "string",
                  description: "Text query to search for"
                },
                limit: {
                  type: "integer",
                  description: "Maximum number of results",
                  default: 10
                }
              },
              required: ["query"]
            }
          },
          {
            name: "get_memory",
            description: "Retrieve a specific memory by ID and mark it as accessed",
            inputSchema: {
              type: "object",
              properties: {
                memory_id: {
                  type: "string",
                  description: "UUID of the memory to retrieve"
                }
              },
              required: ["memory_id"]
            }
          },
          {
            name: "get_memory_clusters",
            description: "Retrieve memory clusters ordered by importance/activity",
            inputSchema: {
              type: "object",
              properties: {
                limit: {
                  type: "integer",
                  description: "Maximum number of clusters to return",
                  default: 20
                }
              }
            }
          },
          {
            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"]
            }
          },
          {
            name: "create_memory_cluster",
            description: "Create a new memory cluster",
            inputSchema: {
              type: "object",
              properties: {
                name: {
                  type: "string",
                  description: "Name of the cluster"
                },
                cluster_type: {
                  type: "string",
                  enum: ["theme", "emotion", "temporal", "person", "pattern", "mixed"],
                  description: "Type of cluster"
                },
                description: {
                  type: "string",
                  description: "Description of the cluster"
                },
                keywords: {
                  type: "array",
                  items: { type: "string" },
                  description: "Keywords associated with this cluster",
                  default: []
                }
              },
              required: ["name", "cluster_type"]
            }
          },
          {
            name: "get_identity_core",
            description: "Retrieve the current identity model and core memory clusters",
            inputSchema: {
              type: "object",
              properties: {}
            }
          },
          {
            name: "get_worldview",
            description: "Retrieve current worldview primitives and beliefs",
            inputSchema: {
              type: "object",
              properties: {}
            }
          },
          {
            name: "get_memory_health",
            description: "Get overall statistics about memory system health",
            inputSchema: {
              type: "object",
              properties: {}
            }
          },
          {
            name: "get_active_themes",
            description: "Get recently activated memory themes and patterns",
            inputSchema: {
              type: "object",
              properties: {
                days: {
                  type: "integer",
                  description: "Number of days to look back",
                  default: 7
                }
              }
            }
          },
          {
            name: "create_memory_relationship",
            description: "Create a relationship between two memories",
            inputSchema: {
              type: "object",
              properties: {
                from_memory_id: {
                  type: "string",
                  description: "UUID of the source memory"
                },
                to_memory_id: {
                  type: "string", 
                  description: "UUID of the target memory"
                },
                relationship_type: {
                  type: "string",
                  enum: ["causal", "temporal", "semantic", "emotional", "strategic", "consolidation"],
                  description: "Type of relationship"
                },
                properties: {
                  type: "object",
                  description: "Additional properties for the relationship",
                  default: {}
                }
              },
              required: ["from_memory_id", "to_memory_id", "relationship_type"]
            }
          },
          {
            name: "get_memory_relationships",
            description: "Get relationships for a specific memory",
            inputSchema: {
              type: "object",
              properties: {
                memory_id: {
                  type: "string",
                  description: "UUID of the memory"
                },
                direction: {
                  type: "string",
                  enum: ["incoming", "outgoing", "both"],
                  description: "Direction of relationships to retrieve",
                  default: "both"
                },
                relationship_type: {
                  type: "string",
                  description: "Filter by relationship type (optional)"
                }
              },
              required: ["memory_id"]
            }
          },
          {
            name: "find_related_memories",
            description: "Find memories related through graph traversal",
            inputSchema: {
              type: "object",
              properties: {
                memory_id: {
                  type: "string",
                  description: "UUID of the starting memory"
                },
                max_depth: {
                  type: "integer",
                  description: "Maximum depth to traverse",
                  default: 2
                },
                min_strength: {
                  type: "number",
                  description: "Minimum relationship strength",
                  default: 0.3
                }
              },
              required: ["memory_id"]
            }
          },
          {
            name: "consolidate_working_memory",
            description: "Consolidate multiple working memories into a single semantic memory",
            inputSchema: {
              type: "object",
              properties: {
                working_memory_ids: {
                  type: "array",
                  items: { type: "string" },
                  description: "Array of working memory UUIDs to consolidate"
                },
                consolidated_content: {
                  type: "string",
                  description: "Content for the consolidated memory"
                },
                consolidated_embedding: {
                  type: "array",
                  items: { type: "number" },
                  description: "Embedding for the consolidated memory"
                }
              },
              required: ["working_memory_ids", "consolidated_content", "consolidated_embedding"]
            }
          },
          {
            name: "archive_old_memories",
            description: "Archive old memories based on age and importance criteria",
            inputSchema: {
              type: "object",
              properties: {
                days_old: {
                  type: "integer",
                  description: "Minimum age in days for archival",
                  default: 365
                },
                importance_threshold: {
                  type: "number",
                  description: "Maximum importance for archival",
                  default: 0.3
                }
              }
            }
          },
          {
            name: "prune_memories",
            description: "Permanently delete memories based on criteria",
            inputSchema: {
              type: "object",
              properties: {
                criteria: {
                  type: "object",
                  properties: {
                    max_age: {
                      type: "integer",
                      description: "Maximum age in days",
                      default: 1095
                    },
                    min_importance: {
                      type: "number",
                      description: "Minimum importance threshold",
                      default: 0.1
                    },
                    max_access_count: {
                      type: "integer",
                      description: "Maximum access count",
                      default: 2
                    },
                    status: {
                      type: "string",
                      description: "Memory status to prune",
                      default: "archived"
                    }
                  }
                }
              }
            }
          },
          {
            name: "get_cluster_insights",
            description: "Get detailed analytics for a memory cluster",
            inputSchema: {
              type: "object",
              properties: {
                cluster_id: {
                  type: "string",
                  description: "UUID of the cluster"
                }
              },
              required: ["cluster_id"]
            }
          },
          {
            name: "find_similar_clusters",
            description: "Find clusters similar to a given cluster",
            inputSchema: {
              type: "object",
              properties: {
                cluster_id: {
                  type: "string",
                  description: "UUID of the reference cluster"
                },
                threshold: {
                  type: "number",
                  description: "Minimum similarity threshold",
                  default: 0.7
                }
              },
              required: ["cluster_id"]
            }
          },
          {
            name: "create_working_memory",
            description: "Create a temporary working memory with expiration",
            inputSchema: {
              type: "object",
              properties: {
                content: {
                  type: "string",
                  description: "Content of the working memory"
                },
                embedding: {
                  type: "array",
                  items: { type: "number" },
                  description: "Vector embedding for the content"
                },
                context: {
                  type: "object",
                  properties: {
                    ttl: {
                      type: "integer",
                      description: "Time to live in seconds",
                      default: 3600
                    }
                  },
                  default: {}
                }
              },
              required: ["content", "embedding"]
            }
          },
          {
            name: "get_working_memories",
            description: "Retrieve current working memories",
            inputSchema: {
              type: "object",
              properties: {
                include_expired: {
                  type: "boolean",
                  description: "Include expired working memories",
                  default: false
                }
              }
            }
          },
          {
            name: "cleanup_expired_working_memory",
            description: "Clean up expired working memories",
            inputSchema: {
              type: "object",
              properties: {}
            }
          },
          {
            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"]
            }
          },
          {
            name: "search_memories_advanced",
            description: "Advanced memory search with multiple criteria",
            inputSchema: {
              type: "object",
              properties: {
                criteria: {
                  type: "object",
                  properties: {
                    text_query: {
                      type: "string",
                      description: "Text search query"
                    },
                    embedding: {
                      type: "array",
                      items: { type: "number" },
                      description: "Vector embedding for similarity search"
                    },
                    memory_types: {
                      type: "array",
                      items: { type: "string" },
                      description: "Filter by memory types",
                      default: []
                    },
                    importance_range: {
                      type: "array",
                      items: { type: "number" },
                      minItems: 2,
                      maxItems: 2,
                      description: "Importance range [min, max]",
                      default: [0, 1]
                    },
                    date_range: {
                      type: "object",
                      properties: {
                        start: { type: "string", format: "date-time" },
                        end: { type: "string", format: "date-time" }
                      },
                      default: {}
                    },
                    limit: {
                      type: "integer",
                      description: "Maximum number of results",
                      default: 10
                    }
                  }
                }
              },
              required: ["criteria"]
            }
          }
        ]
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions activation and retrieval of memories, but doesn't describe what 'activate' means (e.g., does it change state, require permissions, have side effects?), the format or scope of returned memories, potential errors, or rate limits. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action and outcome. It avoids redundancy and wastes no words, making it easy to parse quickly. However, it could be slightly more structured by separating purpose from usage hints, but this is minor.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (activation operation with no annotations and no output schema), the description is incomplete. It doesn't explain what 'activate' entails, the nature of returned memories, error conditions, or how it differs from read-only siblings. Without annotations or output schema, more detail is needed to fully understand the tool's behavior and use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters ('cluster_id' as UUID, 'context' as optional description). The description doesn't add any meaning beyond this, such as explaining how 'context' influences activation or providing examples. With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('activate') and resource ('a memory cluster'), and mentions the outcome ('get its associated memories'). It distinguishes from siblings like 'get_memory_clusters' (which likely lists clusters) and 'create_memory_cluster' (which creates new ones), though it doesn't explicitly name alternatives. The purpose is specific but could be more precise about what 'activate' entails operationally.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't specify prerequisites (e.g., whether the cluster must exist or be inactive), exclusions, or compare to siblings like 'get_memory_clusters' or 'find_similar_clusters'. The description implies usage for retrieving memories from a cluster, but lacks context on appropriate scenarios or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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