Implement analyze-complexity MCP command for analyzing task complexity

This commit is contained in:
Eyal Toledano
2025-03-31 13:04:53 -04:00
parent 1679075b6b
commit 0b7b395aa4
7 changed files with 153 additions and 4 deletions

View File

@@ -703,7 +703,7 @@ Following MCP implementation standards:
- Unit test for removeSubtaskDirect.js
- Integration test for MCP tool
## 28. Implement analyze MCP command [pending]
## 28. Implement analyze MCP command [done]
### Dependencies: None
### Description: Create direct function wrapper and MCP tool for analyzing task complexity.
### Details:

View File

@@ -1600,7 +1600,7 @@
"title": "Implement analyze MCP command",
"description": "Create direct function wrapper and MCP tool for analyzing task complexity.",
"details": "Following MCP implementation standards:\n\n1. Create analyzeTaskComplexityDirect.js in mcp-server/src/core/direct-functions/:\n - Import analyzeTaskComplexity from task-manager.js\n - Handle file paths using findTasksJsonPath utility\n - Process arguments: taskId\n - Validate inputs and handle errors with try/catch\n - Return standardized { success, data/error } object\n\n2. Export from task-master-core.js:\n - Import the function from its file\n - Add to directFunctions map\n\n3. Create analyze.js MCP tool in mcp-server/src/tools/:\n - Import z from zod for parameter schema\n - Import executeMCPToolAction from ./utils.js\n - Import analyzeTaskComplexityDirect from task-master-core.js\n - Define parameters matching CLI options using zod schema\n - Implement registerAnalyzeTool(server) with server.addTool\n - Use executeMCPToolAction in execute method\n\n4. Register in tools/index.js with tool name 'analyze'\n\n5. Add to .cursor/mcp.json with appropriate schema\n\n6. Write tests following testing guidelines:\n - Unit test for analyzeTaskComplexityDirect.js\n - Integration test for MCP tool",
"status": "pending",
"status": "done",
"dependencies": [],
"parentTaskId": 23
},