Skip to main content
Glama
TAgents

Planning System MCP Server

by TAgents

update_plan

Modify existing plans by updating titles, descriptions, or statuses to reflect project changes and maintain accurate planning documentation.

Instructions

Update an existing plan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
plan_idYesPlan ID
titleNoNew plan title
descriptionNoNew plan description
statusNoNew plan status

Implementation Reference

  • Handler for the 'update_plan' tool call. Extracts plan_id and other update data from input arguments, calls the API client's updatePlan method, and formats the response.
    if (name === "update_plan") {
      const { plan_id, ...planData } = args;
      const result = await apiClient.plans.updatePlan(plan_id, planData);
      return formatResponse(result);
    }
  • Input schema and tool specification for 'update_plan', including name, description, properties (plan_id required, optional title/desc/status), used for registration and validation.
      name: "update_plan",
      description: "Update an existing plan",
      inputSchema: {
        type: "object",
        properties: {
          plan_id: { type: "string", description: "Plan ID" },
          title: { type: "string", description: "New plan title" },
          description: { type: "string", description: "New plan description" },
          status: { 
            type: "string", 
            description: "New plan status",
            enum: ["draft", "active", "completed", "archived"]
          }
        },
        required: ["plan_id"]
      }
    },
  • src/tools.js:58-428 (registration)
    The 'update_plan' tool is registered by inclusion in the tools array returned by the ListToolsRequestSchema handler.
    tools: [
      // ===== UNIFIED SEARCH TOOL =====
      {
        name: "search",
        description: "Universal search tool for plans, nodes, and content",
        inputSchema: {
          type: "object",
          properties: {
            scope: { 
              type: "string",
              description: "Search scope",
              enum: ["global", "plans", "plan", "node"],
              default: "global"
            },
            scope_id: { 
              type: "string", 
              description: "Plan ID (if scope is 'plan') or Node ID (if scope is 'node')"
            },
            query: { 
              type: "string", 
              description: "Search query"
            },
            filters: {
              type: "object",
              description: "Optional filters",
              properties: {
                status: { 
                  type: "string",
                  description: "Filter by status",
                  enum: ["draft", "active", "completed", "archived", "not_started", "in_progress", "blocked"]
                },
                type: {
                  type: "string",
                  description: "Filter by type",
                  enum: ["plan", "node", "phase", "task", "milestone", "artifact", "log"]
                },
                limit: {
                  type: "integer",
                  description: "Maximum number of results",
                  default: 20
                }
              }
            }
          },
          required: ["query"]
        }
      },
      
      // ===== PLAN MANAGEMENT TOOLS =====
      {
        name: "list_plans",
        description: "List all plans or filter by status",
        inputSchema: {
          type: "object",
          properties: {
            status: { 
              type: "string", 
              description: "Optional filter by plan status",
              enum: ["draft", "active", "completed", "archived"]
            }
          }
        }
      },
      {
        name: "create_plan",
        description: "Create a new plan",
        inputSchema: {
          type: "object",
          properties: {
            title: { type: "string", description: "Plan title" },
            description: { type: "string", description: "Plan description" },
            status: { 
              type: "string", 
              description: "Plan status",
              enum: ["draft", "active", "completed", "archived"],
              default: "draft"
            }
          },
          required: ["title"]
        }
      },
      {
        name: "update_plan",
        description: "Update an existing plan",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID" },
            title: { type: "string", description: "New plan title" },
            description: { type: "string", description: "New plan description" },
            status: { 
              type: "string", 
              description: "New plan status",
              enum: ["draft", "active", "completed", "archived"]
            }
          },
          required: ["plan_id"]
        }
      },
      {
        name: "delete_plan",
        description: "Delete a plan",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID to delete" }
          },
          required: ["plan_id"]
        }
      },
      
      // ===== NODE MANAGEMENT TOOLS =====
      {
        name: "create_node",
        description: "Create a new node in a plan",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID" },
            parent_id: { type: "string", description: "Parent node ID (optional, defaults to root)" },
            node_type: { 
              type: "string", 
              description: "Node type",
              enum: ["phase", "task", "milestone"]
            },
            title: { type: "string", description: "Node title" },
            description: { type: "string", description: "Node description" },
            status: { 
              type: "string", 
              description: "Node status",
              enum: ["not_started", "in_progress", "completed", "blocked"],
              default: "not_started"
            },
            context: { type: "string", description: "Additional context for the node" },
            agent_instructions: { type: "string", description: "Instructions for AI agents working on this node" },
            acceptance_criteria: { type: "string", description: "Criteria for node completion" },
            due_date: { type: "string", description: "Due date (ISO format)" },
            metadata: { type: "object", description: "Additional metadata" }
          },
          required: ["plan_id", "node_type", "title"]
        }
      },
      {
        name: "update_node",
        description: "Update a node's properties",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID" },
            node_id: { type: "string", description: "Node ID" },
            title: { type: "string", description: "New node title" },
            description: { type: "string", description: "New node description" },
            status: { 
              type: "string", 
              description: "New node status",
              enum: ["not_started", "in_progress", "completed", "blocked"]
            },
            context: { type: "string", description: "New context" },
            agent_instructions: { type: "string", description: "New agent instructions" },
            acceptance_criteria: { type: "string", description: "New acceptance criteria" },
            due_date: { type: "string", description: "New due date (ISO format)" },
            metadata: { type: "object", description: "New metadata" }
          },
          required: ["plan_id", "node_id"]
        }
      },
      {
        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"]
        }
      },
      {
        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"]
        }
      },
      {
        name: "get_node_context",
        description: "Get comprehensive context for a node including children, logs, and artifacts",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID" },
            node_id: { type: "string", description: "Node ID" }
          },
          required: ["plan_id", "node_id"]
        }
      },
      {
        name: "get_node_ancestry",
        description: "Get the path from root to a specific node",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID" },
            node_id: { type: "string", description: "Node ID" }
          },
          required: ["plan_id", "node_id"]
        }
      },
      
      // ===== LOGGING TOOLS (Replaces Comments) =====
      {
        name: "add_log",
        description: "Add a log entry to a node (replaces comments)",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID" },
            node_id: { type: "string", description: "Node ID" },
            content: { type: "string", description: "Log content" },
            log_type: { 
              type: "string", 
              description: "Type of log entry",
              enum: ["progress", "reasoning", "challenge", "decision", "comment"],
              default: "comment"
            },
            tags: { 
              type: "array", 
              description: "Tags for categorizing the log entry",
              items: { type: "string" }
            }
          },
          required: ["plan_id", "node_id", "content"]
        }
      },
      {
        name: "get_logs",
        description: "Get log entries for a node",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID" },
            node_id: { type: "string", description: "Node ID" },
            log_type: { 
              type: "string", 
              description: "Filter by log type",
              enum: ["progress", "reasoning", "challenge", "decision", "comment"]
            },
            limit: {
              type: "integer",
              description: "Maximum number of logs to return",
              default: 50
            }
          },
          required: ["plan_id", "node_id"]
        }
      },
      
      // ===== ARTIFACT MANAGEMENT =====
      {
        name: "manage_artifact",
        description: "Add, get, or search for artifacts",
        inputSchema: {
          type: "object",
          properties: {
            action: {
              type: "string",
              description: "Action to perform",
              enum: ["add", "get", "search", "list"]
            },
            plan_id: { type: "string", description: "Plan ID" },
            node_id: { type: "string", description: "Node ID" },
            artifact_id: { type: "string", description: "Artifact ID (for 'get' action)" },
            name: { type: "string", description: "Artifact name (for 'add' or 'search')" },
            content_type: { type: "string", description: "Content MIME type (for 'add')" },
            url: { type: "string", description: "URL where artifact can be accessed (for 'add')" },
            metadata: { type: "object", description: "Additional metadata (for 'add')" }
          },
          required: ["action", "plan_id", "node_id"]
        }
      },
      
      // ===== BATCH OPERATIONS =====
      {
        name: "batch_update_nodes",
        description: "Update multiple nodes at once",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID" },
            updates: {
              type: "array",
              description: "List of node updates",
              items: {
                type: "object",
                properties: {
                  node_id: { type: "string", description: "Node ID" },
                  status: { 
                    type: "string",
                    enum: ["not_started", "in_progress", "completed", "blocked"]
                  },
                  title: { type: "string" },
                  description: { type: "string" }
                },
                required: ["node_id"]
              }
            }
          },
          required: ["plan_id", "updates"]
        }
      },
      {
        name: "batch_get_artifacts",
        description: "Get multiple artifacts at once",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID" },
            artifact_requests: {
              type: "array",
              description: "List of artifact requests",
              items: {
                type: "object",
                properties: {
                  node_id: { type: "string", description: "Node ID" },
                  artifact_id: { type: "string", description: "Artifact ID" }
                },
                required: ["node_id", "artifact_id"]
              }
            }
          },
          required: ["plan_id", "artifact_requests"]
        }
      },
      
      // ===== PLAN STRUCTURE & SUMMARY =====
      {
        name: "get_plan_structure",
        description: "Get the complete hierarchical structure of a plan",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID" },
            include_details: { 
              type: "boolean", 
              description: "Include full node details",
              default: false
            }
          },
          required: ["plan_id"]
        }
      },
      {
        name: "get_plan_summary",
        description: "Get a comprehensive summary with statistics",
        inputSchema: {
          type: "object",
          properties: {
            plan_id: { type: "string", description: "Plan ID" }
          },
          required: ["plan_id"]
        }
      }
    ]
  • API client helper function that sends a PUT request to /plans/{planId} with the plan update data.
    updatePlan: async (planId, planData) => {
      const response = await apiClient.put(`/plans/${planId}`, planData);
      return response.data;
    },

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