delete_node
Remove a node permanently from the graph. Optionally delete all connected edges simultaneously, or fail if edges exist.
Instructions
Delete a node from the graph.
Use this tool when: you need to remove a node permanently. Do NOT use for: updating properties (use update_node) or deleting edges only (use delete_edge).
Args: node_id: The ID of the node to delete. detach: If True (default), also delete all edges connected to this node (like DETACH DELETE in Cypher). If False, fail if the node has any connected edges.
Returns: Confirmation message on success, or an error message.
Examples: delete_node(42) # detach delete (remove edges too) delete_node(42, detach=False) # fail if edges exist
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes | ||
| detach | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |