microsoft / microsoft/playwright

Proposal: let an MCP client label its own tab group (browser_set_group_label)

Open
#41,840 1 comment 0 reactions 1 assignee View on GitHub

@yury-s is already working on this.

Since Jul 17, 2026.

v1.64
Dominant language
TypeScript
Stars
96.3k
Forks
6.5k
Avg merge
1d 6h
Merged PRs (30d)
180

Description

### Motivation

Once multiple simultaneous MCP client connections are supported (#41838), a user running several
agents at once against the same browser has no easy way to tell which Chrome tab group belongs to
which task or agent - each just shows as "Playwright" (or "Playwright · " under
#41838), which isn't always meaningful (e.g. several connections from the same client name/tool,
or a generic name that doesn't describe the task).

This is also mildly useful even with a single connection - a user can see at a glance what an
agent is currently working on from the tab group's title, without switching to the agent's
terminal/window.

### Proposed tool

A new MCP tool, `browser_set_group_label`, letting an agent set a short custom label for its own
connection's tab group early in a task:

```
browser_set_group_label({ label: "checkout flow bug" })
```

This renames the connection's tab group to `Playwright · ` (deduplicated with a `(2)`,
`(3)`... suffix if another active connection already used that exact label). The tool's own
description would suggest calling it once, early, especially when the user might be running the
agent alongside others - since MCP tools are discovered by their description, not by hardcoded
client-side instructions.

### Scope

Touches both the extension (`packages/extension`, applying the label to the actual Chrome tab
group) and the server (`packages/playwright-core/src/tools`, a new MCP tool + a small new
session-level protocol command distinct from the existing CDP-passthrough commands). No protocol
version bump needed if kept backward compatible with clients that don't call it.

I have a working implementation and test coverage for this already, built on top of the
multi-connection work in #41838 (though the tool would still have narrow value even without it,
for the "what is this agent doing" case). Wanted to check whether this is a direction the team
would want before opening a PR, per the contribution guidelines - happy to adjust the shape of the
tool (naming, whether it belongs in `core` capability, etc.) based on feedback.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.