Skip to main content
Glama
StevenWangler

MCP Memory Server

delete_entities

Remove specified entities and their relations from the MCP Memory Server’s knowledge graph to maintain accurate and up-to-date data for large language models.

Instructions

Delete multiple entities and their associated relations from the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityNamesYesAn array of entity names to delete

Implementation Reference

  • The core implementation of delete_entities in KnowledgeGraphManager class. Deletes specified entities and all relations connected to them from the persistent knowledge graph.
    async deleteEntities(entityNames: string[]): Promise<void> {
      const graph = await this.loadGraph();
      graph.entities = graph.entities.filter(e => !entityNames.includes(e.name));
      graph.relations = graph.relations.filter(r => !entityNames.includes(r.from) && !entityNames.includes(r.to));
      await this.saveGraph(graph);
    }
  • Input schema definition for the delete_entities tool, specifying an array of entity names.
    inputSchema: {
      type: "object",
      properties: {
        entityNames: { 
          type: "array", 
          items: { type: "string" },
          description: "An array of entity names to delete" 
        },
      },
      required: ["entityNames"],
    },
  • src/index.ts:275-289 (registration)
    Tool registration in the listTools response, including name, description, and input schema.
    {
      name: "delete_entities",
      description: "Delete multiple entities and their associated relations from the knowledge graph",
      inputSchema: {
        type: "object",
        properties: {
          entityNames: { 
            type: "array", 
            items: { type: "string" },
            description: "An array of entity names to delete" 
          },
        },
        required: ["entityNames"],
      },
    },
  • src/index.ts:390-392 (registration)
    Dispatch handler in the CallToolRequestSchema switch statement that invokes the deleteEntities method.
    case "delete_entities":
      await knowledgeGraphManager.deleteEntities(args.entityNames as string[]);
      return { content: [{ type: "text", text: "Entities deleted successfully" }] };
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. While 'Delete' implies a destructive operation, the description doesn't specify whether deletions are permanent, reversible, require specific permissions, have confirmation steps, or affect system state beyond the stated entities and relations. This leaves significant behavioral gaps for a destructive tool.

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 states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the core functionality, making it easy to understand at a glance.

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 destructive tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address important contextual aspects like deletion permanence, error conditions, confirmation requirements, or what happens to orphaned relations. The combination of destructive operation with minimal behavioral disclosure creates significant gaps.

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 100%, with the single parameter 'entityNames' clearly documented as 'An array of entity names to delete'. The description adds no additional parameter semantics beyond what the schema already provides, which is adequate but not additive given the comprehensive schema coverage.

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 ('Delete') and target ('multiple entities and their associated relations from the knowledge graph'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like delete_observations or delete_relations, which handle different resource types in the same system.

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 delete_observations or delete_relations, nor does it mention prerequisites or conditions for use. It simply 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

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