app_refresh
Automatically refreshes the currently open app in Google Chrome on macOS. Ideal for developers using Goose App Maker MCP to streamline web app testing and management.
Instructions
Refresh the currently open app in Chrome.
Only works on macOS with Google Chrome.
Returns:
A dictionary containing the result of the operation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:583-613 (handler)The handler function for the 'app_refresh' tool. It refreshes the active tab in Google Chrome on macOS using AppleScript. Includes registration via @mcp.tool() decorator.@mcp.tool() def app_refresh() -> Dict[str, Any]: """ Refresh the currently open app in Chrome. Only works on macOS with Google Chrome. Returns: A dictionary containing the result of the operation """ try: # Check if we're on macOS if os.uname().sysname != "Darwin": return { "success": False, "error": "This function is only available on macOS" } # Use AppleScript to refresh the active tab in Chrome refresh_script = 'tell application "Google Chrome" to tell active tab of front window to reload' # Use Popen instead of run to avoid blocking subprocess.Popen(["osascript", "-e", refresh_script], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) return { "success": True, "message": "App refreshed successfully in Chrome" } except Exception as e: logger.error(f"Error refreshing app: {e}") return {"success": False, "error": f"Failed to refresh app: {str(e)}"}