cancel
Cancel the current operation in the editor-mcp server to stop ongoing file actions or processes.
Instructions
Cancel action
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/text_editor/server.py:760-773 (handler)The 'cancel' tool handler function. Discards any pending modifications (clears pending_modified_lines and pending_diff) from a previous 'overwrite' operation. Returns success message or error if no pending changes.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.", }