delete_entity_edge
Remove connections between entities in graph memory by specifying the edge UUID to maintain clean data relationships.
Instructions
Delete an entity edge from the graph memory.
Args:
uuid: UUID of the entity edge to delete
Returns:
Success message dictionary
Example:
delete_entity_edge(uuid="edge-uuid-123")
@REQ: REQ-graphiti-chunk-mcp
@BP: BP-graphiti-chunk-mcp
@TASK: TASK-007-MCPTools
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes |
Implementation Reference
- rbt_mcp_server/server.py:187-205 (registration)MCP tool registration for 'delete_entity_edge' using @mcp.tool() decorator. Includes schema via function signature and docstring. Delegates to graphiti_tools.delete_entity_edge_impl.@mcp.tool() async def delete_entity_edge(uuid: str) -> Dict[str, str]: """ Delete an entity edge from the graph memory. Args: uuid: UUID of the entity edge to delete Returns: Success message dictionary Example: delete_entity_edge(uuid="edge-uuid-123") @REQ: REQ-graphiti-chunk-mcp @BP: BP-graphiti-chunk-mcp @TASK: TASK-007-MCPTools """ return await graphiti_tools.delete_entity_edge_impl(uuid=uuid)
- rbt_mcp_server/graphiti_tools.py:258-285 (handler)Main handler function that executes the tool logic: obtains GraphitiClient, calls delete_entity_edge on it, returns success message or raises ToolError.async def delete_entity_edge_impl(uuid: str) -> Dict[str, str]: """ Delete an entity edge from the graph memory. @REQ: REQ-graphiti-chunk-mcp @BP: BP-graphiti-chunk-mcp @TASK: TASK-007-MCPTools Args: uuid: UUID of the entity edge to delete Returns: Success message dictionary Raises: ToolError: If deletion operation fails """ try: client = get_graphiti_client() async with client: await client.delete_entity_edge(uuid) return {"message": f"Successfully deleted entity edge {uuid}"} except Exception as e: raise ToolError( "DELETE_ENTITY_EDGE_ERROR", f"Failed to delete entity edge: {str(e)}" ) from e
- GraphitiClient helper method that performs the database operation: calls self.graphiti.remove_edge(edge_uuid).async def delete_entity_edge(self, edge_uuid: str) -> bool: """ Delete an entity edge from Graphiti by its UUID. @REQ: REQ-graphiti-chunk-mcp @BP: BP-graphiti-chunk-mcp @TASK: TASK-007-MCPTools Args: edge_uuid: UUID of the entity edge to delete Returns: True if deletion was successful Raises: RuntimeError: If deletion fails """ try: logger.debug(f"Deleting entity edge: {edge_uuid}") # Use Graphiti's driver to delete the edge await self.graphiti.remove_edge(edge_uuid) logger.info(f"Entity edge deleted successfully: {edge_uuid}") return True except Exception as e: logger.error(f"Failed to delete entity edge {edge_uuid}: {e}") raise RuntimeError(f"Failed to delete entity edge: {e}") from e