Skip to main content
Glama
BRO3886

Memory Custom

by BRO3886

create_entities

Add multiple new entities to a knowledge graph by specifying names, types, and associated observations in a memory file.

Instructions

Create multiple new entities in the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entitiesYes
memoryFilePathYesThe path to the memory file

Implementation Reference

  • Core handler function in KnowledgeGraphManager that creates new entities by loading the graph from file, filtering out duplicates based on entity name, appending new entities, saving back to file, and returning the newly added entities.
    async createEntities(
      entities: Entity[],
      filepath: string
    ): Promise<Entity[]> {
      await this.setMemoryFilePath(filepath);
      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;
    }
  • Tool schema definition including name, description, and detailed input schema specifying the structure for entities array and memoryFilePath.
    {
      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"],
            },
          },
          memoryFilePath: {
            type: "string",
            description: "The path to the memory file",
          },
        },
        required: ["entities", "memoryFilePath"],
      },
    },
  • index.ts:602-617 (registration)
    Registration and dispatching logic in the CallToolRequestSchema handler that invokes the createEntities method with parsed arguments and formats the response as JSON text.
    case "create_entities":
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              await knowledgeGraphManager.createEntities(
                args.entities as Entity[],
                args.memoryFilePath as string
              ),
              null,
              2
            ),
          },
        ],
      };
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 indicates a write operation ('create') but doesn't mention permissions, side effects, error handling, or response format. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves beyond the basic action.

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 with zero wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place without being overly brief or verbose.

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?

For a mutation tool with no annotations, no output schema, and incomplete parameter documentation (50% coverage), the description is inadequate. It should explain more about the creation process, expected outcomes, or error conditions to help an agent use it correctly, given the complexity implied by batch entity creation.

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 50%, with the 'entities' parameter well-documented in the schema but 'memoryFilePath' lacking description. The tool description adds no parameter-specific information beyond what's implied by the name ('create multiple new entities'), so it doesn't compensate for the coverage gap. Baseline 3 is appropriate as the schema handles half the parameters adequately.

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 resource ('in the knowledge graph'), which provides a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'create_relations' or 'add_observations' beyond the basic resource difference, preventing a perfect score.

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 'add_observations' or 'create_relations', nor does it mention prerequisites, constraints, or typical scenarios for batch creation. It merely states what the tool does without contextual usage information.

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/BRO3886/mcp-memory-custom'

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