Skip to main content
Glama
BRO3886

Memory Custom

by BRO3886

delete_observations

Remove specific observations from entities in a knowledge graph to maintain accurate and relevant data.

Instructions

Delete specific observations from entities in the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deletionsYes
memoryFilePathYesThe path to the memory file

Implementation Reference

  • The handler function in KnowledgeGraphManager that deletes specific observations from the specified entities in the knowledge graph by loading the graph, filtering out the observations, and saving the updated graph.
    async deleteObservations(
      deletions: { entityName: string; observations: string[] }[],
      filepath: string
    ): Promise<void> {
      await this.setMemoryFilePath(filepath);
      const graph = await this.loadGraph();
      deletions.forEach((d) => {
        const entity = graph.entities.find((e) => e.name === d.entityName);
        if (entity) {
          entity.observations = entity.observations.filter(
            (o) => !d.observations.includes(o)
          );
        }
      });
      await this.saveGraph(graph);
    }
  • Input schema definition for the delete_observations tool, specifying the structure of deletions array and memoryFilePath.
      name: "delete_observations",
      description:
        "Delete specific observations from entities in the knowledge graph",
      inputSchema: {
        type: "object",
        properties: {
          deletions: {
            type: "array",
            items: {
              type: "object",
              properties: {
                entityName: {
                  type: "string",
                  description:
                    "The name of the entity containing the observations",
                },
                observations: {
                  type: "array",
                  items: { type: "string" },
                  description: "An array of observations to delete",
                },
              },
              required: ["entityName", "observations"],
            },
          },
          memoryFilePath: {
            type: "string",
            description: "The path to the memory file",
          },
        },
        required: ["deletions", "memoryFilePath"],
      },
    },
  • index.ts:661-668 (registration)
    Registration of the tool handler in the CallToolRequestSchema switch statement, dispatching to the KnowledgeGraphManager.deleteObservations method.
    case "delete_observations":
      await knowledgeGraphManager.deleteObservations(
        args.deletions as { entityName: string; observations: string[] }[],
        args.memoryFilePath as string
      );
      return {
        content: [{ type: "text", text: "Observations 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 full burden for behavioral disclosure. It states the tool deletes observations, implying a destructive mutation, but doesn't specify if deletions are permanent, require specific permissions, or have side effects like cascading changes. This leaves critical behavioral traits undocumented for a destructive operation.

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 front-loads the core action and target without unnecessary words. Every part earns its place by concisely conveying the tool's purpose, making it easy for an agent 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 as a destructive mutation with no annotations, no output schema, and incomplete parameter documentation (50% coverage), the description is insufficient. It lacks details on behavior, return values, error handling, or how it integrates with sibling tools, leaving gaps for effective agent 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 50%, with parameters 'deletions' and 'memoryFilePath' documented in the schema but not in the description. The description doesn't add meaning beyond the schema, such as explaining what 'observations' entail or how 'memoryFilePath' relates to the knowledge graph. Baseline 3 is appropriate as the schema provides some coverage without description enhancement.

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 ('specific observations from entities in the knowledge graph'), providing a specific verb+resource combination. However, it doesn't explicitly distinguish this from sibling tools like 'delete_entities' or 'delete_relations', which would require mentioning it only removes observations rather than entire entities or relationships.

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 doesn't mention prerequisites like needing existing entities or observations, nor does it compare to siblings such as 'delete_entities' for broader deletions or 'add_observations' for additions, leaving the agent without contextual usage cues.

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