# 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}

Agent View of the PolicyLayer registry record for `close_tabs`. HTML page: https://policylayer.com/tools/2manytabs-mcp-host/close-tabs

## Facts

- Tool: `close_tabs`
- Server: 2manytabs Mcp Host (`2manytabs-mcp-host`) — https://policylayer.com/tools/2manytabs-mcp-host.md
- Install: `npx -y 2manytabs-mcp-host`
- Homepage: https://www.npmjs.com/package/2manytabs-mcp-host
- Risk category: Write (Medium risk)
- Registry record: grade D, identity unverified
- Server rate-limited: no
- Parameters: 4
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `match` | string | no | Close every tab whose title or URL contains this substring (case-insensitive). |
| `dry_run` | boolean | no | Preview the tabs that would close — does not close anything. Recommended for bulk closes. |
| `tab_ids` | array | no | Explicit tab IDs to close (from list_tabs). |
| `duplicates` | boolean | no | Close duplicate tabs, keeping the first occurrence of each URL. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "close_tabs",
    "arguments": {}
  }
}
```

## 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 signals: Bulk/mass operation — affects multiple targets

## Use case

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.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches 2manytabs Mcp Host:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "close_tabs": {
      "limits": [
        {
          "counter": "close_tabs_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on 2manytabs Mcp Host (9)

- `ungroup_tabs` — Destructive — https://policylayer.com/tools/2manytabs-mcp-host/ungroup-tabs.md
- `get_tab_text` — Read — https://policylayer.com/tools/2manytabs-mcp-host/get-tab-text.md
- `list_tab_groups` — Read — https://policylayer.com/tools/2manytabs-mcp-host/list-tab-groups.md
- `list_tabs` — Read — https://policylayer.com/tools/2manytabs-mcp-host/list-tabs.md
- `activate_tab` — Write — https://policylayer.com/tools/2manytabs-mcp-host/activate-tab.md
- `group_tabs` — Write — https://policylayer.com/tools/2manytabs-mcp-host/group-tabs.md
- `open_tabs` — Write — https://policylayer.com/tools/2manytabs-mcp-host/open-tabs.md
- `update_tab` — Write — https://policylayer.com/tools/2manytabs-mcp-host/update-tab.md
- `update_tab_group` — Write — https://policylayer.com/tools/2manytabs-mcp-host/update-tab-group.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=2manytabs-mcp-host · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/2manytabs-mcp-host
