From 6611883738d8b3897ba5a5137352df2a14e984ff Mon Sep 17 00:00:00 2001 From: Amolith Date: Sat, 6 Sep 2025 16:01:57 -0600 Subject: [PATCH] chore: remove prefix --- AGENTS.md | 14 ++++----- README.md | 14 ++++----- cmd/planning-mcp-server/main.go | 12 ++++---- internal/mcp/server.go | 54 ++++++++++++++++----------------- internal/mcp/types.go | 12 ++++---- 5 files changed, 53 insertions(+), 53 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f32a8bfb9fe5684e19469b03e1b2e9b65759ae97..3099b30f5dfb96044a6dbbcb5226e1c39dda0e62 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -61,18 +61,18 @@ The project requires license headers (SPDX format) on all source files and uses - `☒` failed - `⊗` cancelled -**Task List Legend**: The `project_management__get_tasks()` method includes a legend showing status indicators. The legend format is "Legend: ☐ pending ⟳ in progress ☑ completed" and only includes the cancelled icon (⊗) and failed icon (☒) if there are actually cancelled or failed tasks in the current list. +**Task List Legend**: The `get_tasks()` method includes a legend showing status indicators. The legend format is "Legend: ☐ pending ⟳ in progress ☑ completed" and only includes the cancelled icon (⊗) and failed icon (☒) if there are actually cancelled or failed tasks in the current list. ### MCP Tool Implementation The server exposes six MCP tools that map directly to planning manager methods: -- `project_management__set_goal(title: string, description: string)`: Sets initial goal with title and description (both required). Returns error if goal already exists. -- `project_management__change_goal(title: string, description: string, reason: string)`: Changes existing goal (all parameters required). Only used when operator explicitly requests clearing/changing the goal. -- `project_management__add_tasks(tasks: []TaskInput)`: Batch task creation with duplicate detection. Each task requires `title` (required) and `description` (optional). Encourages breaking tasks down into smallest units of work and regular progress tracking. Output behavior depends on existing tasks: shows verbose instructions + task list when no tasks existed previously, shows brief task list (like `project_management__get_tasks`) when tasks already existed. -- `project_management__get_tasks(status: string)`: Returns markdown-formatted task list with optional status filter (all, pending, in_progress, completed, cancelled, failed). Default is "all". Should be called frequently to stay organized. -- `project_management__update_task_statuses(tasks: []TaskUpdate)`: Updates status of one or more tasks and returns full list. Never cancels tasks autonomously - marks as failed on errors and asks operator for guidance. -- `project_management__delete_tasks(task_ids: []string)`: Deletes one or more tasks by their IDs. Only used when operator explicitly requests clearing the board. Otherwise, tasks should be marked as cancelled/failed. Returns the resulting task list. +- `set_goal(title: string, description: string)`: Sets initial goal with title and description (both required). Returns error if goal already exists. +- `change_goal(title: string, description: string, reason: string)`: Changes existing goal (all parameters required). Only used when operator explicitly requests clearing/changing the goal. +- `add_tasks(tasks: []TaskInput)`: Batch task creation with duplicate detection. Each task requires `title` (required) and `description` (optional). Encourages breaking tasks down into smallest units of work and regular progress tracking. Output behavior depends on existing tasks: shows verbose instructions + task list when no tasks existed previously, shows brief task list (like `get_tasks`) when tasks already existed. +- `get_tasks(status: string)`: Returns markdown-formatted task list with optional status filter (all, pending, in_progress, completed, cancelled, failed). Default is "all". Should be called frequently to stay organized. +- `update_task_statuses(tasks: []TaskUpdate)`: Updates status of one or more tasks and returns full list. Never cancels tasks autonomously - marks as failed on errors and asks operator for guidance. +- `delete_tasks(task_ids: []string)`: Deletes one or more tasks by their IDs. Only used when operator explicitly requests clearing the board. Otherwise, tasks should be marked as cancelled/failed. Returns the resulting task list. ### Configuration System diff --git a/README.md b/README.md index de2f9e113f0edb10b9ae38ff685229a0f31a908c..5386710986ecfa2c483bb0cadbabf0fdcca28939 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,12 @@ This MCP server enables your AI assistant to: The server provides six essential planning tools: -- **`project_management__set_goal`**: Set the initial goal for your planning session (title and description required) -- **`project_management__change_goal`**: Change an existing goal with a required reason for the change -- **`project_management__add_tasks`**: Add one or more tasks to work on. Break tasks down into the smallest units of work possible and track progress. -- **`project_management__get_tasks`**: Get task list with optional status filtering and indicators. Call frequently to stay organized. -- **`project_management__update_task_statuses`**: Update the status of one or more tasks. Maintain your planning workflow by updating statuses regularly. -- **`project_management__delete_tasks`**: Delete one or more tasks by their IDs and return the updated task list. +- **`set_goal`**: Set the initial goal for your planning session (title and description required) +- **`change_goal`**: Change an existing goal with a required reason for the change +- **`add_tasks`**: Add one or more tasks to work on. Break tasks down into the smallest units of work possible and track progress. +- **`get_tasks`**: Get task list with optional status filtering and indicators. Call frequently to stay organized. +- **`update_task_statuses`**: Update the status of one or more tasks. Maintain your planning workflow by updating statuses regularly. +- **`delete_tasks`**: Delete one or more tasks by their IDs and return the updated task list. ## Installation @@ -105,7 +105,7 @@ When you first add tasks to an empty planning session, the tool provides guidanc When adding tasks to an existing planning session, the tool keeps things brief: - Adds your tasks seamlessly -- Shows your updated task list (same format as `project_management__get_tasks`) +- Shows your updated task list (same format as `get_tasks`) - No repetitive instructions - just your updated plan ### Tracking Progress diff --git a/cmd/planning-mcp-server/main.go b/cmd/planning-mcp-server/main.go index d559fe554766ef70421ce724bc81c1ae77fbde3e..0bed9fde0971d564ec19ae0143a8921338628a29 100644 --- a/cmd/planning-mcp-server/main.go +++ b/cmd/planning-mcp-server/main.go @@ -51,12 +51,12 @@ func run() error { Long: `A Model Context Protocol (MCP) server that provides planning tools for LLMs. The server provides tools for goal setting, task management, and progress tracking: -- project_management__set_goal: Set initial goal with title and description -- project_management__change_goal: Change existing goal with a reason -- project_management__add_tasks: Add one or more tasks to work on -- project_management__get_tasks: Get current task list with status indicators -- project_management__update_task_statuses: Update the status of one or more tasks -- project_management__delete_tasks: Delete one or more tasks by their IDs`, +- set_goal: Set initial goal with title and description +- change_goal: Change existing goal with a reason +- add_tasks: Add one or more tasks to work on +- get_tasks: Get current task list with status indicators +- update_task_statuses: Update the status of one or more tasks +- delete_tasks: Delete one or more tasks by their IDs`, SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { if showVersion { diff --git a/internal/mcp/server.go b/internal/mcp/server.go index 793e896b17a8bd4fe33fee139aed2cd7a8ac949e..1d724a9e36b8de8bc0931d634bb2beadcd8c614d 100644 --- a/internal/mcp/server.go +++ b/internal/mcp/server.go @@ -60,9 +60,9 @@ func New(cfg *config.Config, logger *slog.Logger, planner *planning.Manager) (*S // registerTools registers all planning tools func (s *Server) registerTools(mcpServer *server.MCPServer) { - // Register project_management__set_goal tool - setGoalTool := mcp.NewTool("project_management__set_goal", - mcp.WithDescription("Set the initial project goal. Returns error if already set and encourages calling project_management__change_goal"), + // Register set_goal tool + setGoalTool := mcp.NewTool("set_goal", + mcp.WithDescription("Set the initial project goal. Returns error if already set and encourages calling change_goal"), mcp.WithString("title", mcp.Required(), mcp.Description("The goal title"), @@ -74,8 +74,8 @@ func (s *Server) registerTools(mcpServer *server.MCPServer) { ) mcpServer.AddTool(setGoalTool, s.handleSetGoal) - // Register project_management__change_goal tool - changeGoalTool := mcp.NewTool("project_management__change_goal", + // Register change_goal tool + changeGoalTool := mcp.NewTool("change_goal", mcp.WithDescription("Change an existing project goal. Only use if the operator explicitly requests clearing the board/list/goal and doing something else"), mcp.WithString("title", mcp.Required(), @@ -92,9 +92,9 @@ func (s *Server) registerTools(mcpServer *server.MCPServer) { ) mcpServer.AddTool(changeGoalTool, s.handleChangeGoal) - // Register project_management__add_tasks tool - addTasksTool := mcp.NewTool("project_management__add_tasks", - mcp.WithDescription("Add one or more tasks to work on. Break tasks down into the smallest units of work possible. If there are more than one, use me to keep track of where you are in fulfilling the user's request. Call project_management__get_tasks often to stay on track."), + // Register add_tasks tool + addTasksTool := mcp.NewTool("add_tasks", + mcp.WithDescription("Add one or more tasks to work on. Break tasks down into the smallest units of work possible. If there are more than one, use me to keep track of where you are in fulfilling the user's request. Call get_tasks often to stay on track."), mcp.WithArray("tasks", mcp.Required(), mcp.Description("Array of tasks to add"), @@ -116,8 +116,8 @@ func (s *Server) registerTools(mcpServer *server.MCPServer) { ) mcpServer.AddTool(addTasksTool, s.handleAddTasks) - // Register project_management__get_tasks tool - getTasksTool := mcp.NewTool("project_management__get_tasks", + // Register get_tasks tool + getTasksTool := mcp.NewTool("get_tasks", mcp.WithDescription("Get task list with status indicators. Call this frequently to stay organized and track your progress. Prefer to call with 'all' or 'pending', only 'completed' if unsure, only 'cancelled' or 'failed' if the operator explicitly asks."), mcp.WithString("status", mcp.Description("Filter tasks by status: all, pending, in_progress, completed, cancelled, or failed (default: all)"), @@ -125,8 +125,8 @@ func (s *Server) registerTools(mcpServer *server.MCPServer) { ) mcpServer.AddTool(getTasksTool, s.handleGetTasks) - // Register project_management__update_task_statuses tool - updateTasksTool := mcp.NewTool("project_management__update_task_statuses", + // Register update_task_statuses tool + updateTasksTool := mcp.NewTool("update_task_statuses", mcp.WithDescription("Update the status of one or more tasks. Never cancel tasks on your own. If something doesn't work or there's an error, mark it failed and decide whether to ask the operator for guidance or continue on your own. Usually prefer to ask the operator."), mcp.WithArray("tasks", mcp.Required(), @@ -149,8 +149,8 @@ func (s *Server) registerTools(mcpServer *server.MCPServer) { ) mcpServer.AddTool(updateTasksTool, s.handleUpdateTaskStatuses) - // Register project_management__delete_tasks tool - deleteTasksTool := mcp.NewTool("project_management__delete_tasks", + // Register delete_tasks tool + deleteTasksTool := mcp.NewTool("delete_tasks", mcp.WithDescription("Delete one or more tasks by their IDs. Only use if the operator explicitly requests clearing the board/list/goal and doing something else. Otherwise, update statuses to 'cancelled', 'failed', etc. as appropriate. After deletion, respond with the resulting task list."), mcp.WithArray("task_ids", mcp.Required(), @@ -163,9 +163,9 @@ func (s *Server) registerTools(mcpServer *server.MCPServer) { mcpServer.AddTool(deleteTasksTool, s.handleDeleteTasks) } -// handleSetGoal handles the project_management__set_goal tool call +// handleSetGoal handles the set_goal tool call func (s *Server) handleSetGoal(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { - s.logger.Info("Received project_management__set_goal tool call") + s.logger.Info("Received set_goal tool call") // Parse request var req SetGoalRequest @@ -189,9 +189,9 @@ func (s *Server) handleSetGoal(ctx context.Context, request mcp.CallToolRequest) return createSuccessResult(response), nil } -// handleChangeGoal handles the project_management__change_goal tool call +// handleChangeGoal handles the change_goal tool call func (s *Server) handleChangeGoal(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { - s.logger.Info("Received project_management__change_goal tool call") + s.logger.Info("Received change_goal tool call") // Parse request var req ChangeGoalRequest @@ -215,9 +215,9 @@ func (s *Server) handleChangeGoal(ctx context.Context, request mcp.CallToolReque return createSuccessResult(response), nil } -// handleAddTasks handles the project_management__add_tasks tool call +// handleAddTasks handles the add_tasks tool call func (s *Server) handleAddTasks(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { - s.logger.Info("Received project_management__add_tasks tool call") + s.logger.Info("Received add_tasks tool call") // Parse request var req AddTasksRequest @@ -251,16 +251,16 @@ func (s *Server) handleAddTasks(ctx context.Context, request mcp.CallToolRequest var response string if !result.HadExistingTasks { - response = fmt.Sprintf("Tasks added successfully! Get started on your first one once you're ready, and call `project_management__get_tasks` frequently to remind yourself where you are in the process.\n\n%s", taskList) + response = fmt.Sprintf("Tasks added successfully! Get started on your first one once you're ready, and call `get_tasks` frequently to remind yourself where you are in the process.\n\n%s", taskList) } else { response = taskList } return createSuccessResult(response), nil } -// handleGetTasks handles the project_management__get_tasks tool call +// handleGetTasks handles the get_tasks tool call func (s *Server) handleGetTasks(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { - s.logger.Info("Received project_management__get_tasks tool call") + s.logger.Info("Received get_tasks tool call") // Parse request var req GetTasksRequest @@ -289,9 +289,9 @@ func (s *Server) handleGetTasks(ctx context.Context, request mcp.CallToolRequest return createSuccessResult(taskList), nil } -// handleUpdateTaskStatuses handles the project_management__update_task_statuses tool call +// handleUpdateTaskStatuses handles the update_task_statuses tool call func (s *Server) handleUpdateTaskStatuses(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { - s.logger.Info("Received project_management__update_task_statuses tool call") + s.logger.Info("Received update_task_statuses tool call") // Parse request var req UpdateTaskStatusesRequest @@ -324,9 +324,9 @@ func (s *Server) handleUpdateTaskStatuses(ctx context.Context, request mcp.CallT return createSuccessResult(taskList), nil } -// handleDeleteTasks handles the project_management__delete_tasks tool call +// handleDeleteTasks handles the delete_tasks tool call func (s *Server) handleDeleteTasks(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) { - s.logger.Info("Received project_management__delete_tasks tool call") + s.logger.Info("Received delete_tasks tool call") // Parse request var req DeleteTasksRequest diff --git a/internal/mcp/types.go b/internal/mcp/types.go index 3a66a7de2403d9990e2ba799a3f36f4bf16f8a89..e73cd14cfe74a5ea44c008938bb95b27733b3315 100644 --- a/internal/mcp/types.go +++ b/internal/mcp/types.go @@ -11,13 +11,13 @@ import ( // Goal management requests -// SetGoalRequest represents the request structure for project_management__set_goal +// SetGoalRequest represents the request structure for set_goal type SetGoalRequest struct { Title string `json:"title" validate:"required"` Description string `json:"description" validate:"required"` } -// ChangeGoalRequest represents the request structure for project_management__change_goal +// ChangeGoalRequest represents the request structure for change_goal type ChangeGoalRequest struct { Title string `json:"title" validate:"required"` Description string `json:"description" validate:"required"` @@ -26,7 +26,7 @@ type ChangeGoalRequest struct { // Task management requests -// AddTasksRequest represents the request structure for project_management__add_tasks +// AddTasksRequest represents the request structure for add_tasks type AddTasksRequest struct { Tasks []MCPTaskInput `json:"tasks" validate:"required,min=1"` } @@ -37,12 +37,12 @@ type MCPTaskInput struct { Description string `json:"description"` } -// GetTasksRequest represents the request structure for project_management__get_tasks +// GetTasksRequest represents the request structure for get_tasks type GetTasksRequest struct { Status string `json:"status,omitempty"` } -// UpdateTaskStatusesRequest represents the request structure for project_management__update_task_statuses +// UpdateTaskStatusesRequest represents the request structure for update_task_statuses type UpdateTaskStatusesRequest struct { Tasks []MCPTaskUpdateInput `json:"tasks" validate:"required,min=1"` } @@ -53,7 +53,7 @@ type MCPTaskUpdateInput struct { Status string `json:"status" validate:"required,oneof=pending in_progress completed cancelled failed"` } -// DeleteTasksRequest represents the request structure for project_management__delete_tasks +// DeleteTasksRequest represents the request structure for delete_tasks type DeleteTasksRequest struct { TaskIDs []string `json:"task_ids" validate:"required,min=1"` }