export const BROWSER_TOOLS = [
    {
        "name": "navigate_to",
        "description": "Navigate the browser to a specific URL.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "url": {
                    "type": "STRING",
                    "description": "The URL to navigate to."
                },
                "tabId": {
                    "type": "NUMBER",
                    "description": "Optional. If provided, navigates this specific tab ID. Otherwise uses the active tab."
                }
            },
            "required": [
                "url"
            ]
        }
    },
    {
        "name": "interact_with_page",
        "description": "Perform a high-precision action on the page like clicking, typing, pressing enter, or scrolling. The 'type' action NO LONGER presses enter automatically. If you need to submit a search or form, you MUST either use 'click' on the submit button afterwards, or use the 'press_enter' action separately.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "action": {
                    "type": "STRING",
                    "description": "The action to perform: click, type, press_enter, scroll."
                },
                "element": {
                    "type": "STRING",
                    "description": "Description of the element to interact with (e.g., the login button)."
                },
                "value": {
                    "type": "STRING",
                    "description": "The text to type, if the action is type."
                },
                "tabId": {
                    "type": "NUMBER",
                    "description": "Optional. The tab ID to run the action on."
                },
                "x": {
                    "type": "NUMBER",
                    "description": "Optional. The exact X coordinate on the screen to click."
                },
                "y": {
                    "type": "NUMBER",
                    "description": "Optional. The exact Y coordinate on the screen to click."
                }
            },
            "required": [
                "action",
                "element"
            ]
        }
    },
    {
        "name": "read_webpage",
        "description": "Fetch and read the main text content of any URL using an API. Fast, silent, doesn't open tabs. PREFERRED for broad research and reading articles.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "url": {
                    "type": "STRING",
                    "description": "The full URL of the webpage to read."
                }
            },
            "required": [
                "url"
            ]
        }
    },
    {
        "name": "scrape_page",
        "description": "Gather links, images, text, prices from a page.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "dataType": {
                    "type": "STRING",
                    "description": "The type of data to scrape (links, images, text, prices, forms)."
                },
                "tabId": {
                    "type": "NUMBER",
                    "description": "Optional. The tab ID to scrape from."
                }
            },
            "required": [
                "dataType"
            ]
        }
    },
    {
        "name": "manage_background_tab",
        "description": "Open a tab. Leave active false for stealth, set active true if user explicitly wants to \"watch\", \"see\", or open a foreground tab.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "action": {
                    "type": "STRING",
                    "description": "Either \"open\" or \"close\""
                },
                "url": {
                    "type": "STRING",
                    "description": "The URL to load. Required for \"open\"."
                },
                "tabId": {
                    "type": "NUMBER",
                    "description": "Tab ID to close. Required for \"close\"."
                },
                "active": {
                    "type": "BOOLEAN",
                    "description": "Whether to open the tab visibly (true) or in stealth (false). Default false."
                }
            },
            "required": [
                "action"
            ]
        }
    },
    {
        "name": "autofill_form",
        "description": "Intelligently fill multiple form fields at once. IMPORTANT: Do NOT click 'Submit' or 'Publish' in the same step. You MUST verify the form fill was successful before clicking submit.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "fields": {
                    "type": "ARRAY",
                    "description": "Array of field objects to fill.",
                    "items": {
                        "type": "OBJECT",
                        "properties": {
                            "element": {
                                "type": "STRING",
                                "description": "Element description."
                            },
                            "value": {
                                "type": "STRING",
                                "description": "Value to fill."
                            }
                        }
                    }
                },
                "tabId": {
                    "type": "NUMBER",
                    "description": "Optional tab ID."
                }
            },
            "required": [
                "fields"
            ]
        }
    },
    {
        "name": "analyze_tabs",
        "description": "Get a list of all open tabs to help the user and synthesize information across them.",
        "parameters": {
            "type": "OBJECT",
            "properties": {},
            "required": []
        }
    },
    {
        "name": "take_screenshot",
        "description": "Capture a pixel-perfect screenshot of the current active tab for visual analysis. Use this to read charts, images, or locate elements by coordinate.",
        "parameters": {
            "type": "OBJECT",
            "properties": {},
            "required": []
        }
    },
    {
        "name": "organize_tabs",
        "description": "List all open tabs, close specific tabs, or group tabs together.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "action": {
                    "type": "STRING",
                    "description": "\"list\", \"close\", or \"group\"."
                },
                "tabIds": {
                    "type": "ARRAY",
                    "items": {
                        "type": "NUMBER"
                    },
                    "description": "Tab IDs (for close/group)."
                },
                "groupName": {
                    "type": "STRING",
                    "description": "Name for the tab group."
                }
            },
            "required": [
                "action"
            ]
        }
    },
    {
        "name": "fetch_transcript",
        "description": "Fetch and return the full text transcript of a YouTube video.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "url": {
                    "type": "STRING",
                    "description": "YouTube video URL. If not provided, uses the current active tab."
                }
            },
            "required": []
        }
    },
    {
        "name": "monitor_element",
        "description": "Set up a Sniper Bird background monitor on a page element. Watches a DOM element and fires an alert when a condition is met.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "targetElement": {
                    "type": "STRING",
                    "description": "CSS selector or description of the element to watch."
                },
                "condition_operator": {
                    "type": "STRING",
                    "description": "Comparison operator: gt, lt, eq, contains."
                },
                "condition_value": {
                    "type": "STRING",
                    "description": "Threshold value to compare against."
                },
                "actionElement": {
                    "type": "STRING",
                    "description": "Optional element to click when condition is met."
                },
                "actionValue": {
                    "type": "STRING",
                    "description": "Optional value to type when condition is met."
                },
                "tabId": {
                    "type": "NUMBER",
                    "description": "Optional tab ID to monitor."
                }
            },
            "required": [
                "targetElement",
                "condition_operator",
                "condition_value"
            ]
        }
    },
    {
        "name": "tavily_search",
        "description": "Search the web using Tavily for real-time, AI-optimized results. Use this for current events, prices, or anything that requires up-to-date web data.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "query": {
                    "type": "STRING",
                    "description": "The search query."
                }
            },
            "required": [
                "query"
            ]
        }
    },
    {
        "name": "draw_vision_labels",
        "description": "Draw bounding-box labels on the current page using vision data. Useful for highlighting detected elements.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "tabId": {
                    "type": "NUMBER",
                    "description": "Optional tab ID. Uses active tab if omitted."
                }
            },
            "required": []
        }
    },
    {
        "name": "draw_highlight",
        "description": "Draw a colored highlight rectangle on the page at a specific position. Use to visually point out an area to the user.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "x": { "type": "NUMBER", "description": "X coordinate of highlight origin." },
                "y": { "type": "NUMBER", "description": "Y coordinate of highlight origin." },
                "width": { "type": "NUMBER", "description": "Width in pixels. Default 100." },
                "height": { "type": "NUMBER", "description": "Height in pixels. Default 100." },
                "color": { "type": "STRING", "description": "CSS color for the highlight box. Default '#ef4444'." },
                "text": { "type": "STRING", "description": "Optional label text to display on the highlight." },
                "tabId": { "type": "NUMBER", "description": "Optional tab ID." }
            },
            "required": ["x", "y"]
        }
    },
    {
        "name": "clear_highlights",
        "description": "Remove all highlight overlays and vision labels from the page.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "tabId": { "type": "NUMBER", "description": "Optional tab ID." }
            },
            "required": []
        }
    },
    {
        "name": "fetch_developer_documentation",
        "description": "Fetch and read documentation from a URL. Returns the raw text content for analysis. Use for reading API docs, library references, or any web-based documentation.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "url": {
                    "type": "STRING",
                    "description": "The URL of the documentation page to fetch."
                }
            },
            "required": ["url"]
        }
    },
    {
        "name": "setup_alarm",
        "description": "Set up a scheduled task or alarm (Timer/Reminder) within the app.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "message": {
                    "type": "STRING",
                    "description": "The message to show when the alarm triggers."
                },
                "delayMinutes": {
                    "type": "NUMBER",
                    "description": "How many minutes from now the alarm should trigger."
                }
            },
            "required": ["message", "delayMinutes"]
        }
    }
];
