diff --git a/src/mcghidra/mixins/analysis.py b/src/mcghidra/mixins/analysis.py index 6e96087..b318f00 100644 --- a/src/mcghidra/mixins/analysis.py +++ b/src/mcghidra/mixins/analysis.py @@ -242,41 +242,10 @@ class AnalysisMixin(MCGhidraMixinBase): return paginated - @mcp_tool() - def ui_get_current_address(self, port: Optional[int] = None) -> Dict[str, Any]: - """Get the address currently selected in Ghidra's UI. - - Args: - port: Ghidra instance port (optional) - - Returns: - Current address information - """ - try: - port = self.get_instance_port(port) - except ValueError as e: - return {"success": False, "error": {"code": "NO_INSTANCE", "message": str(e)}} - - response = self.safe_get(port, "address") - return self.simplify_response(response) - - @mcp_tool() - def ui_get_current_function(self, port: Optional[int] = None) -> Dict[str, Any]: - """Get the function currently selected in Ghidra's UI. - - Args: - port: Ghidra instance port (optional) - - Returns: - Current function information - """ - try: - port = self.get_instance_port(port) - except ValueError as e: - return {"success": False, "error": {"code": "NO_INSTANCE", "message": str(e)}} - - response = self.safe_get(port, "function") - return self.simplify_response(response) + # NOTE: ui_get_current_address and ui_get_current_function were removed + # because they require Ghidra GUI context which is never available in + # headless MCP mode. Use functions_get(address=...) or data_list(addr=...) + # with explicit addresses instead. @mcp_tool() def comments_get(