Skip to main content
Glama
StevenWangler

MCP Memory Server

create_entities

Add multiple entities, including names, types, and associated observations, into a knowledge graph for persistent memory and reasoning across conversations in the MCP Memory Server.

Instructions

Create multiple new entities in the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entitiesYes

Implementation Reference

  • The core handler function in KnowledgeGraphManager that executes the tool logic: loads the graph, filters out duplicate entities by name, appends new ones, saves the graph, and returns the newly created entities.
    async createEntities(entities: Entity[]): Promise<Entity[]> {
      const graph = await this.loadGraph();
      const newEntities = entities.filter(e => !graph.entities.some(existingEntity => existingEntity.name === e.name));
      graph.entities.push(...newEntities);
      await this.saveGraph(graph);
      return newEntities;
  • TypeScript interface defining the structure of an Entity, used as the type for inputs to createEntities.
    interface Entity {
      name: string;
      entityType: string;
      observations: string[];
    }
  • src/index.ts:202-227 (registration)
    Tool registration in the listTools response, including name, description, and detailed inputSchema matching the Entity structure.
    {
      name: "create_entities",
      description: "Create multiple new entities in the knowledge graph",
      inputSchema: {
        type: "object",
        properties: {
          entities: {
            type: "array",
            items: {
              type: "object",
              properties: {
                name: { type: "string", description: "The name of the entity" },
                entityType: { type: "string", description: "The type of the entity" },
                observations: { 
                  type: "array", 
                  items: { type: "string" },
                  description: "An array of observation contents associated with the entity"
                },
              },
              required: ["name", "entityType", "observations"],
            },
          },
        },
        required: ["entities"],
      },
    },
  • Dispatch case in the CallToolRequestSchema handler that invokes the createEntities method and formats the response.
    case "create_entities":
      return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.createEntities(args.entities as Entity[]), null, 2) }] };
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 states 'Create multiple new entities' which implies a write/mutation operation, but it doesn't disclose critical traits like whether this requires specific permissions, if it's idempotent, what happens on conflicts, or if there are rate limits. For a mutation tool with zero 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.

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's action without unnecessary words. It's front-loaded with the key verb and resource, making it easy to parse quickly. Every part of the sentence earns its place by conveying the core functionality.

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 of a mutation tool with 1 parameter (but nested objects), 0% schema description coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain return values, error conditions, or behavioral nuances, leaving the agent with insufficient information to use the tool effectively in context with siblings like 'delete_entities' or 'read_graph'.

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

Parameters2/5

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

The input schema has 0% description coverage, meaning parameter details like 'entities', 'entityType', 'name', and 'observations' are undocumented in the schema. The description only mentions 'multiple new entities' without explaining what an entity consists of or how parameters map to the creation process. It adds minimal value beyond the schema, failing to compensate for the coverage gap.

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 verb 'Create' and the resource 'multiple new entities in the knowledge graph', making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'create_relations' or 'add_observations', which would require more specificity about what constitutes an 'entity' versus other graph elements.

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?

The description provides no guidance on when to use this tool versus alternatives like 'create_relations' or 'add_observations'. It mentions 'multiple new entities' but doesn't clarify prerequisites, such as whether entities must be unique or if this is for batch creation versus single operations. Without context on alternatives or exclusions, usage is implied rather than explicit.

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

Related 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/StevenWangler/mcp-memory-server'

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