Skip to main content
Glama

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
NameRequiredDescriptionDefault
cluster_idYesUUID of the cluster to activate
contextNoContext description for this activation

Implementation Reference

  • 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;
      }
    }
  • 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"]
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'activate' (implying a state change) and 'get associated memories' (implying retrieval), but lacks critical behavioral details: whether activation is reversible, if it requires specific permissions, rate limits, side effects (e.g., impacts on other clusters), or what the output looks like (memories format, pagination). For a tool with potential mutation effects and no annotation coverage, this is inadequate.

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

Conciseness5/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. Every word earns its place, with no redundancy or fluff. It's appropriately sized for a tool with two parameters and clear schema documentation.

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 no annotations, no output schema, and a tool that likely involves state changes ('activate'), the description is incomplete. It doesn't address behavioral risks, output format, or usage context. For a mutation-like tool in a memory management system, more detail is needed to ensure safe and correct invocation by an agent.

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%, with clear parameter descriptions in the schema. The tool description adds no additional parameter semantics beyond what's in the schema (e.g., doesn't explain what 'context' influences or provide 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 ('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). However, it doesn't specify what 'activate' entails operationally (e.g., making it available for recall vs. modifying state).

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 explicit guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., cluster must exist), exclusions (e.g., clusters already active), or related tools like 'get_memory_clusters' for listing clusters first. The description implies usage for retrieving memories, but doesn't clarify if this is the primary method versus 'get_memory' or 'search_memories_advanced'.

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

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