create_ide_configs
Generate IDE-specific configurations for Cursor, VS Code, and IntelliJ to streamline project setup and enhance coding efficiency. Customize with auto-loaded context, debugging setups, and tailored rules.
Instructions
Create IDE-specific configurations for Cursor, VS Code, and IntelliJ
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| analysisId | No | Analysis ID from analyze_codebase_deeply | |
| autoLoadContext | No | Enable automatic context loading | |
| customRules | No | Custom rules to add | |
| ide | Yes | Which IDE configurations to create | |
| includeDebugConfigs | No | Include debugging configurations | |
| projectPath | Yes | Path to the project directory |
Implementation Reference
- Primary handler function that orchestrates creation of IDE configurations (Cursor, VSCode, IntelliJ) based on codebase analysis, generating files like .cursorrules, settings.json, etc.export async function createIDEConfigs( config: IDEConfigConfig ): Promise<IDEConfigResult> { const result: IDEConfigResult = { success: false, filesCreated: [], message: '', recommendations: [], }; try { // Check if analysis has been completed const analysisId = config.analysisId || global.latestAnalysisId; if (!analysisId || !global.codebaseAnalysis?.[analysisId]) { throw new Error('Codebase analysis must be completed first. Run analyze_codebase_deeply tool.'); } const analysis: DeepAnalysisResult = global.codebaseAnalysis[analysisId]; const ides = config.ide === 'all' ? ['cursor', 'vscode', 'intellij'] : [config.ide]; for (const ide of ides) { switch (ide) { case 'cursor': await createCursorConfig(config, analysis, result); break; case 'vscode': await createVSCodeConfig(config, analysis, result); break; case 'intellij': await createIntelliJConfig(config, analysis, result); break; } } // Add general recommendations result.recommendations = generateIDERecommendations(analysis, config); result.success = true; result.message = `Created IDE configurations for ${ides.join(', ')}. ${config.autoLoadContext ? 'Auto-loading enabled.' : 'Manual loading required.'}`; } catch (error) { result.success = false; result.message = `Failed to create IDE configs: ${error}`; } return result; }
- Input schema definition for the create_ide_configs tool, specifying parameters like projectPath, analysisId, ide choice, etc.name: 'create_ide_configs', description: 'Create IDE-specific configurations for Cursor, VS Code, and IntelliJ', inputSchema: { type: 'object', properties: { projectPath: { type: 'string', description: 'Path to the project directory', }, analysisId: { type: 'string', description: 'Analysis ID from analyze_codebase_deeply', }, ide: { type: 'string', enum: ['cursor', 'vscode', 'intellij', 'all'], description: 'Which IDE configurations to create', }, autoLoadContext: { type: 'boolean', description: 'Enable automatic context loading', }, customRules: { type: 'array', items: { type: 'string' }, description: 'Custom rules to add', }, includeDebugConfigs: { type: 'boolean', description: 'Include debugging configurations', }, }, required: ['projectPath', 'ide'], }, },
- src/tools/index.ts:273-292 (registration)Tool dispatch/registration in the main tool router: parses arguments, calls createIDEConfigs, and returns result as MCP contentcase 'create_ide_configs': { const params = z.object({ projectPath: z.string(), analysisId: z.string().optional(), ide: z.enum(['cursor', 'vscode', 'intellij', 'all']), autoLoadContext: z.boolean().optional(), customRules: z.array(z.string()).optional(), includeDebugConfigs: z.boolean().optional(), }).parse(args); const result = await createIDEConfigs(params); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/tools/index.ts:18-18 (registration)Import of the createIDEConfigs handler functionimport { createIDEConfigs } from './workspace/create-ide-configs.js';
- Usage of createIDEConfigs in the complete setup workflow as a supporting stepconst ideResult = await createIDEConfigs({