close_tabs
Close Chrome tabs by one selection mode: tab_ids (explicit), match (substring of title/URL), or duplicates (every tab sharing a URL with an earlier one). Set dry_run to preview the exact tabs that would close without touching them. Destructive — closed tabs cannot be recovered through this tool. ...
This record as markdown: /tools/2manytabs-mcp-host/close-tabs.md
What close_tabs does on 2manytabs Mcp Host
AI agents use close_tabs to create or update resources in 2manytabs Mcp Host, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your 2manytabs Mcp Host environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
match | string | — | Close every tab whose title or URL contains this substring (case-insensitive). |
dry_run | boolean | — | Preview the tabs that would close — does not close anything. Recommended for bulk closes. |
tab_ids | array | — | Explicit tab IDs to close (from list_tabs). |
duplicates | boolean | — | Close duplicate tabs, keeping the first occurrence of each URL. |
Parameters from the server's own tool schema.
Why close_tabs is rated Medium
An AI agent can call close_tabs faster than any human can review: one bad instruction and it creates or modifies resources in 2manytabs Mcp Host by the hundred, each call as confident as the last.
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs close_tabs safely
PolicyLayer is an MCP gateway: it sits between your AI agents and 2manytabs Mcp Host, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For close_tabs, this is the rule to start with:
close_tabs stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect 2manytabs Mcp Host, apply this rule, and every close_tabs call is checked against it from then on.
Questions about close_tabs
Close Chrome tabs by one selection mode: tab_ids (explicit), match (substring of title/URL), or duplicates (every tab sharing a URL with an earlier one). Set dry_run to preview the exact tabs that would close without touching them. Destructive — closed tabs cannot be recovered through this tool. CRITICAL: You MUST explicitly ask the user for confirmation before running this tool with dry_run=false, unless they already asked you to. Examples: - {"tab_ids": [123, 456], "dry_run": true} - {"match": "github.com", "dry_run": false} - {"duplicates": true, "dry_run": true} Returns: JSON object containing: - dry_run (boolean): Whether this was a preview - reason (string): Description of selection criteria - count/closed (int): Number of tabs matched/closed - by_domain (object): Map of domain to count - sample (array): First 10 tabs with {id, title}. It is categorised as a Write tool in the 2manytabs Mcp Host MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
close_tabs accepts 4 parameters: match, dry_run, tab_ids, duplicates. The full parameter table on this page comes from the server's own tool schema.
Register the 2manytabs Mcp Host MCP server in PolicyLayer and add a rule for close_tabs: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches 2manytabs Mcp Host. Nothing to install.
close_tabs is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the close_tabs rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for close_tabs. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
close_tabs is provided by the 2manytabs Mcp Host MCP server (2manytabs-mcp-host). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on 2manytabs Mcp Host, and thousands of servers like it.
This server
Across the catalogue