delete_node
Remove a node and its child elements from a hierarchical plan to maintain organized project structures.
Instructions
Delete a node and all its children
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan_id | Yes | Plan ID | |
| node_id | Yes | Node ID to delete |
Implementation Reference
- src/tools.js:560-567 (handler)The main tool handler that checks the tool name, extracts plan_id and node_id from arguments, calls the API client's deleteNode method, and returns a formatted success response.if (name === "delete_node") { const { plan_id, node_id } = args; await apiClient.nodes.deleteNode(plan_id, node_id); return formatResponse({ success: true, message: `Node ${node_id} and its children deleted successfully` }); }
- src/tools.js:225-235 (registration)The tool registration in the list of tools returned by the ListToolsRequestHandler, including name, description, and input schema.name: "delete_node", description: "Delete a node and all its children", inputSchema: { type: "object", properties: { plan_id: { type: "string", description: "Plan ID" }, node_id: { type: "string", description: "Node ID to delete" } }, required: ["plan_id", "node_id"] } },
- src/tools.js:227-234 (schema)The input schema defining the required plan_id and node_id parameters for the delete_node tool.inputSchema: { type: "object", properties: { plan_id: { type: "string", description: "Plan ID" }, node_id: { type: "string", description: "Node ID to delete" } }, required: ["plan_id", "node_id"] }
- src/api-client.js:172-174 (helper)API client helper method that performs the actual HTTP DELETE request to remove the node from the backend API.deleteNode: async (planId, nodeId) => { await apiClient.delete(`/plans/${planId}/nodes/${nodeId}`); }