mcp_plan_implementation
Convert feature requests into actionable implementation steps by analyzing requirements and codebase context to generate structured development plans.
Instructions
Turn a feature request into concrete implementation steps.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| feature | Yes | Feature description or requirement | |
| codebase | No | Brief description of existing codebase (optional) | |
| constraints | No | Technical constraints (optional) |
Implementation Reference
- src/tools/code-assistance.ts:794-857 (handler)The implementation of the `mcp_plan_implementation` tool handler inside `CodeAssistanceTools.planImplementation`. It uses the `toolLlmWrapper` to execute the planning logic.
async planImplementation( taskDescription: string, options?: { codebaseContext?: string; existingFiles?: string[]; constraints?: string[]; } ): Promise<PlanImplementationResult> { const prompt = `You are an expert software architect. Create a step-by-step implementation plan for the following task. ${options?.codebaseContext ? `Codebase context:\n${options.codebaseContext}` : ''} ${options?.existingFiles ? `Existing files to consider:\n${options.existingFiles.join('\n')}` : ''} ${options?.constraints ? `Constraints:\n${options.constraints.join('\n')}` : ''} Provide your response as JSON: { "plan": [ { "step": 1, "title": "Step title", "description": "Detailed description", "files": ["files to modify or create"], "estimatedEffort": "small|medium|large", "dependencies": [0] } ], "summary": "Overall summary of the plan", "estimatedTotalEffort": "Total time estimate", "risks": ["Potential risks or challenges"] }`; try { const responseText = await this.llmWrapper.callToolLlm( 'mcp_plan_implementation', [ { role: 'system', content: prompt }, { role: 'user', content: `Task: ${taskDescription}` }, ], { type: 'plan_implementation' } ); const parsed = this.parseJsonResponse(responseText, { plan: [], summary: responseText, estimatedTotalEffort: 'Unknown', }); return { success: true, plan: parsed.plan || [], summary: parsed.summary || '', estimatedTotalEffort: parsed.estimatedTotalEffort || 'Unknown', risks: parsed.risks, }; } catch (error) { return { success: false, plan: [], summary: '', estimatedTotalEffort: '', error: error instanceof Error ? error.message : 'Unknown error', }; } } - src/tools/code-assistance.ts:120-134 (schema)Schema definition for the result of `planImplementation`.
export interface PlanImplementationResult { success: boolean; plan: Array<{ step: number; title: string; description: string; files?: string[]; estimatedEffort?: 'small' | 'medium' | 'large'; dependencies?: number[]; }>; summary: string; estimatedTotalEffort: string; risks?: string[]; error?: string; }