interactive_edit_session
Start an interactive editing session to manage complex edits across multiple files with guided instructions.
Instructions
Start an interactive editing session for complex edits
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"files": "<files>"
},
"name": "interactive_edit_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | List of files to edit | |
| instructions | No | Instructions for the editing session |
Implementation Reference
- src/router/operation-router.ts:438-444 (handler)Handler logic for 'interactive_edit_session' operation: creates an edit session ID using EditInstanceManager and returns it to the client.
const sessionId = await this.editInstanceManager.createEditSession(operation.affectedFiles); try { switch (operation.type) { case 'interactive_edit_session': // Return the session ID for the client to use return { sessionId }; - src/index.ts:306-329 (registration)Registers the 'interactive_edit_session' tool with MCP server including schema and annotations.
mcpServer.registerTool({ name: 'interactive_edit_session', description: 'Start an interactive editing session for complex edits', inputSchema: { type: 'object', properties: { files: { type: 'array', description: 'List of files to edit' }, instructions: { type: 'string', description: 'Instructions for the editing session' } }, required: ['files'] }, annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false } }); - src/index.ts:309-321 (schema)Input schema definition for the 'interactive_edit_session' tool.
inputSchema: { type: 'object', properties: { files: { type: 'array', description: 'List of files to edit' }, instructions: { type: 'string', description: 'Instructions for the editing session' } }, required: ['files'] - Helper function that creates an interactive edit session by spawning an Edit instance and opening the specified files.
public async createEditSession(files: string[]): Promise<string> { const sessionId = uuidv4(); const instance = await this.createInstance(sessionId); // Open all files for (const file of files) { await instance.openFile(file); } return sessionId; }