Close every tab showing a URL
browser_close_tabs_by_urlClose all tabs whose URL contains the specified text via substring matching, so you can clean up after batch runs without touching unrelated tabs.
Instructions
Close all tabs whose URL contains the given text. MEASURED: gBrowser.closeTabsByURI takes nsIURI objects and matches them EXACTLY, so it cannot do substrings — this walks the tabs and calls removeTab instead. The value is matched as a substring against the tab URL, so "example.com" catches all of that site. Useful to clean up after a batch run without touching unrelated tabs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pattern": "<pattern>"
},
"name": "browser_close_tabs_by_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Text or regex matched against tab URLs |