fileforge_browser_action
Manage browser tabs and read browser state: navigate, switch, reload, close, move through history, wait for pages, and query context. Dry-run bulk closes to prevent lost work.
Instructions
Manage tabs and read browser state: go to a URL, switch, reload and close tabs, move through history, wait for a page, and list open tabs. Use query_context to see what's open, and fileforge_page_interaction to act inside a page. Closing tabs can lose unsaved work, and close_tabs_matching can close many at once, so try dryRun first. Sensitive tab URLs are redacted. Needs the extension.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL for navigate or open_url_with_capture. | |
| query | No | Fine-grained projection for query_context. Sections: activeTab, tabs, windows, summary, privacy. Merged on top of preset. | |
| store | No | Save the result in ~/.fileforge and return a ref. | |
| tabId | No | Tab ID or "active". Omit in navigate for smart URL-reuse behaviour. | |
| until | No | Condition to wait for. | load |
| action | Yes | What to do. Required parameters are in brackets. navigate (url): Go to a URL in a tab, or in a new tab with newTab. open_url_with_capture (url): Open a URL with capture on and return what it loaded. Closes the tab afterwards unless keepOpen is set, and stores the result by default. activate_tab (tabId): Switch to a tab. close_tab (tabId): Close a tab. Unsaved work in it is lost. reload_tab: Reload a tab, optionally bypassing the cache. history: Go back or forward in a tab. Goes back unless direction says otherwise. wait: Wait until a tab reaches until: load (the default), idle, or url, which also needs urlIncludes. query_context: Read open tabs, windows and the active tab, using a preset or a query. Changes nothing. close_tabs_matching: Close tabs matching urlIncludes or titleIncludes. Use dryRun to preview; keepActiveTab is on by default. | |
| active | No | Focus the tab after navigate / open. | |
| dryRun | No | Simulate without closing. | |
| idleMs | No | Quiet period before considering tab idle. | |
| newTab | No | Force a new tab in navigate even if an existing tab has the same URL. | |
| preset | No | Preset for query_context. "snapshot" is the automation sweet spot (active tab + nav + compact tabs). "basic" is cheaper (no nav fields). | |
| project | No | Project name that groups stored results. | default |
| keepOpen | No | Leave tab open after capture. | |
| settleMs | No | Milliseconds to wait after load before capturing. | |
| direction | No | Direction for history action. | back |
| timeoutMs | No | Time limit in milliseconds. | |
| includeHar | No | Include a HAR capture. | |
| bypassCache | No | Reload without the browser cache. | |
| urlIncludes | No | URL substring — required for wait(until="url") and close_tabs_matching. | |
| keepActiveTab | No | Protect active tab from close_tabs_matching. | |
| networkIdleMs | No | Quiet network period that counts as idle, in milliseconds. | |
| titleIncludes | No | Title substring for close_tabs_matching. | |
| includeApiBodies | No | Include API response bodies. | |
| includeScreenshot | No | Include a screenshot. | |
| includePerformance | No | Include performance metrics. | |
| networkIdleTimeoutMs | No | Longest wait for network idle, in milliseconds. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | False if the action failed or a check did not pass. | |
| ref | No | Stored result ID, for fileforge_result_action. | |
| data | No | The result. Its shape depends on the action. | |
| meta | No | Tool, action and context. | |
| error | No | Failure code and message. | |
| warnings | No | Notes about a call that still ran. |