move_node
Reposition tasks or phases within hierarchical project plans by changing parent nodes or adjusting order positions to maintain organized workflows.
Instructions
Move a node to a different parent or position
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan_id | Yes | Plan ID | |
| node_id | Yes | Node ID to move | |
| parent_id | No | New parent node ID | |
| order_index | No | New position index |
Implementation Reference
- src/tools.js:569-596 (handler)Handler for move_node tool: Posts to dedicated move endpoint or falls back to updating parent_id and order_index on the nodeif (name === "move_node") { const { plan_id, node_id, parent_id, order_index } = args; try { // Call the move endpoint - using POST as per API definition const response = await apiClient.axiosInstance.post( `/plans/${plan_id}/nodes/${node_id}/move`, { parent_id: parent_id || null, order_index: order_index !== undefined ? order_index : null } ); return formatResponse(response.data); } catch (error) { // If endpoint still doesn't work, try updating the node directly if (error.response && error.response.status === 404) { console.error('Move endpoint not found, trying direct update'); // Fallback to updating the node's parent_id via regular update const updateResponse = await apiClient.nodes.updateNode(plan_id, node_id, { parent_id: parent_id || null, order_index: order_index !== undefined ? order_index : null }); return formatResponse(updateResponse); } throw error; } }
- src/tools.js:236-249 (registration)Registration of move_node tool in the tools list, including input schema definition{ name: "move_node", description: "Move a node to a different parent or position", inputSchema: { type: "object", properties: { plan_id: { type: "string", description: "Plan ID" }, node_id: { type: "string", description: "Node ID to move" }, parent_id: { type: "string", description: "New parent node ID" }, order_index: { type: "integer", description: "New position index" } }, required: ["plan_id", "node_id"] } },