Skip to main content
Glama
yodakeisuke

Knowledge Graph Memory Server

by yodakeisuke

delete_observations

Remove specific observations from entities in the Knowledge Graph Memory Server to maintain accurate and up-to-date user information across chat interactions.

Instructions

Delete specific observations from entities in the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deletionsYes

Implementation Reference

  • The core handler function in KnowledgeGraphManager that executes the deletion of specific observations from entities in the knowledge graph by filtering and updating the 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); }
  • index.ts:453-476 (registration)
    Registration of the delete_observations tool in the tools list for ListToolsRequestSchema, including name, description, and input schema definition.
    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"], }, },
  • Input schema for validating arguments to the delete_observations tool.
    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"], },
  • Dispatcher logic in CallToolRequestSchema handler that invokes the deleteObservations method and returns success response.
    case "delete_observations": await knowledgeGraphManager.deleteObservations(args.deletions as { entityName: string; observations: string[] }[]); return createResponse("Observations deleted successfully");

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/yodakeisuke/mcp-memory-domain-knowledge'

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