Skip to main content
Glama
T1nker-1220

Knowledge Graph Memory Server

delete_entities

Remove specified entities and their relationships from the knowledge graph to maintain accurate and relevant data.

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 handler function in KnowledgeGraphManager that executes the delete_entities tool logic: loads the graph, removes specified entities and their connected relations, then saves the updated 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 object with a required 'entityNames' array of strings.
    inputSchema: {
      type: "object",
      properties: {
        entityNames: {
          type: "array",
          items: { type: "string" },
          description: "An array of entity names to delete"
        },
      },
      required: ["entityNames"],
    },
  • index.ts:1000-1013 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema for delete_entities.
      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"],
      },
    },
  • index.ts:1229-1231 (registration)
    Dispatcher case in CallToolRequest handler that invokes the deleteEntities method and returns success response.
    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?

No annotations are provided, so the description carries the full burden. It states the tool deletes entities and relations, implying a destructive mutation, but lacks details on permissions, irreversibility, side effects, or error handling. This is inadequate for a destructive operation with zero annotation coverage.

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 redundancy. It is front-loaded and wastes no words, making it highly concise and well-structured.

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 insufficient. It lacks critical context such as confirmation prompts, return values, error cases, or impact on related data, leaving significant gaps for safe and effective use.

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 100%, with the parameter 'entityNames' well-documented in the schema. The description adds no additional meaning beyond implying the parameter is an array of entity names, which the schema already covers, so it meets the baseline for high 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'), which is specific and unambiguous. However, it does not explicitly differentiate from sibling tools like 'delete_observations' or 'delete_relations', which handle different resource types, so it misses full sibling distinction.

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. It does not mention prerequisites, exclusions, or compare with siblings like 'delete_observations' or 'delete_relations', leaving the agent without context for tool selection.

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/T1nker-1220/memories-with-lessons-mcp-server'

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