create_memory_cluster
Create a new memory cluster on AGI MCP Server to organize data by theme, emotion, temporal, person, pattern, or mixed types, enabling AI systems to maintain continuity and context across interactions.
Instructions
Create a new memory cluster
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_type | Yes | Type of cluster | |
| description | No | Description of the cluster | |
| keywords | No | Keywords associated with this cluster | |
| name | Yes | Name of the cluster |
Implementation Reference
- src/memory-manager.js:217-238 (handler)Core handler function in MemoryManager class that creates a new memory cluster by inserting a record into the memoryClusters table with default values and returns the created cluster.async createMemoryCluster(name, clusterType, description, keywords = []) { try { const defaultEmbedding = new Array(1536).fill(0.0); const [cluster] = await this.db .insert(schema.memoryClusters) .values({ name, clusterType, description, keywords, centroidEmbedding: defaultEmbedding, importanceScore: 0.0 }) .returning(); return cluster; } catch (error) { console.error('Error creating memory cluster:', error); throw error; } }
- src/tools/memory-tools.js:128-155 (schema)Input schema definition for the create_memory_cluster tool, specifying parameters and validation rules.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"] } },
- mcp.js:576-583 (registration)Registration and dispatch handler in the MCP server request handler switch statement that invokes the MemoryManager's createMemoryCluster method.case "create_memory_cluster": const newCluster = await memoryManager.createMemoryCluster( args.name, args.cluster_type, args.description, args.keywords || [] ); return { content: [{ type: "text", text: JSON.stringify(newCluster, null, 2) }] };
- mcp.js:154-180 (schema)Tool schema definition included in the MCP server's tools list for create_memory_cluster.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"] }