Skip to main content
Glama
TAgents

Planning System MCP Server

by TAgents

add_log

Add structured log entries to planning nodes to document progress, reasoning, challenges, decisions, or comments, replacing traditional comment systems.

Instructions

Add a log entry to a node (replaces comments)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
plan_idYesPlan ID
node_idYesNode ID
contentYesLog content
log_typeNoType of log entrycomment
tagsNoTags for categorizing the log entry

Implementation Reference

  • Handler logic for the 'add_log' MCP tool. Destructures input arguments, prepares logData, calls apiClient.logs.addLogEntry, and formats the response.
    if (name === "add_log") {
      const { plan_id, node_id, content, log_type = "comment", tags } = args;
      
      const logData = {
        content,
        log_type,
        tags
      };
      
      const result = await apiClient.logs.addLogEntry(plan_id, node_id, logData);
      return formatResponse(result);
    }
  • Input schema definition for the 'add_log' tool, defining parameters like plan_id, node_id, content, log_type, and tags.
      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"]
      }
    },
  • src/tools.js:276-299 (registration)
    Registration of the 'add_log' tool in the ListToolsRequestSchema handler's tools array.
    {
      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"]
      }
    },
  • Helper function in api-client.js that executes the actual HTTP POST request to add a log entry to the backend API.
    addLogEntry: async (planId, nodeId, logData) => {
      const response = await apiClient.post(`/plans/${planId}/nodes/${nodeId}/log`, logData);
      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