Skip to main content
Glama
TAgents

Planning System MCP Server

by TAgents

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
NameRequiredDescriptionDefault
plan_idYesPlan ID
node_idYesNode 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"]
      }
    },
  • 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`
      });
    }
  • 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}`);
    }

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