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"]
      }
    },

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
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.