delete_metadata
Remove specific metadata from nodes in the MemoryMesh knowledge graph. Input an array of deletions specifying node names and metadata items to clean up data efficiently.
Instructions
Delete specific metadata from nodes in the knowledge graph
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deletions | Yes | Array of metadata deletions |
Implementation Reference
- The core handler logic for the 'delete_metadata' tool, which invokes the underlying deleteMetadata method on the knowledge graph manager and formats the success response.case "delete_metadata": await this.knowledgeGraphManager.deleteMetadata(args.deletions); return formatToolResponse({ actionTaken: "Deleted metadata from nodes" });
- Defines the tool metadata including name, description, and input schema validation for the deletions parameter.{ name: "delete_metadata", description: "Delete specific metadata from nodes in the knowledge graph", inputSchema: { type: "object", properties: { deletions: { type: "array", description: "Array of metadata deletions", items: { type: "object", description: "Metadata deletion", properties: { nodeName: {type: "string", description: "The name of the node containing the metadata"}, metadata: { type: "array", items: {type: "string", description: "Metadata item to delete"}, description: "An array of metadata to delete" }, }, required: ["nodeName", "metadata"], }, }, }, required: ["deletions"], }, }
- src/integration/tools/registry/toolsRegistry.ts:42-45 (registration)Registers all static tools (including delete_metadata from staticTools.ts) into the central ToolsRegistry map during initialization.// Register static tools allStaticTools.forEach(tool => { this.tools.set(tool.name, tool); });
- Routes 'delete_metadata' tool calls to the appropriate MetadataToolHandler instance based on regex matching.if (toolName.match(/^(add|delete)_metadata$/)) { return this.metadataHandler;