Skip to main content
Glama
TAgents

Planning System MCP Server

by TAgents

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
NameRequiredDescriptionDefault
plan_idYesPlan ID
node_idYesNode ID to move
parent_idNoNew parent node ID
order_indexNoNew position index

Implementation Reference

  • Handler for move_node tool: Posts to dedicated move endpoint or falls back to updating parent_id and order_index on the node
    if (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"]
      }
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TAgents/agent-planner-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server