delete_node
Remove a node and its child elements from a hierarchical plan to maintain project structure and eliminate unnecessary components.
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:224-235 (registration)Registration of the 'delete_node' tool within the ListToolsRequestHandler response, defining its name, description, and input schema for MCP tool discovery.{ 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:560-567 (handler)The execution handler for the 'delete_node' tool within the CallToolRequestHandler. Extracts parameters, calls the API client to delete the node, and formats a 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/api-client.js:172-174 (helper)Helper method in the API client that wraps the axios DELETE request to remove the specified node from the plan.deleteNode: async (planId, nodeId) => { await apiClient.delete(`/plans/${planId}/nodes/${nodeId}`); }