cancel
Stop or abort ongoing actions in the editor-mcp server to halt unintended changes or processes for better file management.
Instructions
Cancel action
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/text_editor/server.py:759-773 (handler)The `cancel` tool handler that discards any pending modifications made by the `overwrite` tool, clearing the pending state without applying changes to the file.@self.mcp.tool() async def cancel() -> Dict[str, Any]: """ Cancel action """ if self.pending_modified_lines is None or self.pending_diff is None: return {"error": "No pending changes to discard. Use overwrite first."} self.pending_modified_lines = None self.pending_diff = None return { "status": "success", "message": "Action cancelled.", }