refactor(mcp): Remove unused executeMCPToolAction utility
The function aimed to abstract the common flow within MCP tool methods (logging, calling direct function, handling result). However, the established pattern (e.g., in ) involves the method directly calling the function (which handles its own caching via ) and then passing the result to . This pattern is clear, functional, and leverages the core utilities effectively. Removing the unused simplifies , eliminates a redundant abstraction layer, and clarifies the standard implementation pattern for MCP tools.
This commit is contained in:
@@ -346,7 +346,7 @@ function listTasks(tasksPath, statusFilter, withSubtasks = false, outputFormat =
|
||||
### Details:
|
||||
1. Research and implement SSE protocol for the MCP server\n2. Create dedicated SSE endpoints for event streaming\n3. Implement event emitter pattern for internal event management\n4. Add support for different event types (task status, logs, errors)\n5. Implement client connection management with proper keep-alive handling\n6. Add filtering capabilities to allow subscribing to specific event types\n7. Create in-memory event buffer for clients reconnecting\n8. Document SSE endpoint usage and client implementation examples\n9. Add robust error handling for dropped connections\n10. Implement rate limiting and backpressure mechanisms\n11. Add authentication for SSE connections
|
||||
|
||||
## 16. Implement parse-prd MCP command [pending]
|
||||
## 16. Implement parse-prd MCP command [in-progress]
|
||||
### Dependencies: None
|
||||
### Description: Create direct function wrapper and MCP tool for parsing PRD documents to generate tasks.
|
||||
### Details:
|
||||
|
||||
@@ -1492,7 +1492,7 @@
|
||||
"title": "Implement parse-prd MCP command",
|
||||
"description": "Create direct function wrapper and MCP tool for parsing PRD documents to generate tasks.",
|
||||
"details": "Following MCP implementation standards:\\n\\n1. Create parsePRDDirect function in task-master-core.js:\\n - Import parsePRD from task-manager.js\\n - Handle file paths using findTasksJsonPath utility\\n - Process arguments: input file, output path, numTasks\\n - Validate inputs and handle errors with try/catch\\n - Return standardized { success, data/error } object\\n - Add to directFunctions map\\n\\n2. Create parse-prd.js MCP tool in mcp-server/src/tools/:\\n - Import z from zod for parameter schema\\n - Import executeMCPToolAction from ./utils.js\\n - Import parsePRDDirect from task-master-core.js\\n - Define parameters matching CLI options using zod schema\\n - Implement registerParsePRDTool(server) with server.addTool\\n - Use executeMCPToolAction in execute method\\n\\n3. Register in tools/index.js\\n\\n4. Add to .cursor/mcp.json with appropriate schema\\n\\n5. Write tests following testing guidelines:\\n - Unit test for parsePRDDirect\\n - Integration test for MCP tool",
|
||||
"status": "pending",
|
||||
"status": "in-progress",
|
||||
"dependencies": [],
|
||||
"parentTaskId": 23
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user