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
| Name | Required | Description | Default |
|---|---|---|---|
| plan_id | Yes | Plan ID | |
| node_id | Yes | Node ID | |
| content | Yes | Log content | |
| log_type | No | Type of log entry | comment |
| tags | No | Tags for categorizing the log entry |
Implementation Reference
- src/tools.js:621-632 (handler)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); }
- src/tools.js:277-299 (schema)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"] } },
- src/api-client.js:227-230 (helper)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; }