generate_vscode_launch
Create a .vscode/launch.json file to configure debugging for your project by specifying project name, programming language, and entry point.
Instructions
Generates a .vscode/launch.json file for debugging.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectName | Yes | ||
| language | Yes | ||
| entryPoint | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"entryPoint": {
"type": "string"
},
"language": {
"type": "string"
},
"projectName": {
"type": "string"
}
},
"required": [
"projectName",
"language"
],
"type": "object"
}
Implementation Reference
- src/tools/ideconfigs.ts:126-173 (handler)The handler function that generates VSCode launch.json configuration based on project name, language (supports TypeScript/JavaScript, Python, fallback), and optional entry point.export function generateVSCodeLaunchHandler(args: any) { const { projectName, language, entryPoint } = args; let config: any; if (language === "typescript" || language === "javascript") { config = { "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": `Launch ${projectName}`, "program": entryPoint || "${workspaceFolder}/dist/index.js", "preLaunchTask": "Build", "outFiles": ["${workspaceFolder}/dist/**/*.js"] } ] }; } else if (language === "python") { config = { "version": "0.2.0", "configurations": [ { "name": `Python: ${projectName}`, "type": "python", "request": "launch", "program": entryPoint || "${workspaceFolder}/main.py", "console": "integratedTerminal" } ] }; } else { config = { "version": "0.2.0", "configurations": [ { "name": `Launch ${projectName}`, "type": "node", "request": "launch", "program": entryPoint || "${workspaceFolder}/index.js" } ] }; } return { content: [{ type: "text", text: JSON.stringify(config, null, 2) }] }; }
- src/tools/ideconfigs.ts:116-124 (schema)Zod schema definition for the tool including name, description, and input parameters (projectName, language, optional entryPoint).export const generateVSCodeLaunchSchema = { name: "generate_vscode_launch", description: "Generates a .vscode/launch.json file for debugging.", inputSchema: z.object({ projectName: z.string(), language: z.string(), entryPoint: z.string().optional() }) };
- src/server.ts:116-116 (registration)Tool registration in the HTTP server's toolRegistry Map.["generate_vscode_launch", { schema: generateVSCodeLaunchSchema, handler: generateVSCodeLaunchHandler }],
- src/index.ts:110-110 (registration)Tool registration in the main MCP server's toolRegistry Map.["generate_vscode_launch", { schema: generateVSCodeLaunchSchema, handler: generateVSCodeLaunchHandler }],