Skip to main content
Glama

confirm

Finalize pending operations in the editor-mcp server to apply changes to text files. Use this tool to complete file editing tasks after making modifications.

Instructions

Confirm action

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'confirm' tool handler function. It checks for pending changes, writes the modified lines to the current file, clears the pending state and selection, and returns success or error status.
    async def confirm() -> Dict[str, Any]: """Confirm action""" if self.pending_modified_lines is None or self.pending_diff is None: return {"error": "No pending changes to apply. Use overwrite first."} try: with open(self.current_file_path, "w", encoding="utf-8") as file: file.writelines(self.pending_modified_lines) result = { "status": "success", "message": f"Changes applied successfully.", } self.selected_start = None self.selected_end = None self.selected_id = None self.pending_modified_lines = None self.pending_diff = None return result except Exception as e: return {"error": f"Error writing to file: {str(e)}"}

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/danielpodrazka/editor-mcp'

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