Skip to content

Include page title in list_pages output #2156

Description

@thomasbachem

Is your feature request related to a problem? Please describe.

list_pages shows each page's URL but not its title, which is painful when pages share a host — e.g. several accounts of the same product, all under app.example.com/u/0/…, /u/1/…, /u/2/…. There's no way to tell which is which without opening each, even though every page has a usable document.title.

The page id isn't a stable handle either — it's a counter that resets when the server reconnects to a fresh browser (e.g. the app I'm debugging restarts under --browserUrl), so pages come back renumbered and an id I grabbed a minute ago can point somewhere else.

Describe the solution you'd like

Include the page title in list_pages output. Today the line (in McpResponse.ts) is:

`${context.getPageId(page)}: ${page.url()}${selected ? ' [selected]' : ''}${contextLabel}`

page.title() is already available via Puppeteer, so ${id}: ${title} (${url}) would do it, plus a title field on the structured entry from createStructuredPage.

Describe alternatives you've considered

Matching by URL — works until multiple pages share a host (the case above). Caching the page id — unreliable across reconnects, as noted. Neither gives a stable, human-readable handle the way the title would.

For reference, Playwright MCP already lists titles — its browser_tabs renders each line as [title](url).

Additional context

I'm on [email protected].

Related: #933, #1173

Happy to send a PR (read CONTRIBUTING, can sign the CLA) if you're open to it.

Activity

  1. natorion commented on Jun 3, 2026

    @natorion
    Contributor

    I think this makes sense for list_pages. The title should be truncated after a sensible amount of max length though.

  2. Sushanth012 commented on Jun 4, 2026

    @Sushanth012

    I'll contribute to this

  3. added a commit that references this issue on Jun 9, 2026
    b646feb
  4. thomasbachem commented on Jun 9, 2026

    @thomasbachem
    ContributorAuthor

    Awesome, thanks!

  5. added a commit that references this issue on Jun 21, 2026
    184dfab
  6. added a commit that references this issue on Jun 29, 2026
    c8013c4
  7. added a commit that references this issue on Nov 9, 2026
    d44fd9f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions