Skip to main content
Glama
itseasy21

Knowledge Graph Memory Server

create_entities

Add multiple new entities to a knowledge graph by specifying names, types, and associated observations for persistent memory storage.

Instructions

Create multiple new entities in the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entitiesYes

Implementation Reference

  • index.ts:80-91 (handler)
    Core handler function in KnowledgeGraphManager that implements the logic for creating new entities: loads graph, filters out duplicates by name, adds createdAt and version, appends to graph, saves to file, returns new 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))
        .map(e => ({
          ...e,
          createdAt: new Date().toISOString(),
          version: e.version || 1
        }));
      graph.entities.push(...newEntities);
      await this.saveGraph(graph);
      return newEntities;
    }
  • index.ts:285-309 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name, description, and input schema for create_entities.
      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"],
      },
    },
  • MCP tool dispatch handler in CallToolRequestSchema that invokes the createEntities method with parsed arguments and formats response.
    case "create_entities":
      return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.createEntities(args.entities as Entity[]), null, 2) }] };
  • TypeScript interface defining the Entity type used as input for create_entities.
      name: string;
      entityType: string;
      observations: string[];
      createdAt: string;
      version: number;
    }
  • JSON Schema for input validation of create_entities tool, specifying structure of entities array.
    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"],
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates entities but doesn't mention permissions required, whether this is a write operation (implied but not explicit), potential side effects, error handling, or response format. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

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 purpose without any fluff or redundancy. It's front-loaded and appropriately sized for the complexity, making it easy to parse quickly.

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 tool's complexity (creating multiple entities in a knowledge graph), lack of annotations, no output schema, and 0% schema description coverage, the description is inadequate. It doesn't cover behavioral aspects, parameter meanings, or expected outcomes, leaving the agent with insufficient information to use the tool effectively beyond its basic intent.

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?

The schema description coverage is 0%, so the description must compensate, but it adds no information about the 'entities' parameter beyond what the schema name implies. The schema itself defines the structure (array of objects with name, entityType, observations), but the description doesn't explain what 'entities' means in context or provide examples, resulting in minimal added value.

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 ('create multiple new entities') and the target ('in the knowledge graph'), which is specific and unambiguous. However, it doesn't differentiate from sibling tools like 'create_relations' or 'update_entities', which would require more specific context about what entities are versus relations or updates.

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 such as 'update_entities' for modifying existing entities or 'create_relations' for linking entities. It lacks any context about prerequisites, timing, or exclusions, leaving the agent to infer usage from the tool name alone.

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/itseasy21/mcp-knowledge-graph'

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