Skip to main content
Glama

interactive_edit_session

Start an interactive editing session to perform complex file modifications using step-by-step instructions for precise control over changes.

Instructions

Start an interactive editing session for complex edits

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesList of files to edit
instructionsNoInstructions for the editing session

Implementation Reference

  • src/index.ts:306-329 (registration)
    Registration of the interactive_edit_session tool, including input schema, description, 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 } });
  • 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']
  • Handler logic in executeWithEdit: creates edit session for the files and returns sessionId without closing it.
    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 };
  • Core helper function createEditSession that spawns an EditInstance process, opens the specified files, and returns the session ID for interactive use.
    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; }
  • Ensures the session remains open for interactive_edit_session by skipping closeEditSession.
    if (operation.type !== 'interactive_edit_session') { await this.editInstanceManager.closeEditSession(sessionId).catch(console.error); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mixelpixx/microsoft-edit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server