Skip to main content
Glama

delete_edges

Remove specific edges from a knowledge graph using an array of edge identifiers, including source, target, and edge type, within the MemoryMesh MCP server framework.

Instructions

Delete multiple edges from the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
edgesYesArray of edges to delete

Implementation Reference

  • The handler function executes the tool logic by deleting the specified edges using the knowledge graph manager and returns a formatted success response.
    case "delete_edges": await this.knowledgeGraphManager.deleteEdges(args.edges); return formatToolResponse({ actionTaken: "Deleted edges from knowledge graph" });
  • Defines the tool's metadata, description, and input schema which requires an array of edge objects each specifying from, to, and edgeType.
    { name: "delete_edges", description: "Delete multiple edges from the knowledge graph", inputSchema: { type: "object", properties: { edges: { type: "array", description: "Array of edges to delete", items: { type: "object", description: "Edge to delete", properties: { from: {type: "string", description: "The name of the node where the edge starts"}, to: {type: "string", description: "The name of the node where the edge ends"}, edgeType: {type: "string", description: "The type of the edge"}, }, required: ["from", "to", "edgeType"], }, }, }, required: ["edges"], }, },
  • Registers all static tools from allStaticTools (including delete_edges) into the central ToolsRegistry map for discovery and handling.
    // Register static tools allStaticTools.forEach(tool => { this.tools.set(tool.name, tool); });
  • Routes tool calls matching graph operations (including delete_edges) to the GraphToolHandler instance.
    if (toolName.match(/^(add|update|delete)_(nodes|edges)$/)) { return this.graphHandler;
  • Entry point for tool execution: retrieves the appropriate handler via factory and invokes its handleTool method.
    const handler = ToolHandlerFactory.getHandler(name); return await handler.handleTool(name, args);

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/CheMiguel23/MemoryMesh'

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