Skip to main content
Glama
T1nker-1220

Knowledge Graph Memory Server

delete_observations

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

Instructions

Delete specific observations from entities in the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deletionsYes

Implementation Reference

  • The core handler function that implements the delete_observations tool logic. It loads the knowledge graph, removes the specified observations from the matching entities by filtering them out, and saves the updated graph.
    async deleteObservations(deletions: { entityName: string; observations: string[] }[]): Promise<void> { 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); }
  • The input schema definition for the delete_observations tool, specifying the expected structure of the deletions parameter as an array of objects with entityName and observations.
    { 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"], }, }, }, required: ["deletions"], }, },
  • index.ts:1232-1234 (registration)
    The switch case in the CallToolRequest handler that registers and dispatches the delete_observations tool call to the KnowledgeGraphManager's deleteObservations method.
    case "delete_observations": await knowledgeGraphManager.deleteObservations(args.deletions as { entityName: string; observations: string[] }[]); return { content: [{ type: "text", text: "Observations deleted successfully" }] };

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