Skip to main content
Glama

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
NameRequiredDescriptionDefault
cluster_typeYesType of cluster
descriptionNoDescription of the cluster
keywordsNoKeywords associated with this cluster
nameYesName of the cluster

Implementation Reference

  • 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; } }
  • 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) }] };
  • 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"] }

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